Techaray

Shailendra Saxena's Technical Blog

' ' is not declared. It may be inaccessible due to its protection level.

clock January 25, 2013 04:55 by author ShailendraSaxena

 

 

BackGround

I receive the error ‘ ’ is not declared. It may be inaccessible due to its protection level.While building the solution.

Resolution

I changed the from ".NET Framework 3.5" to ".NET Framework 4" as below.

 

 



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.

clock January 25, 2013 04:52 by author ShailendraSaxena

 

BackGround :

I had an application which was using .net framework version 2.0 then I added some dll of version 4.o then all of sudden when running the application I got the above error.

 

Resolution:

I add the below code in my all app.config of projects of my solution.

<startupuseLegacyV2RuntimeActivationPolicy="true">

      <supportedRuntimeversion="v4.0"/>

    </startup>

 



Search

Calendar

<<  June 2017  >>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

Archive

Tags

Categories


Visitors

FlagCounter

Flag Counter

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2017

Sign In