kyleb
kyleb

Reputation: 2050

Issues compiling older ASP.NET Webforms app in .NET 4.8.1 in Visual Studio 2022

I originally had an old site building in Visual Studio 2019, but since getting a new laptop and going to Visual Studio 2022, it won't build any longer and I get the below errors shown in the screenshot.

It was originally written in .NET 3.5 using ASP.NET Webforms. Then I switched to .NET 4.8.1 and it ran in Visual Studio 2019. Now it won't run or build in VS 2022. It only errors on one of the projects it seems - a project library.

enter image description here

Upvotes: 0

Views: 210

Answers (1)

Albert D. Kallal
Albert D. Kallal

Reputation: 49204

First, make sure all of the workflows are installed for webforms development. (the project templates are not installed by default).

Hence, these:

enter image description here

Next up?

Make sure you have a reference to Microsoft.CSharp.

If not, then right click on references, and add it:

enter image description here

Upvotes: 1

Related Questions