I have a WPF project with one external library. Is it possible to make one executable file "*.exe" from this project to run on windows systems even without .net? and how to insert that library into .exe file?
-
possible duplicate of [Merging dlls into a single .exe with wpf](http://stackoverflow.com/questions/1025843/merging-dlls-into-a-single-exe-with-wpf) – Merlyn Morgan-Graham Aug 11 '11 at 20:52
-
1Even if you could, it would be a bad idea due to the induced dependency hell and lack of bug-fix servicing for the framework itself. Make it a dependency in your installer (possibly downloading it), or write your app without the .Net dependency. – Merlyn Morgan-Graham Aug 11 '11 at 20:55
2 Answers
You will need to have the .net framework installed on the clients pc. What this says is that since .Net has been preinstalled on Windows since XP SP1, you should target your application to the runtime that is available on the system you wish to install it on. And since you are targeting WPF you will need to make sure that you have available .net 3.5 or greater. You may want to look into the Client installation of the framework since it is smaller. And you may want to look at this Stackoverflow question
i.e. from above link
Windows .Net Framework
Win 7 SP1 4
win 7 3.5.1 ( can be updated to .Net Framework 4 through windows updates )
windows vista 3.0 ( can be updated to .Net Framework 4 through windows updates )
windows XP Sp 1 2.0
-
is it possible to make WPF exe file executable on every Windows machine even without .NET? – Sergey Aug 10 '11 at 18:31
-
3No you need to have the .Net Framework to bind to. There is no way that I know of to run WPF without having .Net installed. – Mark Hall Aug 10 '11 at 18:44
You must have .net installed to use a wpf application. You can use clickonce to make the install experience more friendly to the user, if he doesn't the right version of the .net framework installed.
As for the external third party library, see my answer here for the same issue.