无法让 TeamCity FxCop Build Runner 工作

发布于 2024-07-21 01:18:40 字数 239 浏览 5 评论 0原文

关于如何消除此错误消息有什么想法吗?

无法运行进程 E:\Program Files\Microsoft FxCop 1.36\FxCop.exe\FxCopCmd.exe /forceoutput /gac /ignore generatedcode /f:\Sacog\bin\Debug\Sacog.dll /out:05A1B22A-DE6E-49ae-AA30- DC52A074EF22\fxcop-result.xml:找不到文件

Any ideas as to how to make this error message go away?

Cannot run process E:\Program Files\Microsoft FxCop 1.36\FxCop.exe\FxCopCmd.exe /forceoutput /gac /ignoregeneratedcode /f:\Sacog\bin\Debug\Sacog.dll /out:05A1B22A-DE6E-49ae-AA30-DC52A074EF22\fxcop-result.xml : file not found

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦忆晨望 2024-07-28 01:18:41

您是否在运行程序配置中设置了“FxCop 安装根目录”设置?

如果有,请从末尾删除 FxCop.exe。

如果没有,您可以在此处发布 FxCop 构建页面中“设置”选项卡的内容吗?

Have you set "FxCop installation root" setting in the runner configuration?

If you have, please remove FxCop.exe from the end.

If not, could you post here the content of Settings tab from your FxCop build page?

烏雲後面有陽光 2024-07-28 01:18:41

FxCop 正在尝试在 BuildAgent 驱动器的根目录下测试代码...开关

/f:\Sacog\bin\Debug\Sacog.dll

正在尝试从该驱动器的根目录获取 Sacog.dll。 这可能来自您在 TeamCity 中配置供 FxCop 分析的文件列表。 删除“构建配置/步骤 3:运行器”配置屏幕上“程序集”部分中文件名开头的 \

FxCop is attempting to test code at the ROOT of the BuildAgent's drive... the switch

/f:\Sacog\bin\Debug\Sacog.dll

Is trying to get Sacog.dll from the root of that drive. This is probably from the list of files that you have configured in TeamCity for FxCop to analyze. Remove the \ at the beginning of the file name in the "Assemblies" section on the "Build Configuration / Step 3: Runner" configuration screen.

迷途知返 2024-07-28 01:18:41

只需将 FXCop 路径添加到 PATH 环境变量即可。

另外,NAnt contrib 有一个 fxcop 任务。 像这样使用它:

  <loadtasks>
    <fileset basedir="${environment::get-variable('NAntContribHome')}">
      <include name="NAnt.Contrib.Tasks.dll" />
    </fileset>
  </loadtasks>


  <target name="fxCop" depends="compile">
    <fxcop analysisReportFilename="fxCopResults.xml" failOnAnalysisError="false" >
      <targets>
        <includes name="BinaryToAnalyse.dll" />
      </targets>
      <rules>
        <includes name="C:\Program Files\Microsoft FxCop 1.36\Rules\*Rules.dll" />
      </rules>
    </fxcop>
  </target>

Just add the FXCop path to the PATH environment variable.

Also, NAnt contrib has a fxcop task. Use it like so:

  <loadtasks>
    <fileset basedir="${environment::get-variable('NAntContribHome')}">
      <include name="NAnt.Contrib.Tasks.dll" />
    </fileset>
  </loadtasks>


  <target name="fxCop" depends="compile">
    <fxcop analysisReportFilename="fxCopResults.xml" failOnAnalysisError="false" >
      <targets>
        <includes name="BinaryToAnalyse.dll" />
      </targets>
      <rules>
        <includes name="C:\Program Files\Microsoft FxCop 1.36\Rules\*Rules.dll" />
      </rules>
    </fxcop>
  </target>
得不到的就毁灭 2024-07-28 01:18:40

我必须在 buildAgent.properties 文件

系统中设置以下内容。FxCopRoot=c:\\Program Files (x86)\\Microsoft FxCop 1.36

确保转义冒号和反斜杠。

然后,我必须从 bin 文件夹的编译构建配置中创建一个工件,其中包含我想要 FxCop 查看的程序集。 然后我必须在 FxCop 构建配置中创建对该工件的工件依赖项; 否则,没有任何可用于 FxCop tp 操作的程序集。

这对我来说很有效。

I had to set the following in buildAgent.properties file

system.FxCopRoot=c:\\Program Files (x86)\\Microsoft FxCop 1.36

Make sure to escape the colon and backslashes.

Then I had to create an artifact from my compile build configuration of the bin folder containing the assemblies I wanted FxCop to look at. Then I had to create an artifact dependency on that artifact in the FxCop build configuration; otherwise there were not any assemblies available for FxCop tp operate on.

That did the trick for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文