Common Files in Visual Studio Solution

北战南征 提交于 2019-12-03 12:33:27

Right click on a project, select Add->Existing Item->Add as link (press on small arrow on Add button)

Thanks @aku!

I knew this could be done, but I didn't know how to do this from Visual Studio. It shows up as a shortcut to the file and the csproj file generates the resulting XML like this:

<Compile Include="..\CommonAssemblyInfo.cs">
  <Link>CommonAssemblyInfo.cs</Link>
</Compile>

I've seen this technique commonly used for common AssemblyInfo files to keep a consistent version.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!