cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CodeMedic42
Level 3

Macrovision.InstallShield.Tasks

We have recently moved to TFS and it isn't all that bad for the most part. I was tasked though with getting TFS Build up and running. This includes getting the deployment projects running as well.

After much tooling I have am close to the end, I see the light at the end of the tunnel if you will.

My MSBuild script attaches to the Macrovision.InstallShield.Tasks.dll and creates the Macrovision.InstallShield.Tasks.Installshield class and runs that. It works well except that TFS changes the output location of the binaries. So I need to set the PathVariables property, which I do. The problem is that for some reason this property never seems to be used and the original paths are used. The paths in the project file point to the bin folder for each .Net project.

Here is the code that I am using in the MSBuild script,...



"RELEASE_FOLDER







As you can see I create the ItemGroup to specify the path that I want Installshield to use to find the files to build the installation with. It just never seems to get it because the build fails by saying that it could not find the files.

Here is an example of one of the files not being found,...

C:\Current Build\Project\Project Build\BuildType\TFSBuild.proj(241,5): error : -6103: Could not find file "C:\Current Build\Project\Project Build\Sources\Source Code\Project.root\Project\bin\Obfuscated\Project.exe"

I have not found any information regarding this so if there is anyone anywhere that can help me I will be very extremely applicative.
Labels (1)
0 Kudos
(6) Replies
CodeMedic42
Level 3

applicative => appreciative

appreciative is more applicative in that sentance. 😄
0 Kudos
thepeter
Level 7

From what I can see in Macrovision.InstallShield.targets the only parameters you can pass to the task are: InstallShieldPath, Project, ProductConfiguration, ReleaseConfiguration, ReleaseFlags, OutputGroups, MergeModulePath, ProductVersion, PropertyOverrides. Nothing about changing path variables.
My approach to integrate IS in TFS is compiling the IS project through a custom target in my build script, instead of compiling it as a project in the main solution. I have an task that runs ISCmdBld.exe. This way I can make use of the -l parameter to override a path variable.
For the binaries path, try using $(BinariesRoot) property instead of the hardcoded value.

PS: this is how you create an Item:


0 Kudos
CodeMedic42
Level 3

Thank you for the reply,...

Macrovision.InstallShield.Targets was one of the stops on my search to get this working. From there I then moved on to actually using .Net Reflector on Macrovision.InstallShield.Tasks.dll. I saw among many other properties the PathVariables property. I believe that there are many properties that Macrovision.InstallShield.Targets is not using as that MSBuild script was written to be used in conjunction with a Visual Studio Installshield project.

I have also attempted to use your suggestion about the CreateItem code and have come up with this,…











This though has the same effect, i.e., The PathVariables property is accepted, or more to the point it is not complained about during the build process. But the end result is that the build does complain that the files to be built into the installation cannot be found.

Again any more help on this will be accepted with great thanks!
0 Kudos
CodeMedic42
Level 3

Also I just found this that describes the PathVaraibles Property...

http://kb.acresso.com/doc/Helpnet/installshield14helplib/MSBuild.htm

I believe that 14 refers to 2009. I know that this property is available in 2008, but if it does not work for 2008 only for 2009 then I guess that would be an answer, though not a good one.
0 Kudos
CodeMedic42
Level 3

*poke*

This cannot be the end of this. Either I am doing somthing completely wrong or there is a major bug in this assembly. I will admit that the first is much more likely. If that is the case then please someone tell me what I am doing wrong here. If it is the second one, then please, let me know as well and I will change my plan of attack.
0 Kudos
CodeMedic42
Level 3

*Hits keep alive button*
0 Kudos