NUnit 2.4.6 unable to find log4n 1.2.10 when launched from NAnt 0.91-alpha2 - msbuild

I have a .NET 3.5 web application, and I am adding Silverlight 4. I can build and test the whole project in VS 2010. My assemblies still targets 3.5. I had to upgrade NAnt from .85 to .91-alpha2 to get the build to work at all, and I had to use an call to msbuild v4.0.30319 rather than NAnt's task. That all works now (though if anybody has suggestions for improvement, I'm open to them).
After the build, NAnt launches unit tests. My problem is that it immediately fails because NUnit can't find the right log4n.dll. The output is below (elipses added to obfuscate some folder names). NAnt uses log4n 1.2.9, and NUnit uses 1.2.10. Each application has the correct version in its install directory. NAnt loads its version, which is in use when it launches NUnit, but I don't see why there is a conflict. I suspect the problem has something to do with NAnt .91-alpha2, and I can't think of a work-around.
[exec] Unhandled Exception:
[exec] System.TypeInitializationException: The type initializer for 'NUnit.Core.RemoteTestRunner' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821'
or one of its dependencies. The system cannot find the file specified.
[exec] File name: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821'
[exec] at NUnit.Core.RemoteTestRunner..cctor()
[exec]
[exec] Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
[exec] Running under executable C:\Program Files\NUnit 2.4.6\bin\nunit-console.exe
[exec] --- A detailed error log follows.
[exec]
[exec] === Pre-bind state information ===
[exec] LOG: User = ...
[exec] LOG: DisplayName = log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821
[exec] (Fully-specified)
[exec] LOG: Appbase = file:///c:/AutomatedBuild/sourcecode/.../bin/Debug
[exec] LOG: Initial PrivatePath = NULL
[exec] Calling assembly : nunit.core, Version=2.4.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77.
[exec] ===
[exec] LOG: This bind starts in default load context.
[exec] LOG: No application configuration file found.
[exec] LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
[exec] LOG: Post-policy reference: log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821
[exec] LOG: Attempting download of new URL file:///c:/AutomatedBuild/sourcecode/.../bin/Debug/log4net.DLL.
[exec] LOG: Attempting download of new URL file:///c:/AutomatedBuild/sourcecode/.../bin/Debug/log4net/log4net.DLL.
[exec] LOG: Attempting download of new URL file:///c:/AutomatedBuild/sourcecode/.../bin/Debug/log4net.EXE.
[exec] LOG: Attempting download of new URL file:///c:/AutomatedBuild/sourcecode/.../bin/Debug/log4net/log4net.EXE.
[exec]
[exec] --- End of inner exception stack trace ---

According the OP, the error was resolved by updating NUnit:
NUnit 2.4.6 was broken by something I installed, because I get the error when I run the NUnit GUI alone. I do not get the error on a new version I installed (2.5.7).

Related

Dotfuscator: Couldn't find Microsoft.AspNetCore.Hosting.Abstractions Version=3.0.0.0

