Red Gate forums :: View topic - SA MSbuild task errors out during Teambuild
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

SA MSbuild task errors out during Teambuild

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Sjohn



Joined: 05 Aug 2013
Posts: 1

PostPosted: Mon Aug 05, 2013 1:24 pm    Post subject: SA MSbuild task errors out during Teambuild Reply with quote

Hello, I'm using SmartAssembly 6.8.
My workflow involves a solution that builds 6 other .dll files before building an .exe file project at the end.
It is that .exe file which is obfuscated, has the .dll files obfuscated + merged, or embedded.
When running a local build from VS2010, (either via Build->Build Solution or Right clicking on the .exe project and publishing using ClickOnce,) I am able to create and obfuscate my the .exe successfully during the "AfterCompile" target containing the SmartAssembly.MSBuild.Tasks.Build command.

However, when attempting to build the project via Teambuild, I receive the following error:
Code:
...Unhandled Exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Attempted to use an inactive task host.
 at Microsoft.Build.Shared.ErrorUtilities.VerifyThrow(Boolean condition, String unformattedMessage)
 at Microsoft.Build.BackEnd.TaskHost.LogMessageEvent(BuildMessageEventArgs e)
 at Microsoft.Build.Utilities.TaskLoggingHelper.LogMessage(MessageImportance importance, String message, Object[] messageArgs)
 at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
 at Microsoft.Build.CommandLine.MSBuildApp.Execute(String commandLine)
 at Microsoft.Build.CommandLine.MSBuildApp.Main()
 TF270015: 'MSBuild.exe' returned an unexpected exit code. Expected '0'; actual '255'.

Digging further into the log, this is what it says:
Code:
_CopyAppConfigFile:
  Copying file from "Config\Test\app.config" to "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.exe.config".
_CopyManifestFiles:
  Copying file from "obj\Test\TimeBloxGUI.exe.manifest" to "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.exe.manifest".
  TimeBloxGUI -> C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.exe.manifest
  Copying file from "obj\Test\TimeBloxGUI.application" to "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.application".
  TimeBloxGUI -> C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.application
CopyFilesToOutputDirectory:
  Copying file from "obj\Test\TimeBloxGUI.exe" to "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.exe".
  TimeBloxGUI -> C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.exe
  Copying file from "obj\Test\TimeBloxGUI.pdb" to "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Binaries\Test\TimeBloxGUI.pdb".
AfterBuild:
  SmartAssembly v6.8.0.121
  Copyright Red Gate Software 20052013
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj(521,5): error : SmartAssembly build failed:
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj(521,5): error : The type initializer for '.' threw an exception.
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning : The type initializer for '.' threw an exception.
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at Œ.€.()
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at ...ctor(String ,  )
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at ...ctor(String , Boolean ,  )
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at Œ.€.( , Boolean , String )
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at Œ.€.(String )
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at SmartAssembly.ConsoleApp.CommandLineAction(String ,  , Dictionary`2 )
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at SmartAssembly.ConsoleApp.Run(String[] , Boolean )
C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj : warning :    at SmartAssembly.ConsoleApp.Run(String[] )
Done Building Project "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI\TimeBloxGUI.csproj" (default targets) -- FAILED.
Done Building Project "C:\MSVS\CTMS\Obfuscated TimeBloxGUI\Sources\TimeBloxGUI.sln" (default targets) -- FAILED.

Build FAILED.

I don't know why this occurs.
Additionally, I can get it to "build" and obfuscate successfully from a team build using the "AfterBuild" target and the exec command=, however this causes issues with our post-build scripts...effectively breaking our workflow.
My .saproj file is looking for the dependency paths using the following structure:
Code:
 HintPath="..\..\..\BLSupport\obj\Test\BLSupport.dll">

with Test being that configuration (there are 3, and each has its own .saproj and files for that version). So I know that everything should be in the proper place & visible...

Does anyone know why the SA MSbuild task would be able to obfuscate successfully during a localbuild/ClickOnce Publish (locally), but generate the described errors during a Team Build?
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 232

PostPosted: Wed Aug 07, 2013 1:19 am    Post subject: Reply with quote

Thanks for your post! I'm afraid I'm not immediately sure what could be wrong. It's possible this is another issue with having multiple log4net versions in the VS environment (as the issue here: http://www.red-gate.com/messageboard/viewtopic.php?t=15925 )

But if this is not the case, could you please try a team build with all SmartAssembly options turned off for your assembly and see if the failed build persists?
_________________
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group