try-convert
try-convert copied to clipboard
ASP.Net project cannot be build with VS2022 after conversion
Hello,
I ran try-convert
no a solution containing a ASP.Net project to migrate other projects to SDK-style csprojs.
Building the project in VS2022 without VS2019 installed on the machine failed. According to this discussion on DeveloperCommunity, there was a wrong item added to the .csproj file of the ASP.Net project:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" />
should be replaced with
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
to avoid dependency on a specific Visual Studio version.
Does this make sense?
Kind regards Peter