WireMock.Net is not compatible with Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1 #264

Closed
opened 2025-12-29 08:25:02 +01:00 by adam · 18 comments
Owner

Originally created by @igorquintaes on GitHub (Mar 30, 2020).

While building or trying to install WireMock package, throws a conflict error on "Microsoft.CodeAnalysis.CSharp" dependency.

WireMock.Net expects 2.10.0 version exactly on "Microsoft.CodeAnalysis.CSharp".
Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1 refers version 3.3.1 of "Microsoft.CodeAnalysis.CSharp" package.

Originally created by @igorquintaes on GitHub (Mar 30, 2020). While building or trying to install WireMock package, throws a conflict error on "Microsoft.CodeAnalysis.CSharp" dependency. WireMock.Net expects 2.10.0 version exactly on "Microsoft.CodeAnalysis.CSharp". Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1 refers version 3.3.1 of "Microsoft.CodeAnalysis.CSharp" package.
adam added the bug label 2025-12-29 08:25:02 +01:00
adam closed this issue 2025-12-29 08:25:02 +01:00
Author
Owner

@StefH commented on GitHub (Mar 30, 2020):

Which framework do you use?

@StefH commented on GitHub (Mar 30, 2020): Which framework do you use?
Author
Owner

@igorquintaes commented on GitHub (Mar 30, 2020):

.NET Core 3.1

Tried also with preview version of WireMock, based on other issue similar problem, but same error.

@igorquintaes commented on GitHub (Mar 30, 2020): .NET Core 3.1 Tried also with preview version of WireMock, based on other issue similar problem, but same error.
Author
Owner

@StefH commented on GitHub (Mar 30, 2020):

There is no direct reference to Microsoft.CodeAnalysis.CSharp

However, I use CS-Script.Core, but that one does not have a fixed version:
image

The version from Microsoft.CodeAnalysis.CSharp is greater or equal to 2.10.0

