3

On Visual Studio 2010, when i create ASP.NET Web Site Project, every times i add or remove any files, i can refresh via project explorer to refresh the folder contents,

however, if i create Web Application Project, it doesn't refresh the contents, is it bug of VS or other reason i need manually ?

1 Answer 1

7

Make sure that the "Show All Files" option in the Solution Explorer toolbar is selected.

A Web Application project is a proper Visual Studio project that maintains a .csproj (or .vbproj) file that lists the files in the project so it knows what to compile when it produces a .dll file. This doesn't happen with a Web Site Project.

If there are files in the folder which aren't in the project that your site depends on (such as images, or files that you create in an external editor), you might want to right-click on them and choose "Include in project". This will make it easier when dealing with deployments, source control systems, etc.

Also, there should be a "Refresh" button in the Solution Explorer toolbar for all project types that you can click - I see it is in the right-click menu for Web Site Projects but not Web Application Projects. For some reason, the (otherwise excellent) Solution Navigator - which is part of the Productivity Power Tools extension doesn't seem to have a refresh button available - this may be the one area I've found where the Solution Explorer is better than the Solution Navigator.

Sign up to request clarification or add additional context in comments.

2 Comments

So,is it mean when i change add/remove files, i need to do in VS2010 one by one to make .csproj keep update?
no, if you're creating files outside VS, right click on them in VS and choose "Include in project", that will do the same thing...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.