Skip to content
This repository has been archived by the owner. It is now read-only.

System.Collections.Immutable dll being replace by Microsoft.Net.Compilers #1086

Closed
Ashishks1987 opened this issue Apr 9, 2019 · 2 comments
Closed

Comments

@Ashishks1987
Copy link

@Ashishks1987 Ashishks1987 commented Apr 9, 2019

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?

@Ashishks1987
Copy link
Author

@Ashishks1987 Ashishks1987 commented Apr 9, 2019

Update: I upgraded the Microsoft.CodeDom.Providers.DotNetCompilerPlatform nuget package as suggested here: dotnet/roslyn#12255 (comment) 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\MyProject\Source Program Files\My Release\My Service\bin\roslyn\*.*" /y /e" exited with code 4.

@barrytang
Copy link

@barrytang barrytang commented Apr 9, 2019

@Ashishks1987, I think you should open this issue under https://github.com/dotnet/roslyn.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants