It looks like Roslyn started embedding this method into user assemblies rather than linking to Microsoft.VisualBasic.dll. This means that some queries may stop working after the project is recompiled using Roslyn. It gives the following error.
System.NotSupportedException : LINQ to Entities does not recognize the method 'Int32 CompareString(System.String, System.String, Boolean)' method, and this method cannot be translated into a store expression.
If anyone is tripping over this issue with 6.2.0, a workaround, until 6.3.0 is released, is to add the following to your .vbproj file
<PropertyGroup>
<VBRuntime>Default</VBRuntime>
</PropertyGroup>
You may also require to explicitly add the Microsoft.VisualBasic nuget package to ensure the non-embedded version of the function is available.
Most helpful comment
If anyone is tripping over this issue with 6.2.0, a workaround, until 6.3.0 is released, is to add the following to your .vbproj file
You may also require to explicitly add the
Microsoft.VisualBasicnuget package to ensure the non-embedded version of the function is available.