Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
HI ,

I want to create a .exe for wpf application so that exe file only i want to send another person to install and work , how can i create .exe file,can u guide me or send snippets
Posted
Comments
Sergey Alexandrovich Kryukov 23-Dec-13 1:20am    
Let me tell you: you are coming to programming with not the best approach. :-)
—SA

You should not develop WPF and other advanced stuff before learning very basic things on how programming work, unless you want just to waste a lot of time. Is soon as you create any application which somehow runs, you already have .EXE file created. If is located in your output directory. The location of output directory is stored as a path relative to the location of your project file, in your project file.

Many says: "this is bin\Release and bin\Debug", but this is not true (this is just the default for two predefined configurations). Correct answer is: this are directories you can create per Configuration which is defined by your project options. The can be found in a project file (a text node under the XML element named OutputPath, for all .NET projects) or in the VS IDE under Project Properties, the tab "Build". The process of deployment of the application without formal installation means delivering the content of the output directory to the user.

—SA
 
Share this answer
 
Comments
Christian Graus 24-Dec-13 3:36am    
Not so. WPF needs .NET and the fact he tagged SQL Server implies he has a SQL database to deliver as well. I suspect he may not know where his EXE lives, but I am sure he's not asking for how to give people an exe, he's asking how to build an MSI
Sergey Alexandrovich Kryukov 24-Dec-13 3:40am    
Maybe you are perfectly right, but, formally, the question is about .EXE; and I prefer not doing any guesswork.
And, excuse me, what your "not so" refers to?
Thank you.
—SA
Christian Graus 24-Dec-13 3:42am    
It's not so that giving people the contents of your build folder, means they can run it. Not by a long shot, .NET is the least of it.

I prefer to help people by seeing what they are trying to say, instead of being pedantic about how they use English
Sergey Alexandrovich Kryukov 24-Dec-13 3:51am    
I disagree. Deployment of just an output folder is the legitimate way of deployment, for application which don't have complex side effect of installation. To me, this is the best form of the software product packaging in the cases when it is possible; I wish more developers provided such opportunities. These days, such thing often comes under the name "portable version".

As to the approach to giving help, I do see your point and respect it, when you follow this approach in your answers. I'm afraid this is not always the case, but that's all right. At the same time, I think that my approach (call it pedantic if you want) is also quite useful. You see, it depends, I also don't answer in the same way in all cases.

But I don't know how it's relevant to this very case. I really was sure that the question is about getting an .EXE file, because many members before asked about that; only your comment suggested me some doubt. So, "pedantic" approach is a bit irrelevant in this case.

Cheers,
—SA
After building your project, Visual Studio will generate the exe file automatically. the output path by default is "bin\Debug\". you can find it via: right click project root -> properties -> build
 
Share this answer
 
There are a number of products like 'Advanced Installer' ( google it ), which have free versions and make it easy to create an installer which will make sure that things like .NET are installed, install your program, add shortcuts, etc. If you have a SQL Server database, that's more complex, your user needs to be able to attach or create your database, and configure their connection string inside your application.
 
Share this answer
 
Comments
kingsa 26-Dec-13 7:12am    
Thanks for great assistance
But as per requirement i need to give only .exe file only ,that to be without installation has to work can u guide me , i am new to portable applications
Christian Graus 26-Dec-13 15:59pm    
It's only possible on newer versions of Windows, which come with .Net installed. If you only have to support windows 7 and windows 8, then it can be done. IF you have SQL Server, configuration will be needed and you'll need to package the scripts to create the DB inside your app, but it can still be done.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900