MSBuild error MSB4018: The "GenerateResource" task failed unexpectedly - msbuild

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).

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.

What causes the WIX error: 'The "GenerateHarvestedSourceFiles" task failed unexpectedly.'?

I am seeing this error in some of my .wixproj project files being compiled in Visual Studio 2015 using WiX Toolset v3.11.0.1701 and WiX Expansion Pack v3.11.26. The stack trace is of a duplicate key insertion error.
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: The "GenerateHarvestedSourceFiles" task failed unexpectedly.
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: System.ArgumentException: An item with the same key has already been added.
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.ExpandHarvestDirectivesCommand.ExpandComponentElement(XName directiveType, String directiveId, WixComponent element, IEnumerable`1 files, String keyId, String keyPathNameSeed, HeatWaveHarvestStrategy strategy, Boolean suppressFont, Dictionary`2 generatedFolders)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.ExpandHarvestDirectivesCommand.ExpandElement(XName directiveType, String directiveId, String documentPath, WixElement element, IEnumerable`1 files, String keyId, String keyPathNameSeed, HeatWaveHarvestStrategy strategy, Boolean suppressFont, Dictionary`2 generatedFolders)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.ExpandHarvestDirectivesCommand.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.Commands.HarvestToSourceFilesCommand.ExpandDocumentsWithHarvestDirectives(IEnumerable`1 directives)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.Commands.HarvestToSourceFilesCommand.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.GenerateHarvestedSourceFiles.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

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)
**

Build failed in Appharbor - The "EnsureBindingRedirects" task failed unexpectedly

I've been trying to build my first application on appharbor through bitbucket, but the build process fails with the following message.
Build started 12/3/2014 7:22:41 PM.
1>Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz_git.sln" on node 1 (default targets).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
The target "MvcBuildViews" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (839,131)" does not exist in the project, and will be ignored.
1>Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz_git.sln" (1) is building "D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj" (2) on node 1 (default targets).
2>PrepareForBuild:
Creating directory "obj\Release\".
2>D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: The "EnsureBindingRedirects" task failed unexpectedly. [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: System.IO.FileNotFoundException: Referenced assembly does not exist. [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: File name: 'D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll' [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Roxel.BuildTasks.EnsureBindingRedirects.d__6.MoveNext() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source) [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Roxel.BuildTasks.EnsureBindingRedirects.Execute() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
2>Done Building Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj" (default targets) -- FAILED.
1>Done Building Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz_git.sln" (default targets) -- FAILED.
Build FAILED.
I have tried many things, like updating all the dependent assemblies with the neutral culture in web.config, or including the dll files in the repository, or even changing the project file to include the Condition.Exists in the Import Project tag, but I keep getting an error.
What am I missing?
Regards

Unable to webdeploy from TeamCity 8 error MSB4018: The "IsCleanMSDeployPackageNeeded" task failed unexpectedly

I try to create build configuration for automation project web deploying. Deploying from dev machine works well but there is an exception when running from TeamCity
msbuild.exe d:\projectsnet\testproject\src\testproject.Web\testproject.Web.csproj /P:Configuration=Production /P:DeployIisAppPath="apps.local.company.eu/testproject" /P:DeployOnBuild=True /P:DeployTarget=MSDeployPublish /P:MsDeployServiceUrl=https://production.local.company.eu:8172/msdeploy.axd /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMSvc /P:CreatePackageOnPublish=True /P:UserName=COMPANY\webdeploy /P:Password=webdeploy
[15:39:37][src\testproject.Web\testproject.Web.csproj.teamcity] PipelinePreDeployCopyAllFilesToOneFolder
[15:39:37][src\testproject.Web\testproject.Web.csproj.teamcity] GenerateMsdeployManifestFiles
[15:39:37][GenerateMsdeployManifestFiles] GetPublishingLocalizedString
[15:39:37][GenerateMsdeployManifestFiles] CallTarget
[15:39:37][CallTarget] CheckAndCleanMSDeployPackageIfNeeded
[15:39:37][CheckAndCleanMSDeployPackageIfNeeded] IsCleanMSDeployPackageNeeded
[15:39:38][IsCleanMSDeployPackageNeeded] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850, 5): error MSB4018: The "IsCleanMSDeployPackageNeeded" task failed unexpectedly. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion() at Microsoft.Web.Publishing.Tasks.Common.Utility.get_IsMSDeployInstalled() at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion(Task task) at Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
[15:39:38][src\testproject.Web\testproject.Web.csproj.teamcity] Project src\testproject.Web\testproject.Web.csproj.teamcity failed.
[15:39:38][Step 1/1] Process exited with code 1
[15:39:38][Step 1/1] MSBuild output
[15:39:38][MSBuild output] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion(Task task) [C:\TeamCity\buildAgent\work\9eabf555ebf4c4ed\src\testproject.Web\testproject.Web.csproj.teamcity]
[15:39:38][MSBuild output] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded.Execute() [C:\TeamCity\buildAgent\work\9eabf555ebf4c4ed\src\testproject.Web\testproject.Web.csproj.teamcity]
[15:39:38][MSBuild output] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\TeamCity\buildAgent\work\9eabf555ebf4c4ed\src\testproject.Web\testproject.Web.csproj.teamcity]
[15:39:38][MSBuild output] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) [C:\TeamCity\buildAgent\work\9eabf555ebf4c4ed\src\testproject.Web\testproject.Web.csproj.teamcity]
[15:39:38][MSBuild output] Done Building Project "C:\TeamCity\buildAgent\work\9eabf555ebf4c4ed\src\testproject.Web\testproject.Web.csproj.teamcity" (Build target(s)) -- FAILED.
Ok, If you would like to deploy web apps using Web Deploy from TeamCity make sure that http://www.iis.net/downloads/microsoft/web-deploy Web Deploy is installed on Teamcity server ...