Visual Studio does not include the premises that I specify

I have a visual studio solution consisting of a wpf application (project1) and an installation project. I need this precondition: enter image description here

When I deploy Project1 on my own, everything works fine:

enter image description here

which is the premise I told visual studio to include ...

But I want to create an installation wizard project and include my Project1 along with additional files that I want to deploy. When I create this project, complicate it, repeat with the selected release options, and also select the debugging option to make sure that I include my project assembly, see how this happens:

** Deleted ... Look at the editing. I explain in more detail there **




EDIT 



I will show the steps that I perform

Steps:

Step 1)

Creating a console application includes the prerequisites that I want to include

enter image description here

Step 2)

Set Target Structure for .NET Framework 4

enter image description here

Step 3)

Define these changes in the property publishing tab:

enter image description here

and

enter image description here

Setp 4)

Publish this solution without the installation wizard.

enter image description here

Setp 5)

Run the installation file created only on another clean machine

enter image description here

Step 6)

Cancel the installation, try to do the same with the installation project

enter image description here

Step 7)

After creating the setup1 project, add the Console application to the output project

enter image description here

Step 8)

Now my setup1 project looks like this:

enter image description here

Step 9)

Now I create this project and export it to another computer, where I want to test the installation

<T411>

Please note that when you run Setup1.exe, he wants to install the Windows 3.1 installer !!!! Why????

Step 10)

Well, whatever is right. Continue with installing let accept and continue ...

enter image description here

Now he wants to install the client version, not the full one !!! why?

Step 11)

Now the windows load the installer (remember that I told the visual studio in the setup that I did not want to download anything ...)

Step 12)

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

enter image description here

Step 13-14)

Setup1.exe offers me to install the console application, which I click next, because the program is so small that I did not have time to take a screenshot, but now the installation is complete

enter image description here


Installation is now in progress


Why are the prerequisites that I indicated for the console application not included !? Why does everything work if I do not include the installation project? What am I doing wrong?

+6
source share
2 answers

Make sure the Debug and Release settings are set to behave the same.

There is no cache if it tries to install the Windows 3.1 installer due to a human error.

0
source

If you want to run the application in the .NET Framework 4 client profile, you need to change the application project properties and install the Target framework in the .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 Publish tab project, which publishes the application using the ClickOnce mechanism.

So, the prerequisites defined on the Publish tab have nothing to do with the installation project.

To add the necessary prerequisites to the SETUP project, you must right-click on the installation project, select the properties, and then the necessary conditions: setup properties

0
source

Source: https://habr.com/ru/post/907752/


All Articles