Build issue: csc fails because reference is missing

TeamCity Professional 7.1.4 (build 24331)

I am trying to configure a project in TC, but I have a build step that keeps failing.

Build Step parameters:

Runner Type: MSBuild
MSBuild version: tried 4.0 and 4.5 (Project is in 4.5)
MSBuild ToolsVersion: 4.0
Command line parameters: /property:Configuration=Debug


The problem is that CSC fails and the reason is clear, a reference is missing:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe
/noconfig
/nowarn:1701,1702
/nostdlib+
/platform:x86
/errorreport:prompt
/warn:4
/define:DEBUG;TRACE
/highentropyva+
/reference:C:\Development\PAM\PAMAnalyzers\Infrastructure\bin\Debug\ConceptONE.Infrastructure.dll
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll"
/debug+
/debug:full
/filealign:512
/optimize-
/out:obj\Debug\Analyzers.dll
/subsystemversion:6.00
/target:library
/utf8output Analyzer.cs Analyzers\BondAnalyzer.cs Analyzers\BondETFAnalyzer.cs Analyzers\CashAnalyzer.cs Analyzers\EquityAnalyzer.cs Analyzers\EquityCFDAnalyzer.cs Analyzers\EquityOptionAnalyzer.cs Analyzers\EquitySwapAnalyzer.cs Analyzers\IndexLinkedBondAnalyzer.cs Analyzers\MoneyMarketAnalyzer.cs Calculators\CurveValue.cs Calculators\GreekCalculator.cs Calculators\InterestRateCalculator.cs Calculators\KeyRateDurationCalculator.cs Constants.cs Extensions\DateExtensions.cs Extensions\QuantLibExtensions.cs Instruments\BondAdapter.cs Instruments\BondVariations.cs Instruments\InstrumentAdapter.cs Instruments\OptionAdapter.cs Parameters\DynamicParameter.cs Parameters\DynamicParameterComparer.cs Parameters\DynamicParameterList.cs Parameters\CurveDynamicParameter.cs Parameters\StaticParameter.cs Parameters\ParameterFactory.cs Parameters\StaticParameterList.cs Parameters\VectorDictionary.cs Properties\AssemblyInfo.cs "C:\Program Files (x86)\BuildAgent\temp\buildTmp\.NETFramework,Version=v4.5.AssemblyAttributes.cs"

This is missing:
/reference:C:\Development\PAM\PAMAnalyzers\QuantLibAdapter\bin\vc100\Debug\QuantLibAdapter.dll

If I view the project file, I see no difference between my two custom DLLs (ConceptONE.Infrastructure.dll and QuantLibAdapter.dll):

  <ItemGroup>
    <ProjectReference Include="..\Infrastructure\Infrastructure.csproj">
      <Project>{24a6c894-f1b5-4fd1-8a6d-02fd9a245f96}</Project>
      <Name>Infrastructure</Name>
    </ProjectReference>
    <ProjectReference Include="..\QuantLibAdapter\QuantLibAdapter.csproj">
      <Project>{928f98ee-7d50-457f-9304-a6818dcf1079}</Project>
      <Name>QuantLibAdapter</Name>
      <Private>True</Private>
    </ProjectReference>
  </ItemGroup>


Can you think of a reason why this is happening ?

Thank you,
Simon     

1 comment
Comment actions Permalink

Hi Simon,

Are you still on 7.1.4. version? If yes, then please consider the upgrade to the latest TeamCity version (9.1.3 as of now) to get access to all the recent bug fixes and lots of new features.
What is the result if you run the same build manually via command line using MSBuild.exe on the agent in the same working directory and under the same user as agent is running? Please use the guideline to investigate the issue.
If reference is also missing when you run the build via command line, then it means that issue is not TeamCity related. Please have a look at the thread on stackoverflow, perhaps it's related to your problem.

0

Please sign in to leave a comment.