c# - Running NET 2.0 app in any framework -


let's want net 2.0 exe run both in :

  • xp net 2.0 installed
  • xp net 4.0 installed (or windows 8 dont have net 2.0 enabled)

one solution create myprogram.exe.config file , write enties

<supportedruntime version="v4.0.30319"/> <supportedruntime version="v2.0.50727"/> 

it's possible embbed entries (or myprogram.exe.config) in exe? thank you.

a .net .exe called assembly.additionally program-data contains meta-information program, clr can work , can perform things reflection.
can provide information in assembly, i'm afraid can't want easily. need make .exe check installed version of .net , evntually react it.

besides, must not forget, when creating assembly specify .net-targetframework, i.e. .net 3.5, .net 4.0, etc. ... assembly .net 2.0 run on .net 4.0 anyways due downward-compatibility.

see here assemblies , how used , here system.reflection.assembly-class.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -