我有一个包含CSharp和Python项目的解决方案,放在一个特定的文件夹中。
我刚刚在该文件夹的根目录下添加了一个名为Directory.Build.targets的文件,内容如下:
<Project>
<ItemGroup>
<ProjectReference Include="..\..\Shared.csproj" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Debug'">
... commands
</Target>
</Project>
然后,当我再次运行VisualStudio时,由于Python项目,在输出中出现了一些错误:
..[路径][项目名称].pyproj:错误:无法识别的Guid格式。
您有什么想法可以从Directory.Build.targets中排除Python项目吗?