Edit

Share via


MSB4278 diagnostic code

This article describes the MSB4278 error code.

Message text

MSB4278: The imported file 'value' does not exist and appears to be part of a Visual Studio component. This file may require MSBuild.exe in order to be imported successfully, and so may fail to build in the dotnet CLI.

Remarks

This error occurs when you're using dotnet build and trying to import a file, but the imported file requires Visual Studio build files, which dotnet build doesn't have access to. For example, this occurs when you try to build an older project that isn't an SDK-style project (it doesn't have the Sdk attribute on the Project element) with dotnet build. The dotnet build command can only build SDK-style projects. See Use MSBuild project SDKs.

This error can also occur if you try to build a C++ project (.vcxproj) with dotnet build.

Resolution

Use MSBuild.exe or Visual Studio to build the project. Check that Visual Studio is installed on the build machine, and that you have the .NET Desktop development workload installed.

Applies to

All versions of MSBuild