Dotfuscator was working fine until today. I cannot figure out why.
My project type is aspnetcore 3.0. Publish using the following command:
dotnet publish --self-contained -c Release -r linux-x64
The error output is:
[Build Output] Renaming...
[Build Output]
[Build Output] Updating Markup...
[Build Output]
[Build Output] Writing map file to C:\code\quant\Dotfuscated\Map_win.xml
[Build Output]
[Smart Obfuscation] User Type QuantWS.Startup was excluded from renaming by AspNetStartupRule for the following reasons: Type is an ASP.NET Core Startup Type.
[Build Output] Writing Assemblies...
[Build Output]
[Build Output] Couldn't load external type because its assembly can't be found: Microsoft.AspNetCore.Hosting.IWebHostBuilder,Microsoft.AspNetCore.Hosting.Abstractions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
=== Pre-bind state information ===
C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\QuantWS.dll
LOG: DisplayName = Microsoft.AspNetCore.Hosting.Abstractions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Appbase = C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64
LOG: Processing DEVPATH.
LOG: DEVPATH not enabled. Falling through to regular bind.
LOG: Checking Cache
LOG: Assembly not found in cache.
LOG: Codebase not set.
LOG: Processing CodeBase
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral
LOG: Probing C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd LOG: Not found in Windows Kit Folder.
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\10\References
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\10\References\10.0.17134.0
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions\3.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Not found in Windows Kit Folder.
LOG: Checking AssemblyFoldersEx paths for runtime version v4.0.30319.
LOG: Probing C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not Found in AssemblyFoldersEx paths.
LOG: Checking AssemblyFolders paths.
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not Found in AssemblyFolders paths.
LOG: Checking Visual Studio AssemblyFolders paths.
LOG: Not Found in Visual Studio AssemblyFolders paths.
LOG: Looking in GAC
LOG: Assembly not found in GAC
LOG: Probing AppBase
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.exe
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.exe
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.exe.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.exe.deploy
LOG: Probing Private Bin Path
LOG: Bin Path not set
LOG: Processing User Defined Assembly Load Path.
LOG: The User Defined Assembly Load Path is not set.
LOG: Checking Reference Assemblies folders.
LOG: Not found in Reference Assemblies folders.
LOG: Checking NuGet Folder : C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.2.0\lib\netstandard2.0
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions\2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64\3.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64\3.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64\3.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64\3.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.0.0\lib\netstandard2.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Not found in NuGet folders.
LOG: Checking additional folder : C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Checking additional folder : C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8
LOG: Probing C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not found in additional folders.
LOG: Loose binding enabled. Probing for later versions.
When I look up IWebHostBuilder in Visual Studio, it is in
C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\3.0.0-preview7.19365.7\ref\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll. The same file is also in the publish output directory. But Dotfuscator just cannot accept them and says Strong name match failed.
It was all right until today. If I downgrade the project to aspnetcore 2.2, the problems will be gone. Can anybody help?
Note: I am answering in my professional capacity as an employee of the developer of Dotfuscator
Dotfuscator automatically attempts to locate reference assemblies in locations it knows about, but Microsoft has recently added some new ones (.NETCore 3.0 is a preview after all!). Future Community updates will add this new location which will address this automatically, but for now the correct workaround is to manually add the new location to Assembly Load Paths (which you have already done).
The issue with loading the copy of the assembly in the publish folder appears to be due to an issue with the Full Framework processing non-Windows assemblies, this limitation should be addressed in future Dotfuscator updates.

SQL Build Task :error MSB4018: Microsoft.Isam.Esent.Interop.EsentVersionStoreOutOfMemoryException

I am not getting any Errors when i Build the Project in My Solution File,but when it was about to Deploy in Testing Environment it says below Error.
What could be the Reasons and How to avoid this in Future.
**error MSB4018: The "SqlBuildTask" task failed unexpectedly.
[msbuild] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(550,5): error MSB4018: Microsoft.Isam.Esent.Interop.EsentVersionStoreOutOfMemoryException: Version store out of memory (cleanup already attempted)
**

MSBuild error MSB4018: The "GenerateResource" task failed unexpectedly

