We are trying to set-up a continuous integration process to build and deploy our project. We're getting an error when running dotnet restore, dotnet build on the server.
error MSB4062: The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly ,,,.nuget\packages\buildwebcompiler\1.11.328\build..\tools\WebCompiler.exe. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
The issue appears to be related to the BuildWebCompiler. As a test, I manually removed that reference, and the project builds. Has anyone gotten an automated build process to work with the .NET Core Version?
3 Answer(s)
-
0
Hi,
Thaks for sharing your experience. I personally don't have any experience on that but I found this issue <a class="postlink" href="https://github.com/dotnet/cli/issues/5457">https://github.com/dotnet/cli/issues/5457</a>. It might give you an idea about this error.
-
0
Just to close the loop in case anyone else runs into this issue. The only way I could ultimately get our Continuous Integration process to build the .NET Core version was to install the Visual Studio 2017 on the server and then use the command:
devenv MyProject.sln /build Release
I'm not wild about installing VS 2017 on our build server, but it works for now.
-
0
Ouch!
I will have the same issue soon and installing VS2017 on the server is NOT an option since we're on Azure App and not dedicated VMs. Please keep us posted if you can. Will do the same.Regards, P