@StefH commented on GitHub (Mar 30, 2020): There is no direct reference to `Microsoft.CodeAnalysis.CSharp` However, I use `CS-Script.Core`, but that one does **not have** a fixed version: ![image](https://user-images.githubusercontent.com/249938/77954903-a4fc0d00-72cf-11ea-8577-eda496bf1268.png) The version from Microsoft.CodeAnalysis.CSharp is greater or equal to 2.10.0
Author
Owner

@StefH commented on GitHub (Mar 30, 2020):

You mean this issue ? https://github.com/WireMock-Net/WireMock.Net/issues/447 ?

@StefH commented on GitHub (Mar 30, 2020): You mean this issue ? https://github.com/WireMock-Net/WireMock.Net/issues/447 ?
Author
Owner

@StefH commented on GitHub (Mar 30, 2020):

OK, I see your error:
image

@StefH commented on GitHub (Mar 30, 2020): OK, I see your error: ![image](https://user-images.githubusercontent.com/249938/77955378-5ef37900-72d0-11ea-96fa-a7b3944a1edb.png)
Author
Owner

@StefH commented on GitHub (Mar 30, 2020):

https://github.com/oleg-shilo/cs-script.core/issues/7

@StefH commented on GitHub (Mar 30, 2020): https://github.com/oleg-shilo/cs-script.core/issues/7
Author
Owner

@StefH commented on GitHub (Mar 30, 2020):

@mc0re & @igorquintaes
Can you please try new version from MyGet : WireMock.Net.1.2.2-ci-13091 ?

Maybe you still have to reference some library manually in your main project, I did not have time to test.

@StefH commented on GitHub (Mar 30, 2020): @mc0re & @igorquintaes Can you please try new version from MyGet : `WireMock.Net.1.2.2-ci-13091` ? Maybe you still have to reference some library manually in your main project, I did not have time to test.
Author
Owner

@mc0re commented on GitHub (Mar 30, 2020):

I will as soon as it gets through to our nuget mirror...

@mc0re commented on GitHub (Mar 30, 2020): I will as soon as it gets through to our nuget mirror...
Author
Owner

@igorquintaes commented on GitHub (Mar 30, 2020):

@mc0re & @igorquintaes
Can you please try new version from MyGet : WireMock.Net.1.2.2-ci-13091 ?

Maybe you still have to reference some library manually in your main project, I did not have time to test.

Now there is another conflict detected:
Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1: Microsoft.CodeAnalysis.Common (= 3.3.1)
CS-Script.Core 1.3.1: Microsoft.CodeAnalysis.Common (= 3.4.0)

There is no need to solve my problem in urgency, since CodeGeneration is not a required package to my team; but i am glad for your fast response and to try helping us. Is possible that mc0re issue is a little different, since i am getting trouble on build, and mc0re is on runtime.

@igorquintaes commented on GitHub (Mar 30, 2020): > @mc0re & @igorquintaes > Can you please try new version from MyGet : `WireMock.Net.1.2.2-ci-13091` ? > > Maybe you still have to reference some library manually in your main project, I did not have time to test. Now there is another conflict detected: Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1: Microsoft.CodeAnalysis.Common (= 3.3.1) CS-Script.Core 1.3.1: Microsoft.CodeAnalysis.Common (= 3.4.0) There is no need to solve my problem in urgency, since CodeGeneration is not a required package to my team; but i am glad for your fast response and to try helping us. Is possible that mc0re issue is a little different, since i am getting trouble on build, and mc0re is on runtime.
Author
Owner

@StefH commented on GitHub (Mar 31, 2020):

@igorquintaes : Do you really need that Microsoft.VisualStudio.Web.CodeGeneration.Design ?

Because this answer suggest to remove it : https://stackoverflow.com/questions/50689098/how-can-i-upgrade-from-net-core-2-1-rc1-to-the-stable-version-of-net-core-2-1/50788326#50788326

@StefH commented on GitHub (Mar 31, 2020): @igorquintaes : Do you really need that `Microsoft.VisualStudio.Web.CodeGeneration.Design` ? Because this answer suggest to remove it : https://stackoverflow.com/questions/50689098/how-can-i-upgrade-from-net-core-2-1-rc1-to-the-stable-version-of-net-core-2-1/50788326#50788326
Author
Owner

@igorquintaes commented on GitHub (Mar 31, 2020):

For now I don't, as I told that the package is not required to my team. Before open this issue, I removed it from project and worked fine, so and now i am working without that package. But in case of someone faces the same error, i decided to open a issue here.

@igorquintaes commented on GitHub (Mar 31, 2020): For now I don't, as I told that the package is not required to my team. Before open this issue, I removed it from project and worked fine, so and now i am working without that package. But in case of someone faces the same error, i decided to open a issue here.
Author
Owner

@StefH commented on GitHub (Mar 31, 2020):

This issue is actually unsolvable because a fixed version is always needed.
I did ask a question here: https://github.com/dotnet/roslyn/issues/42935

@StefH commented on GitHub (Mar 31, 2020): This issue is actually unsolvable because a fixed version is always needed. I did ask a question here: https://github.com/dotnet/roslyn/issues/42935
Author
Owner

@StefH commented on GitHub (Mar 31, 2020):

I just got the answer, see https://github.com/dotnet/roslyn/issues/42935.

So in your case, search for the last dependency which uses a fixed version, and update that version to the same as CS-Script.Core uses.

@StefH commented on GitHub (Mar 31, 2020): I just got the answer, see https://github.com/dotnet/roslyn/issues/42935. So in your case, search for the last dependency which uses a fixed version, and update that version to the same as CS-Script.Core uses.
Author
Owner
@StefH commented on GitHub (Mar 31, 2020): https://github.com/WireMock-Net/WireMock.Net/wiki/Conflict-on-Microsoft.CodeAnalysis.CSharp
Author
Owner

@igorquintaes commented on GitHub (Mar 31, 2020):

Got it, looks nice. Would not be the case that CS-Script.Core add Microsoft.CodeAnalysis.CSharp.Workspaces on its dependencies, using the same version that themselves use? I don't know if you are a contributor in that lib too, but looks more a lib limitation than a problem that the final developer should be handle

@igorquintaes commented on GitHub (Mar 31, 2020): Got it, looks nice. Would not be the case that CS-Script.Core add `Microsoft.CodeAnalysis.CSharp.Workspaces` on its dependencies, using the same version that themselves use? I don't know if you are a contributor in that lib too, but looks more a lib limitation than a problem that the final developer should be handle
Author
Owner

@StefH commented on GitHub (Mar 31, 2020):

There are probably more libraries which use a fixed version. It's not possible for cs-script.core to include all these...

@StefH commented on GitHub (Mar 31, 2020): There are probably more libraries which use a fixed version. It's not possible for cs-script.core to include all these...
Author
Owner

@StefH commented on GitHub (Apr 1, 2020):

I will close this issue with PR https://github.com/WireMock-Net/WireMock.Net/pull/449

OK ?

@StefH commented on GitHub (Apr 1, 2020): I will close this issue with PR https://github.com/WireMock-Net/WireMock.Net/pull/449 OK ?
Author
Owner

@igorquintaes commented on GitHub (Apr 1, 2020):

It is OK. Thanks.

@igorquintaes commented on GitHub (Apr 1, 2020): It is OK. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#264