Handling compiler error CS1701 - '...you may need to supply runtime policy'
I am compiling code with CSharpCodeProvider and getting error CS1701 with message like that: Assuming assembly reference 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' matches 'Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', you may need to supply runtime policy.
In Visual Studio information stored in assemblyBinding section of app.config resolves this problem.
How to fix that in LINQPad.
-
Laszlo Tordai commented
Got it. This is a warning which needs to be resolved runtime. Information in app.config resolves that. Just like the warning message says so.
The important thing is to check the HasErrors value of errors of the CompilerResults instance.