通过VS项目文件直接运行FxCop
我有兴趣将 FxCop 设置为在开发环境中的每个 VS .csproj 文件上运行,方法是将其作为 .csproj 文件本身的目标调用,而无需为项目创建单独的 MSBuild 文件。这
<Target Name="AfterBuild">
<Exec Command=""C:\Program Files\Microsoft FxCop\FxCopCmd.exe" /searchgac /p:FxCopProject.fxcop /out:FxCopOutput.xml" ContinueOnError="true">
</Exec>
</Target>
是否可以以一种或另一种方式包含在我的 .csproj 文件的末尾?
I am interested in setting up FxCop to run on each of our VS .csproj files in our developing environment by calling it as a target in the .csproj file itself without creating a separate MSBuild file for the project. Is this
<Target Name="AfterBuild">
<Exec Command=""C:\Program Files\Microsoft FxCop\FxCopCmd.exe" /searchgac /p:FxCopProject.fxcop /out:FxCopOutput.xml" ContinueOnError="true">
</Exec>
</Target>
possible to get working in one way or another being included at the tail end of my .csproj file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找构建后事件。
I think you're looking for the post-build event.
以下内容应该有效 - 将其粘贴到节点级别下的任何位置:
请注意我使用的 /d 参数来指向我的项目使用其他程序集的位置(在本例中为 MSTest 单元测试内容)。
The following should work - paste it anywhere at just under the node level:
Note the /d parameter I'm using to point to where my project is using additional assemblies (in this case, the MSTest unit testing stuff).