Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top