Read-only projects in Visual Studio?
Would there be any reason that VS would prohibit you to "Add existing file" to lets say a folder inside an assembly?
Is it protected somehow? If so how and where is this done and how can I see if thi开发者_StackOverflows is the case?
There are some missing .cs class files in one of these folders that should be included in this project and I try adding them back in and get nothing, nothing happens...it doesn't show them added in VS.
Is the project file marked "read only" if you check its properties? Double-check the project file just in case.
Also, try reloading the project. Or click the button at the top of the Solution Explorer that shows all files on disk and try including files through right-clicking them and selecting "Add to project".
And if all else fails, manually edit the csproj file. :)
Beyond the obvious that adding files/modifying the project is disabled while the project is running, there shouldn't be any reason not to be able to - Is the option greyed out/do you get an error?
The add operation could be failing for any of the following reasons:
- Source control is enabled on the project, and you have not checked out the project file.
- You are currently debugging something.
- A Visual Studio extension is attempting to "hook" the add command, and throwing an exception while handling the command which causes the project system to abort the operation.
Try selecting the affected project in Solution Explorer, and then clicking the Show All Files button at the top of Solution Explorer. You should see the source files appear in the appropriate folder, which you can then right click and select Include In Project.
精彩评论