gpt4 book ai didi

c# - CSC : error CS2001: Source file '.NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs' could not be found

转载 作者:太空宇宙 更新时间:2023-11-03 22:57:56 27 4
gpt4 key购买 nike

当开始在我的 Bamboo 服务器上构建时,出现以下错误:

Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Roslyn CSC : error CS2001: Source file 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp.NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs' could not be found. [E:\bamboo-agent-home\xml-data\build-dir\Domain\Domain.csproj] Done Building Project "E:\bamboo-agent-home\xml-data\build-dir\Business\Business.csproj" (default targets) -- FAILED.

无法理解这个错误。在本地,即使在命令行上也能完美运行 - MSBuildcommand。

最佳答案

看起来您的构建服务正在作为系统帐户(例如本地系统、网络服务等)运行,这会导致 msbuild 出现意外行为。

您应该创建一个专门的服务用户并将服务配置为以该用户身份运行,或者确保该服务用户有足够的权限修改系统配置文件目录(我不推荐这样做)。

可以关注Atlassian's guide on how to run the windows service as a local user .

关于c# - CSC : error CS2001: Source file '.NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs' could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44507990/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com