Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

$
0
0
Hello,

I have a .Net WPF Application in VS 2013. which contain 25 project.  i am using following dll as reference in one of them.

1. Microsoft.SqlServer.ConnectionInfo
2. Microsoft.SqlServer.Management.Sdk.Sfc
3. Microsoft.SqlServer.Smo

By using these dll, i was getting following Error

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

after some google, i have added app.config file in Main  project (EXE Project )which contains following
<?xml version ="1.0"?><configuration><startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0"/><requiredRuntime version="v4.0.20506"/></startup></configuration>
After adding this app.config file Error doesn't throw when i run from Visual studio but same error is throwing, when i run my application from Exe file.

Prem Shah


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images