oleg-shilo / cs-script

C# scripting platform
http://www.cs-script.net
MIT License
1.57k stars 234 forks source link

Compatibility with Microsoft.CodeAnalysis version 4.2.0? #303

Closed mo-russo closed 1 year ago

mo-russo commented 1 year ago

Hello,

We're trying to move to Microsoft.CodeAnalysis version 4.2.0 but we're having an issue with with CS-Script that says it can't find version 4.1.0 at runtime. According to nuget.org, the dependencies is supposed to be ">= 4.1.0".

Should CS-Script be compatible with 4.2.0?

Thanks.

oleg-shilo commented 1 year ago

That is an interesting problem.

CS-Script is compatible with Microsoft.CodeAnalysis v4.2.0. On the screenshot below you can see that VS correctly defined dependencies are defined quite correctly (>=4.1.0).

image

Thi is how nuget package manager works. It does not pull the latest available version but the one that it was published against. Though it allows you to upgrade the dependencies if >= was used in the dependencies specification..

And I have just tested it. I create a hello world app. added CS-Script and updated Microsoft.CodeAnalysis packages to v4.2.0.

image

mo-russo commented 1 year ago

Thanks for the quick reply Oleg. It seems it was an issue with another nuget package we were referencing. Updating it to a newer version made this error go away.