I try to build a solution with MSBuild command line (on a clean machine) when only Build Tools 2015, .NET developer pack and .NET SDK are installed I get following error:
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: The "GenerateResource" task failed unexpectedly.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.ResGenDependencies.GetResXFileInfo(String resxFile)
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath)
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List`1& inputsToProcess, List`1& outputsToProcess, List`1& cachedOutputFiles)
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute()
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
What's wrong?
Delete all build outputs and build again.
Suggested from Rainer Sigwald (https://github.com/Microsoft/msbuild/issues/364).

Error in creating Jitsi windows Installer following http://stackoverflow.com/questions/14495465/installer-for-jitsi-sip-communicator/22658530#22658530

I am trying to make Jitsi installer, following
Installer for Jitsi SIP Communicator
but facing following error
wix-sign-file:
[exec] setup.msi: 52.3 MiB / 199.0 MiB = 0.263, 1.2 MiB/s, 2:44
[exec] process_begin: CreateProcess(NULL, rm.exe -f ../../../../resources/install/windows/config.h, ...) failed.rm.exe -f ../../../../resources/install/windows/config.h
[exec]
[exec] make (e=2): The system cannot find the file specified.Makefile:69: recipe for target 'E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/config.h' failed
[exec]
[exec] echo #define PRODUCTNAME "Jitsi" > E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/config.hmake.exe: [E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/config.h] Error 2 (ignored)
[exec]
[exec] echo #undef PACKAGECODE >> E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/config.h
[exec] echo #undef PACKAGESIZE >> E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/config.h
[exec] echo #define PRODUCTBUILDVERSION "1.1.0.9" >> E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/config.h
[exec] C:/mingw/bin/windres.exe -I../../../../resources/install/windows -IE:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp setup.rc -O coff -o E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/setup.res
[exec] 'C:' is not recognized as an internal or external command,
[exec] operable program or batch file.
[exec] 'C:' is not recognized as an internal or external command,
[exec] operable program or batch file.
[exec] C:/mingw/bin/gcc.exe -O2 -Wall -Wreturn-type -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -IE:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp -DBSPATCH_API_STATIC -DBZ2_API_STATIC -I. -IC:\MinGW\bzip2/include -IC:\MinGW\bzip2 -DLZMA_API_STATIC -IC:\MinGW\xz/include -IC:\MinGW\xz/api -I../run bspatch.c lasterror.c nls.c ../run/registry.c setup.c E:\JZ\Code\JavaCode
\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/setup.res -mwindows -LC:\MinGW\bzip2/lib/ -LC:\MinGW\bzip2 -LC:\MinGW\xz/lib/ -LC:\MinGW\xz/.libs -o E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/setup.exe -ladvapi32 -lbz2 -llzma -lole32 -lshell32
[exec] Makefile:63: recipe for target 'E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/setup.exe' failed
[exec] c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -llzma
[exec] collect2.exe: error: ld returned 1 exit status
[exec] make.exe: *** [E:\JZ\Code\JavaCode\jitsilatest\LANJr4D-jitsi-b56f30acd2d1/release/windows/tmp/setup.exe] Error 1
BUILD FAILED
Although i have xz package in C:/MingW/xz and also set the environment variable for it LZMA_HOME
Thanks
JZ
For this error you have to have /src/native/windows/setup in your PATH. Then copy either /src/native/windows/setup/lib/x64/libbz2.a or /src/native/windows/setup/lib/x86/libbz2.a and libllzma.a files into /src/native/windows/setup/lib. Remove all other path and system variable references to bzip2 and lzma. You do not need xz or bzip2 anymore since the files are included at the above location and the xz.exe executable is included at /resources/install/windows. If you use the external bzip2 like all the internet instructions say, you will get bzip2.dll errors when you finally do manage to make the installer and try run the executable.
All the instructions on the internet are obsolete/wrong. All of them. Every single one! NOBODY has bothered to point this out anywhere. NOBODY. You will not even find any info in the dev or user mail lists. Only little breadcrumbs of current info here and there. I had to figure this little gem out on my own. Took me several days. Fun times.
This isn't the only wrong thing in all the instructions. I am still working through them all. Once I get a perfect install I'll try add updated instructions somewhere.
I can get it to compile but the executable will crash. If I use 64bit Java on the 32bit executable then I can get it to run. So there is still something wrong with the C wrapper. No information anywhere. Everyone who has posted the same problem has not had any response and are all in the same boat.

TopShelf MSDeploy Install Exit Code On Error

I'm trying to install a service using TopShelf from CI. However whenever an exception occurs during installation, TopShelf rollsback the transaction and continues with the build process, returning a 0x0 status.
This means that as far as the CI server is concerned, the deployment was successful.
An example of the command I'm using in MSBuild is:
<Message Text ="Installing Service" />
<Exec Command=""$(MSDeployPath)" -verb:sync -source:runCommand="$(RemoteServicePath) install /instance:$(DeployEnvironment)",dontUseCommandExe=false,waitAttempts=10,waitInterval=10000 -dest:auto,computername=%(ComputerName) -verbose -retryInterval:10000 -retryAttempts:10"></Exec>
The output I receive is:
[Exec] Running a transacted installation. <br>
[Exec] <br>
[Exec] Verbose: Received response from agent (HTTP status 'OK'). <br>
[Exec] Info: <br>
[Exec] Beginning the Install phase of the installation. <br>
[Exec] <br>
[Exec] Info: Installing service Foo...<br>
[Exec] <br>
[Exec] Info: Creating EventLog source Foo in log Application...<br>
[Exec] <br>
[Exec] Info: <br>
[Exec] An exception occurred during the Install phase.<br>
[Exec] <br>
[Exec] Info: System.ComponentModel.Win32Exception: The specified service already exists<br>
[Exec] <br>
[Exec] The Rollback phase of the installation is beginning.<br>
[Exec] Restoring event log to previous state for source Foo.<br>
[Exec] <br>
[Exec] The Rollback phase completed successfully.<br>
[Exec] <br>
[Exec] The transacted install has completed.<br>
Any ideas how I can make the build fail on the exception?
The latest release of Topshelf (3.0.2) added a TopshelfExitCode, which is an enum that can be cast to an (int) and returned from Main in your console application.
If install/uninstall fails, the error code is non-zero (the enumeration has all the possible values). So now it should play nicely with batch files/builds expecting non-zero exit codes when things don't install properly.