Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Problems with Visual Studio Extention

Greetings! I'm trying to create an installer project in Visual Studio 2022. My project has the following structure
Снимок экрана 2023-08-15 200400.png
Снимок экрана 2023-08-15 200400.png (11.28 KiB) Viewed 13048 times
After creating the installer project, I add the files from the Visual Studio project setup
Снимок экрана 2023-08-15 200555.png
Снимок экрана 2023-08-15 200555.png (26.27 KiB) Viewed 13048 times
Herein lies the first problem: selecting the "Symbols" checkbox in the parent project is not enough to copy the symbols of all linked libraries in the installer project. I have to select the Symbols checkboxes in all linked projects, but there's a second problem.
Снимок экрана 2023-08-15 201155.png
Снимок экрана 2023-08-15 201155.png (8.33 KiB) Viewed 13048 times
Instead of the expected location of all files in one folder, I get a separate folder for a separate project. In the Visual Studio editor, I can't move these files to the root folder of my application.
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

Unfortunately I couldn't attach more than 3 images to the post, so I'll continue here.

So, it works by moving the files to the root directory of the application in the Advanced Installer editor.
Снимок экрана 2023-08-15 201611.png
Снимок экрана 2023-08-15 201611.png (24.09 KiB) Viewed 13046 times
But there is a third problem: until I open the project in Visual Studio or run the build from there.
However, today I found a temporary solution by specifying the checkboxes as in the screenshot.
Снимок экрана 2023-08-16 144329.png
Снимок экрана 2023-08-16 144329.png (27.17 KiB) Viewed 13046 times
But in this case the library files are twice in the project.
Снимок экрана 2023-08-16 144442.png
Снимок экрана 2023-08-16 144442.png (20.99 KiB) Viewed 13046 times
This does not affect the build process or the application in any way, but it is certainly not the expected behaviour.
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

Still, it increases the size of the installer:
Снимок экрана 2023-08-16 154111.png
Снимок экрана 2023-08-16 154111.png (16.41 KiB) Viewed 13043 times
Снимок экрана 2023-08-16 154223.png
Снимок экрана 2023-08-16 154223.png (30.78 KiB) Viewed 13043 times
Probably files are actually packed twice. This can no longer be called acceptable behaviour.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems with Visual Studio Extention

Hello,

First of all, please accept my apologies for the delayed reply.

Unfortunately, I can not say for sure why this is happening.

Are those files perhaps shared between multiple projects? For example, is "Capture.dll" part of more than one project?

I am thinking that perhaps this is why the file is added twice.

For other DLLs, I see that you have per-architecture (e.g. one 32 and one 64 --> "EasyHook.dll").

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

Catalin wrote: Are those files perhaps shared between multiple projects? For example, is "Capture.dll" part of more than one project?
No, this project is only included in one, which is an executable app in this solution.
Catalin wrote: I am thinking that perhaps this is why the file is added twice.
I've already written above why this is happening. Please re-read it again. Each next post is not a solution to the previous one, it's a description of the same problem, because can't attach more than 3 pictures in one post.

The first time it is added is when I tick "References" for the main project. The second time it is added is when I tick "Primary" in the Capture project itself. I have to do this because otherwise the debugging symbols are added by the installer project to the subdirectories. Drag-n-drop, copypaste only work until I open this project in the Visual Studio editor or start the build process (which is equivalent to opening the project and verifying it).
Catalin wrote: Tue Aug 22, 2023 9:17 am For other DLLs, I see that you have per-architecture (e.g. one 32 and one 64 --> "EasyHook.dll").
You can't see it because I don't include 32bit versions of builds even in Debug Configuration :D
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems with Visual Studio Extention

Hello,

Please note I have sent an email to the email address that you used to register on our forums - containing a possible fix for this.

If you encounter any issues, please let me know.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

Thank you, I wrote a reply ;)
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems with Visual Studio Extention

You are always welcome!

Let's continue the thread there.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

I've noticed another problem. When creating a project in Visual Studio, the DefaultBuild configuration is created. Perhaps it would be more appropriate to create the usual defaults: Debug and Release.
Снимок экрана 2023-09-03 163740.png
Снимок экрана 2023-09-03 163740.png (31.9 KiB) Viewed 10824 times
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems with Visual Studio Extention

Hello,

Please note that's not a "problem", but rather the default behavior.

Based on the selected configuration, the files path will be updated.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

There's a nuance. I can make different settings in different configurations. For example, different list of files in Debug and Release. But this behaviour only allows me to copy the same files from either Debug or Release directory to the installer in automatic mode.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems with Visual Studio Extention

Hello,

If possible, could you please expand a bit on that with some examples/screenshots?

This would greatly help me better understand your scenario and forward your feedback to our dev team for a possible improvement here.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Orion33
Posts: 11
Joined: Tue Aug 15, 2023 2:54 pm

Re: Problems with Visual Studio Extention

Actually, I don't know what can be shown in screenshots in more detail. I already showed the structure of my project earlier when I had an issue with debugging symbols. I want to be able to create two installers for Debug and Release configurations. I expect that the Debug installer will include PDB files, while the Release one won't. However, since the Advanced Installer project only has one configuration, the "Symbols" flag will always be enabled. Of course, I can turn off PDB compilation in the Release configuration, but I would like to have the option to provide symbols to the end user in case they encounter an unexpected exception. So, for building the Release version, simply switching the configuration in Visual Studio isn't enough; I need to adjust the settings in the Advanced Installer project, which contradicts the concept of configurations.

Second example. I want to set up a GitHub Action to build my solution and have two Installers for two different configurations as build artifacts. When I run msbuild MySolution.sln, I see in the GitHub logs that both projects are being built. Which one of them will be included in the Installer? Even if you know the answer to this question, it will be one, not two, even though the concept of building a solution with different configuration settings suggests having a build product for each configuration.

Certainly, I could create two tasks and specify with a parameter in the msbuild command which configuration I want to build. But what if there are 10 of them? :D This again contradicts the concept of automation.

In general, it seems to me that the Advanced Installer project, integrated into Visual Studio, should also fully support its configuration concept without any workarounds ;)
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems with Visual Studio Extention

Hello,

Thank you very much for your feedback here!

The scenario is definitely clearer for me now and I have added an improvement request in our bug tracking tool.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”