Reputation: 330
So I've made a forms application with visual studio 2012 using .NET 4.5 framework. The application (exe) works fine only on my computer. I've tried two other computers to run it on but both seem not to be able to run it. I've installed .NET framework 4.5 on both the machines ofcourse. The error on the one is:
To run this application, you must first install one of the following versions of the .NET Framework: v4.0.30319
Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework.
And the other machine just brings up the windows error message which says that the application has stopped working. Again, both computers have .NET framework 4.5 installed. I've also tried to install 4.0 to try but the installer says that a newer version is detected so I don't need to install this one (pretty obvious). I also tried to publish it so it'll generate a setup program to install prerequisite components, but again the setup works fine on my computer and doesn't even start on the other.
Thanks in advance.
Upvotes: 3
Views: 1902
Reputation: 56697
Well, if the application requires .NET 4.0 you need to install it. My best guess is that you think the target is 4.5, but really it is not. Also, the target framework is specified in the .exe.config
file. Maybe you should publish it along with the application.
Upvotes: 2