Mau*_*tti 9 c# csproj visual-studio
在.csproj文件中,Visual Studio和Xamarin Studio默认保留对项目内使用的每个文件的引用.
<ItemGroup>
<Compile Include="Utils\Foo1Utils.cs" />
<Compile Include="Utils\Foo2Utils.cs" />
<Compile Include="Services\FooService.cs" />
...
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
为了避免在每次添加文件时我们的解决方案中的csproj文件发生冲突,我们开始使用通配符:
<ItemGroup>
<Compile Include="Utils\*.cs" />
<Compile Include="Services\*.cs" />
...
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
问题是,似乎都在Visual Studio和Xamarin Studio是不可能的"解释"对我们使用通配符的IDE,当我们添加一个新的文件到项目中,他们添加一个新的参考文件忽略通配符*.cs上文件夹.它仍然是一个很好的解决方案,因为我们不需要在每次添加文件时都提交.csproj,但现在我们必须每次都重置它们......任何人都知道是否有解决方案?
编辑:与Rider(JetBrains)没有这个问题,如果在csproj中有一个通配符,我添加一个新文件一切正常.
| 归档时间: |
|
| 查看次数: |
2579 次 |
| 最近记录: |