MSBuild error generating deployment script: Method not found: '!!0[] System.Array.Empty()

I'm trying to setup CI for a readyroll db. I'm using TeamCity for this.

I have setup the db project as per "Use the ReadyRoll.MSBuild NuGet package"

Whenever I run the build in TeamCity I receive the following error:
C:\teamcity\buildAgent\work\ebc25847eab6ee35\packages\ReadyRoll.MSBuild.1.14.16.5202\tools\ReadyRoll.Data.Schema.SSDT.targets(146, 5): An error occurred while attempting to generate a package deployment script: Method not found: '!!0[] System.Array.Empty()'.

What is going wrong?

---

More information

I can run the build locally using the following (equivalent) command:
$msbuild = 'C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe'
& $msbuild D:\Scrap\ReadyRoll\TestTeamCityBuild\TestTeamCityBuild.sln /target:Rebuild /p:Configuration=Release

I've attached the TeamCity log of the failing build (see ReadyRoll_Test_Build_2.log)

Screen shot of the TeamCity build step:

q1ry9u72pljx.png

The source code for the (test) project that I'm trying to build: https://github.com/ccrowhurstram/TestTeamCityBuild

Build server details:
  • Windows Server 2008 R2
  • .Net Framework version: 4.5.2
Tagged:

Best Answer

  • AdamBAdamB Posts: 22 Bronze 4
    Hi Christian, sorry for the delay in response. It sounds like this is an issue with the .NET framework. I notice that in your repository the target framework for the .csproj is 4.6.2, whereas in the .sqlproj it is 4.5.2. Can you confirm that your build agent has version 4.6.2 of the .NET framework installed? If so, does upgrading the .sqlproj to .NET 4.6.2 help?
    Adam Bowden,
    Software Engineer, RedGate Software

Answers

Sign In or Register to comment.