문제

Consider the following directory structure:

MyProject\VS2010\myproject.sln  
MyProject\VS2010\myproject.csproj  
MyProject\src\SourceFile1.cs  
MyProject\src\SourceFile2.cs  

When I add a new file to solution in Visual Studio, it is added to VS2010 folder, however I would like all my source files to be in src folder. The only way I know is to unload the project in Visual Studio, move the files manually, then edit .csproj file to point to the new location.

I was wondering if there is a better way to do this.

도움이 되었습니까?

해결책

It turns out that you can add files to your project without copying them by pressing a little arrow on Add button in Add Existing Item dialog and selecting Add as a link. This will add a file to your project leaving it where it is.

Add as a link

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top