Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# CSC:错误CS2001:源文件';。NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs';找不到_C#_.net_Visual Studio_Msbuild_Bamboo - Fatal编程技术网

C# CSC:错误CS2001:源文件';。NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs';找不到

C# CSC:错误CS2001:源文件';。NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs';找不到,c#,.net,visual-studio,msbuild,bamboo,C#,.net,Visual Studio,Msbuild,Bamboo,在我的服务器上开始构建时,我遇到以下错误: 使用以下目录中的编译器的共享编译:C:\Program Files(x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Roslyn CSC:错误CS2001:找不到源文件“C:\Windows\system32\config\systemprofile\AppData\Local\Temp.NETPortable,Version=v4.5,Profile=Profile78.As

在我的服务器上开始构建时,我遇到以下错误:

使用以下目录中的编译器的共享编译:C:\Program Files(x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Roslyn CSC:错误CS2001:找不到源文件“C:\Windows\system32\config\systemprofile\AppData\Local\Temp.NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs”。[E:\bambol agent home\xml data\build dir\Domain\Domain.csproj] 已完成生成项目“E:\bamboo agent home\xml data\build dir\Business\Business.csproj”(默认目标)——失败


无法理解此错误。在本地上,即使在命令行-
MSBuild
命令上,此操作也非常有效。

您的生成服务似乎是作为系统帐户(例如本地系统、网络服务等)运行的,这会导致MSBuild中出现不希望出现的行为

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


您可以关注。

此问题有任何更新吗?抱歉,错误CS2001表明它无法生成临时类。这可能是因为生成帐户失去了对C:\Windows\system32文件夹的权限,您是否尝试将所有权限授予您的帐户,包括读/写/完全控制权限?