Visual Studio 2008 Setup Project is not generating Setup.exe anymore - visual-studio

I have a Visual Studio 2008 Setup Project that when compiled in the past would generate a Setup.exe in the output directory along with the .msi output file. Now it no longer generates the Setup.exe which I actually do need.
Did I change a project setting without realizing? How do I get it to generate it again?

Try opening project properties, click Prerequisites button there and check "Create setup program to install prerequisite components".
This is for Visual Studio 2005, not sure if it works for Visual Studio 2008.

1, Go to file menu > click Add > new project >now “Add New Project” Dialog appear.
2.Select “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK.
3.New project appear in solution explorer,for example you give the name “MyEXE”..it will display with this name.
4.right click the MyEXE > go View > click “File System”
5.You can see the “File System on TargetMachine”under three folders
Application Folder
User’s Desktop
User’s Program Menu
6.Select Application Folder and right click Add>Project Output>select Primary output
select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from primary output name to MyEXE
next >>
same procedure follows the user’s program menu also
8.If you want to change the Manufactures name for exe,just right click the project go to properties
change the properties as per you requirement
9.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)
EXE available # this location
When you want to install the EXE on the client machine,you should be installed .NET Framework on that mc because,Applications and controls written for the .NET Framework version 2.0 require the .NET Framework Redistributable Package version 2.0 to be installed on the computer where the application or control runs.

Related

How to create windows MSI in separate solution?

How to Create a MSI for windows Applications which is available in different visual studio solution.
If you have installed the installer extension (if not, see notes below), open Visual Studio, then do the following (at this point, no solution is opened):
If you start with a new solution, select File -> New Project.(In case you want to add the installer project to an existing solution instead, right click on
the solution in the solution explorer and choose from the context menu Add -> New
Project.)
In the New Project dialog, select "Other Project Types", then "Visual Studio Installer" and there "Setup Wizard" (Alternatively you can also select a Windows setup project or a Web setup project directly - the wizard has the advantage that it will ask you about several items)
In the Setup Wizard, you can choose whether you want to create a setup for a Windows application or for a Web application. Here, select Windows application.
Click Next >. The "Choose files to include" dialog appears. This step is important, because here you specify which files you want to add to your installer package. Check the items you need to include - for localized projects I suggest that you add: "Locally copied items, Runtime Implementation, Localized resources, Content files" and "Primary output."
Click Next > again to bring up the last page ("Create project" dialog), then click Finish
You have now a solution with one setup project. Now you can add an existing project (select the solution, right-click and select "Add existing project"). After you have done that, right-click on the setup project and select "Add -> Project Output". Now you can select the items to be included in your setup project.
If required, you can also add other assemblies via "Add -> Assembly..." or, if you have that, you can add merge modules.
Notes
You need to install the extension "Microsoft Visual Studio 2017 Installer Projects" (via Tools -> Extensions and Updates, search it online in the Visual Studio Marketplace) to be able to select the installer as described above
that the project you have added can be part of a different solution.
The 4 most important properties of a setup package are: Version, ProductCode, Upgrade code and Platform (default is x86). Version is just a number (e.g. 1.0.1) while the other two properties are GUIDs. If you change the version in the package properties, then Visual Studio asks to create a new ProductCode (if you answer the question with "Yes" - which is recommended). This allows the Windows installer to distinguish the differrent packages from one another and allows to upgrade a package, because the UpgradeCode isn't changed.
Additionally, the default value for RemovePreviousVersions is false - but in most cases you want to change this to true (remember what I said before about ProductCode and UpgradeCode): To remove old versions automatically when you install a new version.

Creating an installer for Visual Studio 2010 solutions (one or more projects)

I ran into some troubles when creating an installer for my Visual Studio 2010 solution (which has multiple projects) so I thought I'd make a quick guide to how I got it working...
Here is how I did it:
Create a new Visual Studio Installer project which is located under
Installed Templates/Other Project Types/Setup and Deployment/Visual Studio Installer.
Make sure you add it to you current solution, you can do this by right clicking on the solution name in the solution explorer and clicking Add>New Project
From there select Setup Wizard, give it a name and click OK
A wizard will open, click Next
then select Create a setup for a Windows application
then click Next again. Select all of the groups you want to include, namely: Content Files, Source Files, Primary Output
Then click Finish
In the solution explorer you will see a bunch of buttons find the one that's tool tip says File System Editor and click it. You will see three folders in the file system editor, the only one we really care about is the Application Folder. That folder is where your projects build output should be.
To add files to it if they are not already there right click > Add > File...
Note: You cannot add entire folders (which sucks) and the folder structure in the Application Folder should be identical to that in your projects build.
You should create each folder and then add the files to it.
If you have multiple projects you should set the build directory to the same folder under the release build settings. To do this, open your solution, and for each project, right click/Properties go to the Compile tab, set it's configuration to Releaseand its Build output path to some folder (same for each project) (If you have an XNA project make sure its Content Build/Configuration is also set to Release).
Now select Release from the drop down menu on the tool bar (it most likely says Debug now)
Right click on your solution on the solution explorer and click Build Solution
Now all of your solutions built files will appear in the folder you chose in the compile tab. All of these files are what needs to be added to the Setup Projects Application Folder (in the same structure)
Customise the installer: click on the project name in the solution explorer and look through it's properties, change what you want (i.e Author, Manufacturer, Title - these make a difference to the installers output directory and text)
Build the installer project (same way as mentioned above) and you are done.
Feel free to comment with questions

