I wish to ask you how to create a workable .exe from my form application project.
Project name is lottery and when I started the Build solution , program say me, that build is successed, after that I'm going to
C:\Users\mdinev\Desktop\LottaryPresentation\Lottary.Business\bin\Debug
This is exactly my path, but here is also my .dll and config file.
I'm working with VS2015 and my target is to give this .exe to other department team to started a lottery program.
Is it possible to create this exe file, may be they have to insall other version ot .net framework, but other team only wish for me to present them an .exe file.
Thanks in advance for help.
Just change the Output type to Windows Application and you will get your .exe file.
Edit:
You can do that by right-click your project, go to Properties/Application and change the Output type from Class Library to Windows Application
Related
I am new to C#, and I have a project which I have a built as a class library to check for updates before the app starts.
For the program to run this dll file should be in the same directory where the main app is, I want to change the directory of this dll file to be in a sub folder.
I have tried to change app.config file, but it started to cause runtime errors.
Is this possible?
If you import Updater Project into your main project, MsBuild compiles both of them together. And you won't need to deal with such complexities.
Honestly, ı couldn't understand what you tried to do. But above approach would solve your issue.
Hi guys a project I'm working on has an app config file which determines what other dll's to load at runtime. I have been tasked with adding the functionality of taking the dll from our servers and then changing the app conifg to have the exe now load up with that file. The idea is the user at runtime will choose a file and then the app config will change and then restart the exe with the new dll loaded.
I couldnt seem to find exactly what I was looking for. We are using Visual Studio 2012 with .net 4.
How do you edit the app config file at runtime and then have the program close and rerun?
This might help with adding an exe file to your app.config file: http://msdn.microsoft.com/en-us/library/ms184658.aspx OR Add an EXE file to a project, so that it will be copied to the Bin/Debug folder just like a DLL?
As for closing and reopening the file: How do I restart my C# WinForm Application?
Should help in pointing you in the right direction anyway.
I had created a project which is C# console application project for which I need to call this project dll in another windows application project. I had built the project in visual studio 2010 and checked for .dll file in bin\debug folder, but it is not created.
But a manifest file and .exe file havebeen created. Please help me out how to create the .dll in this case?
You need to make a class library and not a Console Application. The console application is translated into an .exe whereas the class library will then be compiled into a dll which you can reference in your windows project.
Right click on your Console Application -> Properties -> Change the Output type to Class Library
To create a DLL File, click on New project, then select Class Library.
Enter your code into the class file that was automatically created for you and then click Build Solution from the Debug menu.
Now, look in your directory: ../debug/release/YOURDLL.dll
There it is! :)
P.S. DLL files cannot be run just like normal applciation (exe) files. You'll need to create a separate project (probably a win forms app) and then add your dll file to that project as a "Reference", you can do this by going to the Solution explorer, right clicking your project Name and selecting Add Reference then browsing to whereever you saved your dll file.
For more detail please click HERE
You need to change project settings. Right click your project, go to properites. In Application tab change output type to class library instead of Windows application.
Console Application is an application (.exe), not a Library (.dll). To make a library, create a new project, select "Class Library" in type of project, then copy the logic of your first code into this new project.
Or you can edit the Project Properties and select Class Library instead of Console Application in Output type.
As some code can be "console" dependant, I think first solution is better if you check your logic when you copy it.
Creating DLL File
Open Visual Studio then select File -> New -> Project
Select Visual C# -> Class library
Compile Project Or Build the solution, to create Dll File
Go to the class library folder (Debug Folder)
In visual basic class I learned where I could find the .exe file once the program was done and run at least once. Basically we could take the icon for the .exe file and place it on the desktop so that a user could just double click on the icon to run the program without needing to open the IDE or look at any code.
Where/how can i find this kind of file for c# code?
Go to the bin/Debug folder in the project. (or bin/Release if you're using the release build).
You can also go to your project settings, then to the build tab, and in the "Output" heading read/change the "Output Path" setting. This will let you output the exe to some other location, or just see where it is currently outputting in the event that it has already been changed on your machine.
Assuming you're using a web application project you'll use the .aspx file that is generated to access your silverlight application.
The "application" so to speak is actually a file ending in ".xap" that can be found in your web project's ClientBin directory.
The .xap file can also be found in the silvelright project's Bin
If you're wanting to install the silverlight application to a desktop you'll have to enable the ability to run the application "Out of Browser" and it'll have to be installed. More information on Out of Browser apps...
I've created a Windows Forms Application in Visual Studio 2008, .NET 3.5.
Now I want to finalize my project, i.e. to create a single .exe file which I can give to someone and he will be able to run it on his computer.
In my project files I found bin/Debug directory where I see a .exe file.
Can I just use this file as is, or I am missing some important finalizing procedure ?
Thanks !
You can just take the EXE as long as it has no dependencies. If there are any dll files in there, you need to include them (or use the ILMerge command line utility to combine them). You can, however, ignore any generated pdb or xml files.
As a side note, you should be compiling in release if you plan on deploying your project (the output will be in bin/Release)
You are not clear in you question. If your solutions output is just a single exe file, then Yes, you can give away the exe file in bin\debug.
But instead of bin\debug\ exe you must distribute the bin\Release\ exe which is meant for release purpose.
To make the ILMerge easier, use the GUI tool from codeplex at http://ilmergegui.codeplex.com/
If this is a commercial application, several commercial obfuscators allow creating a single exe.
In SetiSeeker response the link http://ilmergegui.codeplex.com/ is not reachable