Problem
Publishing a classic (non-SDK) ASP.NET project that targets .NET Framework fails in Rider on Windows. The build output shows one of these errors:
error MSB4057: The target "WebPublish" does not exist in the project.
Current toolset does not support publishing for non-Core ASP.NET projects
The build log shows that the build runs with the MSBuild bundled with Rider, for example C:\Users\user\AppData\Local\Programs\Rider\tools\MSBuild\Current\Bin\amd64\MSBuild.exe.
Cause
The MSBuild bundled with Rider does not include the web publishing targets for .NET Framework ASP.NET projects. These targets ship only with Visual Studio and Visual Studio Build Tools. When neither is installed, the auto-detected MSBuild is the bundled one, and publishing fails.
Resolution
- Install Build Tools for Visual Studio 2026 with the Web development build tools workload, or install Visual Studio. Check the Visual Studio Build Tools license terms before installing.
- Restart Rider.
- Navigate to Settings | Build, Execution, Deployment | Toolset and Build.
- In MSBuild version, select the MSBuild from Visual Studio or Visual Studio Build Tools, for example
C:\Program Files\Microsoft Visual Studio\{year}\{edition}\MSBuild\Current\Bin\amd64\MSBuild.exe. - Click Save.
- Publish the project.
Comments
0 comments
Please sign in to leave a comment.