如何读取CodeAnalysisLog XML文件?
我正在尝试在 TFS 2010 中自动构建的构建后事件上自动触发名为 NDepend 的代码分析软件(如果您想了解更多详细信息,请参阅 这个)。
我将此代码添加到:
<Target Name="NDepend" >
<PropertyGroup>
<NDPath>c:\tools\NDepend\NDepend.console.exe</NDPath>
<NDProject>$(SolutionDir)MyProject.ndproj</NDProject>
<NDOut>$(TargetDir)NDepend</NDOut>
<NDIn>$(TargetDir)</NDIn>
</PropertyGroup>
<Exec
Command='"$(NDPath)" "$(NDProject)" /OutDir "$(NDOut)" /InDirs "$(NDIn)"'/>
</Target>
就像我之前的一次尝试中所做的那样。它构建得很好,没有错误,但我没有看到任何 NDepend 正在运行的迹象。然而,凭直觉,我决定检查自动构建中的放置文件夹,并发现一些标记为“blah.CodeAnalysisLog”的 XML 文件,而且我不记得以前的版本中存在这些文件,因此我尝试打开它们,认为这可能是 NDepend 分析。但是当我单击它时,Internet Explorer 显示如下:
无法显示 XML 页面
无法使用 XSLT 样式表查看 XML 输入。请更正错误,然后单击“刷新”按钮,或稍后重试。
访问被拒绝。
有人经历过这个问题吗?如果是这样,是什么原因造成的?这与我上面添加的 NDepend XML 有关吗?或者这个错误与我添加的 NDepend XML 完全无关?
I'm trying to automatically trigger a code analysis software called NDepend on the postbuild event of an automated build in TFS 2010 (If you'd like more details on this, please see this).
I added this code in:
<Target Name="NDepend" >
<PropertyGroup>
<NDPath>c:\tools\NDepend\NDepend.console.exe</NDPath>
<NDProject>$(SolutionDir)MyProject.ndproj</NDProject>
<NDOut>$(TargetDir)NDepend</NDOut>
<NDIn>$(TargetDir)</NDIn>
</PropertyGroup>
<Exec
Command='"$(NDPath)" "$(NDProject)" /OutDir "$(NDOut)" /InDirs "$(NDIn)"'/>
</Target>
Much like I did in one of my attempts previously. It built fine, no errors, but I didn't see any immediate signs of the NDepend running. However, on a hunch, I decided to check the drop folder from the automated build and I found some XML files labeled "blah.CodeAnalysisLog" And I didn't recall these being there in previous versions, so I tried to open them, thinking it might be the NDepend analysis. But when I clicked it, Internet Explorer displayed as follows:
The XML page cannot be displayed
Cannot view XML input using XSLT style sheet. Please correct the error and then click the Refresh button, or try again later.
Access is denied.
Has anyone experienced this issue? And if so, what is causing it? Is it something to do with the NDepend XML I added above? Or is this error completely unrelated to the NDepend XML I've added?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您收到的错误消息是因为 IE 不知道如何呈现 XML。尝试在记事本中打开 blah.CodeAnalysisLog。
The error message that you're getting is because IE doesn't know how to render the XML. Try opening the blah.CodeAnalysisLog in notepad.