Visual Studio and Autoscript generation

Got a problem you cannot solve? Try here.
Paul.Bommel
Posts: 3
Joined: Thu Jan 28, 2016 4:55 am

Visual Studio and Autoscript generation

Postby Paul.Bommel » Thu Jan 28, 2016 7:24 am

Hello, I'm using a licensed Installaware 18 Studio, but the Problem also appears in X3.
I'm using Visual Studio 2013.

Following Problem:

I've created a small Project containing of an exe and assembly.
Both compile into $SOLUTIONDIR\bin\$CONFIGURATION.

I get the following output from the IA VS Plugin:

Code: Select all

Building Project: SetupProject
Output Folder: D:\SetupProject2\InstallAware\Release\UncompressedDeployment Type: Uncompressed Directory Layout
Code Signing: Disabled
Compression: Best
Compiler Variables: UAC=highestAvailable,BUILDMODE=CD,LANGUAGE=English,TITLE=SetupProject,TARGETDIR=$TARGETDIR$,IADIR=C:\PROGRA~2\INSTAL~1\INSTAL~1,PROJDIR=D:\SETUPP~1\INSTAL~1,IAVER=18.07
###
Cleared output folder D:\SetupProject2\InstallAware\Release\UncompressedBuilt plug-in action Windows Installer
Built plug-in action (Un)Install MSI Setup
Built plug-in action Windows Installer
Built plug-in action File Bag
Built plug-in action (Un)Install MSI Setup
Built plug-in action File Bag
Built plug-in action (Un)Install MSI Setup
Copied file D:\SetupProject2\bin\Debug\SetupProject.Launcher.exe
Error during build: Unable to compile MSI action install assembly


In IA 18 the Setup ends with error code 2721.

Workaround:

In IA under Project -> Setup-Architecture -> Assemblies
It lists two assemblies:
D:\SetupProject2\src\SetupProject.Contracts\..\..\bin\Debug\SetupProject.Contracts.dll
D:\SetupProject2\bin\Debug\SetupProject.Contracts.dll

Why I get two entries? The first is equal to the second.
Doesn't matter if I remove the first or the second, I still get the "Error during build: Unable to compile MSI action install assembly" failure.

If I remove both and add the file "D:\SetupProject2\bin\Debug\SetupProject.Contracts.dll" to Project -> Setup-Architecture -> Files -> $TargetDir$ the setup build runs.


So far, so assembly->file problem...

Now, if I have a larger project, InstallAutogen.mia handles the files.
That means for me, I've no possibility to remove the assemblies and readd them as file, because the autogen.mia will always be overridden when I hit "Build Setup".

So I would need the following:

1. The automatic removing of assembly paths, which are already added.
2. The possibility to remove the scanned assemblies (inside of visual studio) and readd them as files.

Any Ideas?
Attachments
SetupProject.zip
Sample VS Project
(45.52 KiB) Downloaded 307 times

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Visual Studio and Autoscript generation

Postby FrancescoT » Thu Jan 28, 2016 12:08 pm

Dear Paul,

the Install Assembly IA command requires strong named assemblies.
You may replace that command with the "Run program" command to execute "REGASM".

Run Program allows command line parameters and replicates the same identical functionality that you usually have with manually registering from command prompt.

http://www.installaware.com/forum/viewtopic.php?f=2&t=1265&start=0

Hope this helps you.

Regards
Francesco Toscano
InstallAware Support
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Paul.Bommel
Posts: 3
Joined: Thu Jan 28, 2016 4:55 am

Re: Visual Studio and Autoscript generation

Postby Paul.Bommel » Mon Feb 01, 2016 2:27 am

Hello FrancescoT,

thank you for your help.

As far as I know, "Run Program" is executed after the setup is done.
The Visual Studio Plugin already created a "FinishAutogen.mia", because I checked the "Run Programm after Installation"-checkbox:

Image

And "REGASM" shouldn't be used, because I've unchecked it:

Image

The assemblies shouldn't be installed in the GAC at all:

Image

I know that "Install Assembly" in IA needs strong named assemblies, that's why I used "Install Files" in the past.
You suggest to replace the command, so I ask you how?
As said, the VS-Plugin had created an additional script for the file installation ("InstallAutogen.mia"):

Image

Now, if I replace a line (/command) in that script, it'll be overriden, the next time I hit "Build Setup" in the IDE.
Of course I already tried to replace all "Install Assembly" with "Install Files", but it didn't worked. (see above, the file was overridden during the build process)

The problem is not to manually register the assemblies from the command prompt. ;)

Regards,

Paul Bommel

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Visual Studio and Autoscript generation

Postby FrancescoT » Mon Feb 01, 2016 11:52 am

Dear Paul,

yes, you are right!

If your Assemblies are not non-strongly signed, you can only install them as if they were regular files ("Install Files" command) and optionally if required, you may register them using the "Run Program" script command.

Unfortunately the IA Visual Studio Add-in uses by default the "Install Assembly" command when including an assembly file to install.

Consequently in your case, you should use the full IA IDE to create\manage your project and not the "IA Visual Studio Add-in".

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Paul.Bommel
Posts: 3
Joined: Thu Jan 28, 2016 4:55 am

Re: Visual Studio and Autoscript generation

Postby Paul.Bommel » Tue Feb 02, 2016 4:20 am

Hello Francesco,

if I got you right:
If I want to use the VS Plugin, I need strong named Assemblies for the setup build progress.

hmm, so I've three options:

1. I create strong named assemblies during the build process.
2. I use the IA IDE for setup project management.
3. I write my own VS plugin.

Currently I'll go with the second, because it's the way it's done at the moment.
Pity! It's a bit inconvenient.

Maybe I'll try to sign assemblies in future, so the plugin will work.

Anyway, thank you for your help.

Regards,

Paul Bommel

PS:

You said: "[...]IA Visual Studio Add-in uses by default the "Install Assembly" command when[...]"
"By default" means it's configurable? If so, where/how could it be configured?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Visual Studio and Autoscript generation

Postby FrancescoT » Tue Feb 02, 2016 10:26 am

Dear Paul,

the "IA Visual Studio Add-in" works in this way by design and it's not possible to change/modify its behavior.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot] and 122 guests