-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hi,
Great job on putting these together. I have using SDK projects for our .NET 4.8 projects but had some issues with our MVC projects. With the help from the work you have done plus the long running thread on .NET project system site (dotnet/project-system#2670) I was able to get most of it going. One issue I did run into is while trying to implement MvcBuildViews support to run the dotnet tooling for use on our build server. While your projects do work in the Visual Studio they fail to work from dotnet cmd line tools.
dotnet build for instance results in:
C:\Users\xxx.nuget\packages\msbuild.sdk.systemweb\4.0.33\Sdk\Sdk.targets(16,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\5.0.201\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\5.0.201\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk. [c:\Users\xxx\Downloads\MSBuild.SDK.SystemWeb-main\MSBuild.SDK.SystemWeb-main\samples\ExampleEmptyWebApplication\ExampleEmptyWebApplication.csproj]
Build FAILED.
If I remove this property group:
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" />
</Project>
The problem is resolved. Any ideas on how to get this working from the cmd line?