Set .Net 4 'useLegacyV2RuntimeActivationPolicy' during runtime?
By : Chris G
Date : March 29 2020, 07:55 AM
|
Application built with .NET 3.5 running on machine with only .NET 4.0. How does supportedRuntime element work?
By : Ashin pote
Date : March 29 2020, 07:55 AM
this one helps. Adding Hans Passant's comment as it seems a suitable answer. The application will crash. To run on .NET 4.0 you need to add another supportedRuntime attribute with version="4.0".
|
"useLegacyV2RuntimeActivationPolicy=true" not working when application is loaded using Process.Start
By : André Carlos
Date : March 29 2020, 07:55 AM
will help you Nevermind. The file "myApplicationThatUsesSmo.exe.config" was indeed missing in the folder where "myApplicationThatUsesSmo.exe" was being started. "myApplicationThatUsesSmo.exe" is set as a reference for "myApplicationThatCallsProcessStart.exe" and so it is copied to the "myApplicationThatCallsProcessStart.exe" output folder. But its config file is not. There was a build event coping this file, but some how it was erased and than things stoped working.
|
Can I run scriptcs with useLegacyV2RuntimeActivationPolicy?
By : user3834991
Date : March 29 2020, 07:55 AM
this one helps. Your app.config file will be renamed to program.exe.config. In order to do this with ScriptCS you just need a file named scriptcs.exe.config that has the useLegacyV2RuntimeActivationPolicy startup node in it.
|
How do I set an unmanaged application's prefered CLR (<supportedRuntime>) at run time?
By : fUser2
Date : March 29 2020, 07:55 AM
To fix this issue The and useLegacyV2RuntimeActivationPolicy stuff is really only necessary if you either have mixed-mode assemblies (where, for backwards compatibility reasons, it will not load them in anything beyond the CLR 2.0) or 2.x assemblies trying to load 4.x ones. If you have pure managed assemblies, then .NET 4's in-process side-by-side execution will ensure that both CLR 2.x and CLR 4.x can be loaded in the same process, as needed by assemblies. The only real problem you could run into is that an assembly loaded in the 2.x runtime won't be able to load a 4.x assembly; in that scenario you would still have to force the 4.x framework through configuration. Likewise, sharing data through remoting and AppDomains won't work for components running in different frameworks, though that's a fairly rare scenario.
|