Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

ASP.Net project cannot be build with VS2022 after conversion #416

Open
Peter-B- opened this issue Oct 4, 2021 · 0 comments
Open

ASP.Net project cannot be build with VS2022 after conversion #416

Peter-B- opened this issue Oct 4, 2021 · 0 comments

Comments

@Peter-B-
Copy link

Peter-B- commented Oct 4, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant