cancel
Showing results for
Show  only  | Search instead for
Did you mean:
Highlighted
Flexera beginner

## Correct use of <VSSolutionFolder>

What is the correct use of <VSSolutionFolder> ?  I have the following folders and files for a Visual Studio solution:

C:\MySolution\MySolution.sln
C:\MySolution\MyInstallShieldProject\MyInstallShieldProject.ism
C:\MySolution\MyInstallShieldProject\dotNetFx45_Full_setup.exe

In ApplicationData\Redistributables, I've checked "Microsoft .NET Framework 4.5 Web", then right-clicked to Edit Prerequisite, where I would like to specify the Path to Local File.  I've tried

<VSSolutionFolder>\MyInstallShieldProject\dotNetFx45_Full_setup.exe
<VSSolutionFolder>\MySolution\dotNetFx45_Full_setup.exe
<VSSolutionFolder>\MySolution\MyInstallShieldProject\dotNetFx45_Full_setup.exe
<VSSolutionFolder>\dotNetFx45_Full_setup.exe
.\MyInstallShieldProject\dotNetFx45_Full_setup.exe
.\dotNetFx45_Full_setup.exe

All result in a dialog popping up that says "The specified file does not exist".  How can I specify a Path to Local File that will work when the build runs somewhere else besides my computer?

4 Replies
Highlighted
Flexera

## Re: Correct use of <VSSolutionFolder>

Hi @tbomgardner ,

https://helpnet.flexerasoftware.com/installshield22helplib/helplibrary/VSSolutionFolder.htm

And you can get the value of the <VSSolutionFolder>  in MEDIA->Path Variables.

Highlighted
Flexera beginner

## Re: Correct use of <VSSolutionFolder>

Thanks, I've seen that web page, and every other page remotely related to VSSolutionFolder.  Unfortunately, nowhere is there any indication how VSSolutionFolder is defined, and none of the obvious interpretations work.

So I'm still stuck trying to figure out how to use VSSolutionFolder.

Highlighted
Flexera

## Re: Correct use of <VSSolutionFolder>

Hi @tbomgardner ,

The VSSolutionFolder path variable is defined automatically whenever an InstallShield project is opened from within a Visual Studio solution. It is also defined automatically if you are using MSBuild to build a solution that contains an InstallShield project.

However, in other scenarios, when the InstallShield project is opened without the Visual Studio solution, VSSolutionFolder cannot be defined automatically. For example, if you open the InstallShield project in InstallShield directly, without having Visual Studio open, VSSolutionFolder is not defined. Similarly, if you use the command-line tool IsCmdBld.exe, or if you use MSBuild with an .isproj file, VSSolutionFolder is not defined.

My suggestion would be to use your own defined path variable, and refer your files using the newly defined path variable. Else if you want to use VSSolutionFolder, looks like you have to override if you are using command-line tool IsCmdBld.exe, or if you use MSBuild with an .isproj file.

Highlighted
Flexera beginner

## Re: Correct use of <VSSolutionFolder>

Thanks again.  As I mentioned, I've already read and re-read all the relevant online documentation concerning VSSolutionFolder.  Yes, I am using Visual Studio, as I also explained in my original message.  Contrary to the documentation, the VSSolutionFolder path variable is apparently  NOT defined automatically whenever an InstallShield project is opened from within a Visual Studio solution.   At least not in a way that is of any practical use whatsoever.

My isproj, opened from within Visual Studio, does not recognize  VSSolutionFolder as a valid path.

So I will ask one more time, and hope someone can provide an answer other than quoting web pages I've already read multiple times, and which do not have the answer I need: With the InstallShield project opened in Visual Studio, and given these files:

C:\MySolution\MySolution.sln
C:\MySolution\MyInstallShieldProject\MyInstallShieldProject.ism
C:\MySolution\MyInstallShieldProject\MyInstallShieldProject.isproj
C:\MySolution\MyInstallShieldProject\dotNetFx45_Full_setup.exe

What is the correct path using VSSolutionFolder to dotNetFx45_Full_setup.exe?