How do I change the target platform in a console app in Visual C# 2010 Express or Visual Web Developer 2010 Express?

I don't see any other value other than 'Any CPU' in the drop down list in Properties -> Build -> Configuration -> Platform in Visual C# 2010 Express or in Visual Web Developer 2010 Express.
I just removed some 64-bit dlls and got their 32-bit versions and added a reference to them.
Since then, I've been receiving a BadImageFormatException.
Is it the platform or the platform target?
If you want to add a new platform then do this:
Open the Configuration manager for your solution.
Expand the Platform combo for the project. It will show several items: Any CPU, and .
Press This will open a new dialog to add a new target for your solution. Select x64 for the new platform and Any CPU as the target from where to copy the settings. You can also check the "Create new solution platforms" if you want to add a solution target also.
Then, if you go to the project properties you can select this platform.
I found a couple of suggestions elsewhere but they haven't worked for me so far.
I found this one to be the most useful of all.
http://social.msdn.microsoft.com/Forums/en-US/d4fa83dc-eed1-4ead-96a1-78bbd9ba6d3a/vb-express-target-x86-platform?forum=vblanguage
For anyone who faces this same problem later, here's help. It says:
Express Editions:
The VB and C# Express products do not expose the
Target property inside the development environment.
You will need to carefully modify the project file
using a text or XML editor.
1. Close the project and/or solution
2. Select Open File from the File menu
3. Navigate to the project directory, and highlight
the project file
4. Press the Open button, the project file should open
in the XML editor
5. Locate the first <PropertyGroup> section and add
the following line:
<PlatformTarget>x86</PlatformTarget>
1. Save the project file
2. Reopen the project and/or solution using
Open Project/Solution from the File menu
3. Continue with development, debugging, and testing
Alternatively, if the application is targeted to 64-bit
platforms, you can ensure that the COM controls added to
the application have 64-bit equivalents on the development
and deployment computers.
JohnWein added the following:
Using the above method targets the x86 platform, but it
doesn't show the "Configuration:" and "Platform: " boxes
on the Properties tabs. To get this feature, I made a
template of one of the projects that shows these boxes.
Now I can target a platform and know what platform I
have targeted.

Add another exe file in my setup file in Visual Studio

I have created a Windows setup file for my Windows project in Visual Studio 2010. This setup file is running properly and installed the software in the computer. But for running this software I need another exe file to run. I want to add this external exe file into my setup project so that when my software will install the other software will be installed too.
If you just want to add another file that will be deployed on the target machine when installing you can go to your project, File Setup tab, right click on the folder that you want to add the file to (eg. Application Folder), in the context menu click Add - File and browse to the file that you want to add. It can be any external file from your computer.
That file will get installed along with your application.
Edit - To get to the File Setup tab right click on your project in the solution explorer and select View - File System.
Edit 2 - In order to add a custom prerequisite to your setup project have a look at this question.
I presume you're using a "Setup Project" (vs. InstallShield, for example).
It sounds like you want a "custom action":
http://msdn.microsoft.com/en-us/library/bbd7cck3.aspx
http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/
<= Look for "calling an executable as a custom action"
In VS2010, I had 3 Projects outputting 2 DLLs & 1 EXE, and a 4th Project as Setup Project. To add the DLLs & EXE in setup.exe file, this is how I did it,
Right Click on your Setup Project,
Right Click->View->File System->Application Folder
In the Application Folder pane, Right Click->Add->Project Output
Select the required project from the drop down Project list and select "Primary Output".
That should be it.

Creating msi in vs08 - few questions

I am creating an MSI from inside visual studio 2008.
This is what I am doing:
(With the project I am creating this for open in Visual Studio) right click Add new project
Setup and Deployment > Setup Project
Give it a name
Right click Application Folder > Add > Project Output: Primary Output
Question: does this contain all I need to run the project?
I want to create the .msi to put a shortcut to it on the Users desktop, so
Create shortcut to Primary output from Project
Move this to the users desktop folder
Question: how do I get this to keep the icon from the project!! conveniently doing this seems to have lost the app icon and picked some random generic one instead.
Thanks,
edit 0: Oh and also, can I set so when running the .msi the user cannot change where it is installed to?
Nobody knows how to do this?
It should unless you are referencing mixed mode assemblies in which case you may have to manually add files to the installer as the dependency resolution is very poor in this case.
You need to set the icon manually in the properties of the setup project.
To Remove the option to select the installation folder try opening the user interface view of the project and deleting the 'Installation Folder' screen.

Resources