Click here to Skip to main content
15,118,865 members
Please Sign up or sign in to vote.
5.00/5 (3 votes)
See more:
I am trying to create a setup project with the Visual Studio Setup Project - my problem is that I want to install everything that is inside an output directory that I have defined in an MS Build file as ApplicationTargetDir:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="">
    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>

    <!-- Application directory -->
    <ApplicationTargetDir Condition="$(ApplicationTargetDir) == '' Or $(ApplicationTargetDir) == '*Undefined*'">$(SolutionDir)$(Configuration)\</ApplicationTargetDir>

    <!-- Plugins directory -->
    <PluginsTargetDir Condition="$(PluginsTargetDir) == '' Or $(PluginsTargetDir) == '*Undefined*'">$(ApplicationTargetDir)Plugins\</PluginsTargetDir>

    <!-- Determines if project is a plugin and it needs to be deployed to the solution application plugins folder -->
    <DeployPlugin Condition=" '$(DeployPlugin)' == '' ">false</DeployPlugin>

    <!-- Determines if project is the main application and it needs to be deployed to the solution application folder -->
    <DeployApplication Condition=" '$(DeployApplication)' == '' ">false</DeployApplication>

Is it possible to hand this variable over to Visual Studio Setup Project and have it setup all files inside that folder? I could also use a static folder name (although thats no so nice) but all the tutorials I find describe the main project output as the source for the setup but my use case is different because the main output comes from the msbuild task...

What I have tried:

I have tried installing all files (selecting all files manually) from the output folder but that did not generate a setup at all. Also tried to select all folders and mix it with the project output from the executeable (which does not contain all assemblies) but that did not work either because some files occured in both sources and the project just highlighted some files red without giving a hint of how to resolve this ...

Using a search engine in this case is difficult as I usually find articles about installing Visual Studio instead of articles about the VS Setup project :-(

The complete project and ms build file can be found on GitHub.
Updated 10-Nov-18 0:45am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900