【问题标题】:Jenkins build failing on what looks to be the Nuget Restore step詹金斯在看起来像 Nuget 恢复的步骤上构建失败
【发布时间】:2021-04-13 14:22:36
【问题描述】:

我已经在本地机器上下载并设置了 jenkins 来测试它。

我创建了一个工作来运行自动化框架的一些基本单元测试。我对我看到的这个错误感到困惑。如果我正确阅读了此消息,则表示它在列出的目录中找不到 csproj 文件,但是当我手动导航到它时,每个文件确实都在那里。

我是否错过了作业构建过程中的一个步骤?

MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin'.
C:\WINDOWS\TEMP\NuGetScratch\m224fx2s.f0i.nugetrestore.targets(285,5): error MSB3202: The project file "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\CATS Framework Unit Tests\CATS.Framework\CATS.Framework\CATS.Framework.csproj" was not found. [C:\WINDOWS\TEMP\NuGetScratch\id0uys0i.dbk.nugetinputs.targets] 

【问题讨论】:

    标签: c# jenkins msbuild nuget


    【解决方案1】:

    尝试在两个终端窗口上运行以下命令,一个具有管理员权限,一个没有:

    cd "C:\Windows\System32\config\systemprofile\AppData\Local"
    

    没有管理员权限的人不会让你。我最好的猜测是你的过程没有提升。我会将项目移动到其他文件夹。

    【讨论】:

    • 刚刚验证我能够在管理员/非管理员命令提示符下导航到该目录而没有问题。
    • 有趣。非提升的进程可能无法访问另一个文件夹。您能否尝试在非管理员命令提示符下运行 dir "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\CATS Framework Unit Tests\CATS.Framework\CATS.Framework\" 并检查是否列出了 csproj 文件?
    猜你喜欢
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    • 2014-07-18
    • 1970-01-01
    • 2019-02-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多