Search code examples
c#asp.netvs-web-application-projectvs-web-site-project

Converting an asp.net web site project type to a regular project


I've created a new vs.net project and added all the files from an asp.net website project.

When I compile, it couldn't find a reference to a class.

In the AppCode the class was defined, but without a namespace.

So I added a namespace, and then on the default.aspx.cs (this is where the error was originating) I added the using statement.

The using statement was not picking up the namespace.

What could the issue be?


Solution

  • If I were you, I'd start from scratch. Web site "projects" are very different from every other actual project type in Visual Studio, that it may not be worth the trouble of "converting".

    I'd go as far as to create an empty project and starting over. You could copy and paste the .aspx and .ascx files, but any codebehind needs to be separately copied and pasted, possibly method by method.