TeamCity build failing

0

I have a web api project that won't build on teamcity when I add a .net framework (4.71) class library to the solution. If I remove the class library, the build succeeds.

[CoreCompile] Csc [12:03:15][Csc] C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Data.DataSetExtensions.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.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\SomeClassLib.dll /subsystemversion:6.00 /target:library /utf8output /deterministic+ Class1.cs Properties\AssemblyInfo.cs "C:\TeamCity\buildAgent2\temp\buildTmp.NETFramework,Version=v4.7.1.AssemblyAttributes.cs" [12:03:15][Csc] Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn [12:03:15][Csc] CSC error CS0041: Unexpected error writing debug information -- 'Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

teamcity
csc
visual-studio-2017-build-tools
asked on Stack Overflow Oct 10, 2018 by J Doh' • edited Oct 10, 2018 by Kamil Gosciminski

1 Answer

0

Found the issue. I edited my project file in a text editor and I removed the Deterministic element. The build succeeded after that.

<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>
answered on Stack Overflow Oct 11, 2018 by J Doh' • edited Sep 3, 2019 by Sven Tore

User contributions licensed under CC BY-SA 3.0