0

I have developed a windows application via .NET 3.5 and now I want to deploy It for instalation , what I don't know is what files exaclty should I add in windows installer ? here is my project structure : - I have a folder named 'Images' which I have my images in that - I have several .dll files in my bin folder - My windows application uses a webservice that I have developed so I have a Web references folder in my project - My app.config file is in root directory - I have to .ico files in my root directory - the .exe file is in my bin folder

Now which files shoul I add ? and I also want to precompile my project and deploy It as .dll files , please help me this is my first time deploying a win app project . thanks for your help

gwt
  • 2,331
  • 4
  • 37
  • 59
  • This is confused. If you want to deploy your "application" as a dll, it's not an application. It should properly be considered a class file. The exe is SUPPOSED to be in bin, but why do you have an exe when you want to deploy as a dll. What are you using to build the deployment package? If this is to be a winfroms app, then it should simply be the exe, and scrap this dll talk. Quick test. Copy the exe in bin to your desktop, and then double click. Does it run without crashing? There you go. Start from there. You may need to copy the referenced dlls as well, hard to say. – GrayFox374 Aug 20 '12 at 20:22
  • @GrayFox374 I know that I should have dll files in target machine , my concern was that I don't want my source code to be available on the target machin and I want my source code to be as dll files ! am I clear now ? – gwt Aug 20 '12 at 20:26
  • No, I am sorry, this is still not clear. What do you mean you don't want your source code available on the target machine, but you do want the dlls there? Whether you build your source to a dll or an exe, the source is in there. So it is going to the target machine either way. It's not in a format anyone can examine, unless using something like ILDASM, but there's your source code. The only way to not have your source on the target is if the app is running from a remote located, but then, the source is still "out in the wild". Please clarify. I'm confused. – GrayFox374 Aug 20 '12 at 20:43

1 Answers1

1

Generally speaking, you don't add files, you just add Project Output. Visual Studio determines which files are needed. (See documentation) http://msdn.microsoft.com/en-us/library/cc766795.aspx

(Edit - this is better than the link above: http://www.dreamincode.net/forums/topic/58021-deploying-a-c%23-application-visual-studio-setup-project/)

The exception is content files. Suppose you have images, or pdf files that you want installed as part of your project. Even with these, however, you don't specify anything while defining the installer, you just ensure that "Copy Always" or "Copy If Newer" is selected for the content files in the original project.

In YOUR case, the .dll files, web references, and actual code components should be included automatically, but you may need to specify the "copy" option on the images. (See http://www.flatredball.com/frb/docs/index.php?title=Tutorials:Adding_files_to_your_project)

David
  • 72,686
  • 18
  • 132
  • 173
  • thanks alot for your answear , and about my webservice configuration on the taret machin , Is It enough to modify the part of the app.config file wich contains the web service url ? – gwt Aug 20 '12 at 20:21
  • I don't think so. I've always had to do a Find and Replace in Visual Studio to replace all occurrences in files like the .dcso file, etc. – David Aug 20 '12 at 21:30