0

We have two ASP.Net projects that we maintain with Visual Studio 2019.

The first project was originally built 10+ years ago and has been upgraded from one Visual Studio version to the next over the years. Everything runs fine.

The second project is a brand new project created with Visual Studio 2019. There are several web forms that we would like to import from the first project to the second project.

The Problem: Those web forms from the first project don't have a "aspx.designer.cs" files - each form only consists of an "aspx" and an "aspx.cs" file. And when they're in that first project everything's fine. They compile and they run fine. If we right-click and go the definition of any of the declarative objects in the "aspx.cs" file a window pops up saying it can't navigate to the symbol - which is fine. Everything works.

BUT... When those web forms are imported to the second project, all of the declarative objects show as being undefined - there's no "aspx.designer.cs" file where they'd normally be defined.

Any thoughts? How can we import and actually use these web forms in the newer project? Do we have to go and manually create that "aspx.designer.cs" file for each web form? There's quite a few of them...

Thanks! Curt

1 Answers1

1

All these effects are expected. An older/legacy site is represented by the "ASP.NET WebSite" template/structure, while the newer one - the "ASP.NET Web Application".

Check out the following threads to find differences and possible hints for migration (in short - move files as is, correct some @Page directives and code namespaces, switch to the ASPX Design View to re-generate the associated Designer file):

ASP.NET Web Site or ASP.NET Web Application?

Web Application Projects versus Web Site Projects in Visual Studio

Mikhail
  • 9,186
  • 4
  • 33
  • 49