我有一个web api项目,当我在解决方案中添加一个.net框架(4.71)类库时,它不会构建在teamcity上。如果我删除类库,构建就会成功。
Microsoft Csc 12:03:15 C:\Program Files (X86)\
CoreCompile x86 /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Microsoft.CSharp.dll“Assemblies\Microsoft\Framework.NETFramework\v4.7.1\mscorlib.dll”x86:“C:\Program Files (/reference)\Reference TRACE Assemblies\Microsoft\Framework.NETFramework\v4.7.1\mscorlib.dll”/reference:"C:\Program Files (x86)\Reference TRACE /reference:"C:\Program Files (x86)\Reference TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Data.dll“x86:”C:\Program Files (/reference)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Data.dll“/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Data.dll”/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Net.Http.dll“Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Xml.dll”:“C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Xml.Linq.dll”/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Xml.Linq.dll“/reference /debug:full /filealign:512 /optimize- /out:obj\Debug\SomeClassLib.dll /subsystemversion:6.00 /target:library /utf8output /deterministic+ Class1.cs Properties\AssemblyInfo.cs Class1.csCSC“12:03:15使用目录中的编译器进行共享编译: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn 12:03:15 Version=v4.7.1.AssemblyAttributes.cs error CS0041:写入调试信息时出现意外错误-- 'Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll':找不到指定的模块。(HRESULT异常: 0x8007007E)'
发布于 2018-10-12 03:53:22
找到问题所在。我在文本编辑器中编辑了我的项目文件,并删除了确定性元素。在那之后构建成功了。
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{GUID}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RootNS</RootNamespace>
<AssemblyName>RootNS</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <!--removed this line-->
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
https://stackoverflow.com/questions/52744641
复制相似问题