What must I do with a solution file showing under my web site?
I have just been handed an ASP.NET web site project, without a parent solution. I created a new solution, and added the web site project under the solution, as I am always more comfortable grouping all my work under a solution, even project-less web sites. Now, when I open the solution, then expand the web site folder, I see the solution file appears under the web site folder, yet I have checked and it isn't duplicated here. How do I get rid of the solution file item under the web site?
OUTCOME: It turns out that I somehow confused folders and had both my solution and web site under the same folder, and as Chris Lively says below, all files under a web site appear in solution explorer.开发者_Python百科
If you really want a solution, create the solution file one directory up from where the website is.
Website projects are going to automatically include every file it finds along the site path. If your solution file is in the same directory, then it is going to be added.
My recommendation is to move the solution file, then convert it to a web application project.
Use a text editor to remove the nested projects entry and corresponding project entry like this ("Tests" here is a solution folder) from the .sln
file:
ASP.net web sites do not require solutions. Just open the code in visual studio as a web site.
The perception that they require a solution comes from the old days. No longer the case.
I assume this is not MVC. Because MVC does require a project.
精彩评论