Base solution for your next web application
Open Closed

.NET Core Build Issue with BuildWebCompiler #3044


User avatar
0
cmthomps created

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)
  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    cmthomps created

    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.

  • User Avatar
    0
    pkouame created

    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