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)'

Kamil Gosciminski
  • 16,547
  • 8
  • 49
  • 72
J Doh'
  • 63
  • 7
  • Does the Microsoft.DiaSymReader.Native.amd64.dll exist in the build server ? – Felix Too Oct 10 '18 at 18:13
  • It does. I tried experimenting with different build configurations too and it still failed (debug, release, x86, 64). From what little I can find online about this issue, it seems to be a .net core/standard thing (this is of course an uneducated guess on my part). – J Doh' Oct 12 '18 at 14:42

1 Answers1

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>
Sven Tore
  • 967
  • 6
  • 29
J Doh'
  • 63
  • 7