Question

I'm trying to convert a Web Site Project to a Web Application Project. I've RTFM'd all over the place, and looked through all the walkthroughs, but Visual Studio is just being obstinate about something --

It doesn't seem to have a reference to its own assembly -- the assembly it will create when it builds. When I try to build, it throws an error for missing namespaces for code contained in CS files in the project itself -- code that would compile up to the core DLL of the project.

It's a chicken/egg problem -- VS wants that DLL to reference before it will build, but it needs to build to get the DLL.

To convert, I create a new web app project, imported all the files, and did the "Convert to Web Application..." on all the ASPX files and on the project file itself.

Still, VS is convinced it doesn't have the code it needs to build, and refuses to acknowledge that the code is in the source of the project itself.

Was it helpful?

Solution

Found it. All of the CS files I brought in were marked as "Content" under Build Action. They needed to be changed to "Compile."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top