Reputation: 11
First of all I am newbie in C# so please be indulgent.
My friend created for me simple project using Visual Studio. Program is showing buttons, after click on single button proper folder or file is opened.
I build the program using .Net 2.0 and the program is working fine on computers with installed .NET 2.0 but is not working on computers with newest .Net libraries like .Net 4.0. I also buid program using .Net 4.0 and it is working on computers with installed .NET 4.0 but it is not working on computers with .Net 2.0.
How I can create this program to get this working on every version of .Net? I just want to add that this opening function is very basic, because I used below:
System.Diagnostics.Process.Start
I just want to add that I can't use installer of newest .Net because I have no admin rights.
I based on similar program which copied text to clipboard after clicking on button. It was working on every .Net environment. I simply replaced "Clipboard.Settext" function with "System.Diagnostics.Process.Start" and here I have problems.
Upvotes: 1
Views: 82
Reputation: 6068
myapp.exe.config:
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0.30319"/>
</startup>
</configuration>
Upvotes: 4