I have referenced system.collections.immutable.dll
from the nuget package and I also have the nuget package installed for Microsoft.Net.Compilers
. Everything works fine in my local but when I push my code to bamboo, in the runtime I get Could not load file or assembly 'System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
When I checked logs on bamboo when it generates the artifacts, I can see that initially it copied the correct dll here:
build 04-Apr-2019 03:20:33 Copying file from "E:\agt01\ENS-EB580-JOB1\Bin\Packages\System.Collections.Immutable.1.5.0\lib\netstandard1.0\System.Collections.Immutable.dll" to "E:\agt01\ENS-EB580-JOB1\Binaries\Release\\temp\Web\_PublishedWebsites\MyService\bin\System.Collections.Immutable.dll".
but then at some point, it replaced this dll with this:
build 04-Apr-2019 03:20:33 Copying file from "E:\agt01\ENS-EB580-JOB1\Bin\Packages\Microsoft.Net.Compilers.1.0.0\tools\System.Collections.Immutable.dll" to "E:\agt01\ENS-EB580-JOB1\Binaries\Release\\temp\Web\_PublishedWebsites\MyService\bin\System.Collections.Immutable.dll".
How can I make sure that bamboo does not replace this dll and just uses it from the nuget package installed?
Update: Update: I upgraded the Microsoft.CodeDom.Providers.DotNetCompilerPlatform
nuget package as suggested here: https://github.com/dotnet/roslyn/issues/12255#issuecomment-248588545, but now I am getting this error on bamboo:
E:\agt01\ENS-EB580-BEQI\TeamBuildTypes\BambooBuild.proj(226,2): error MSB3073: The command "XCOPY "E:\agt01\ENS-EB580-BEQI\..\AWInstaller\Binaries\roslyn\*.*" "E:\agt01\ENS-EB580-BEQI\..\AWInstaller\My Project\Source Program Files\My Release\My Service\bin\roslyn\*.*" /y /e" exited with code 4.
User contributions licensed under CC BY-SA 3.0