Adrian T
Adrian T

Reputation: 93

Check .NET Framework with a published C# WPF app

I have this problem (about checking if the right version of the .NET Framework is installed)

I made a C# WPF app and it works very good in my development environment (XP with .NET Framework 4.0, MS Access).

When I deploy the app (with setup.msi and setup.exe files) the app works, too. It should verify by itself the .NET Framework because I checked the .NET prerequisite (download from the same location where the app is).

But, when the app is just published, I go to "Application Files" folder and doubleclick on the appName.exe and the app starts and I get this error: "To run this app you need .NET Framework 4.0 installed".

So the question is, how to check the .NET Framework (and eventually install it automatically) from/for the pubblished app ?

Thanks, Adrian T.

Upvotes: 0

Views: 820

Answers (2)

Franck Jeannin
Franck Jeannin

Reputation: 6844

You may also want to consider ClickOnce which will let you install the app and its prerequisites via a simple URL. If your app is signed with a digital certificate, you can also manage automatic updates that way.

Upvotes: 0

J R B
J R B

Reputation: 2136

you can check Installed framework from control panel.

also as i think you have add .Net Client Framework instead of .Net Framework. sometime .Net Client framework is not working proper so add as prerequisite .Net framework instead of .Net client framework.

Upvotes: 0

Related Questions