Skip to content

Error on rebuild with Visual Studio 17.3.2+ #110

@IvanMarkDebono

Description

@IvanMarkDebono

Problem with a Blazor server-side app. The csproj has the following:

<PropertyGroup> <PrepareForBuildDependsOn>WebCompile</PrepareForBuildDependsOn> </PropertyGroup>

Describe the bug
When rebuilding with Visual Studio 17.3.2, the rebuild fails with the following errors:

MSB4057 The target "WebCompile" does not exist in the project.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 1193

The "WebCompiler.CompilerBuildTask" task could not be loaded from the assembly C:\Users\xxx.nuget\packages\buildwebcompiler2022\1.14.13\build..\tools\net4.8\WebCompiler.exe. Could not load file or assembly 'file:///C:\Users\xxx.nuget\packages\buildwebcompiler2022\1.14.13\tools\net4.8\WebCompiler.exe' or one of its dependencies. The system cannot find the file specified. Confirm that the 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.

Expected behavior
The rebuild should be successful with the latest versions of Visual Studio.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR Welcomepull requests are welcomed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions