Visual studio does not include the prerequisites that I specify
Asked Answered
N

2

6

I have a visual studio solution that consists of a wpf application (project1) and a setup project. I need this prerequisite: enter image description here

when I deploy Project1 by itself everything works fine:

enter image description here

that is the prerequisite that I told visual studio to include...

But I want to create a Setup Wizard Project and Include my Project1 along with the extra files that I want to deploy. When I create that project, complile, recomplie with the release options selected and also the debug option selected in order to make sure I am including my project build take a look how that behaves:

** Removed... Take a look at the edit. I explain everything with more detail in there**




                                EDIT 



I will show the steps that I perform

Steps:

Step 1)

Create console application include the prerequisites that I want to include

enter image description here

Step 2)

Set the target framework to .NET Framework 4

enter image description here

Step 3)

Set this changes in the publish tab on properties:

enter image description here

and

enter image description here

Setp 4)

Publish this solution without a a setup wizard.

enter image description here

Setp 5)

Launch the setup file that was just created on a different clean machine

enter image description here

Step 6)

Cancel the installation let's try to do the same thing with a setup project

enter image description here

Step 7)

Once setup1 project is created let's add Console application to the project output

enter image description here

Step 8)

Now my setup1 project looks like:

enter image description here

Step 9)

Now I build that project and export it to my other computer where I want to test the installation

enter image description here

Note that when I launch Setup1.exe It want's to install Windows Installer 3.1!!!! Why????

Step 10)

Ok whatever right.. Let's continue with the installaction let's accept and continue...

enter image description here

Now it want to install the client version and not the full!!! why?

Step 11)

Now windows download the installer (remember that I told visual studio in setting that I did not wanted to download anything...)

Step 12)

Setup1.exe now installs the client version of .net framework

enter image description here

Step 13-14)

Setup1.exe prompts me to install my console application I click next since the program is so small I did not had time to take a screen shot but now the installation is complete

enter image description here


Installation is now done


Why did the prerequisites that I specified for console application not included!? Why everything works if I don't include a Setup project? What am I doing wrong?

Niggardly answered 6/2, 2012 at 8:48 Comment(0)
S
0

Make sure both Debug and Release are setup to behave the same.

There isn't any sort of cache, if its trying to install Windows Installer 3.1 it is because of human error.

Sierra answered 9/2, 2012 at 2:50 Comment(2)
How do I setup debug or release to behave a certain way?Niggardly
You don't know how to change the Setup project's Release and Debug packages?Sierra
T
0

If you want to run the application on the .NET Framework 4 Client Profile, you need to change the application project properties and set Target framework to .NET Framework 4 Client Profile (which is actually the default value in VS2010):

enter image description here

If you create a SETUP project in your solution, you need to define the prerequisites in the SETUP project and NOT IN the project Publish tab which publishes the app using ClickOnce mechanism.

So, the prerequisites defined in the Publish tab doesn't have anything to do with the setup project.

To add the prerequisites you need in the SETUP project, you should right click on the setup project, select properties and then prerequisites: setup properties

Tetzel answered 15/2, 2012 at 12:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.