Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installer project packaging files multiple times

Tags:

I have an installer project to generate a setup file for my project which is a WPF application combined with some libraries.

The setup project takes longer to build each time I run the build function.

From the output log I noticed that the packing of files happens a lot. And this number doubles each time a build is run.

I tested this with the following line:

Packaging file 'System.IO.dll'...

  • During my first test this line occurred over 16000 times.
  • During my second test this line occurred over 32000 times.

It explains why my build is so slow for a pretty simple application, but how can I solve this?

Noticed my project file is pretty big too compared to other projects (8000 lines) I suspect this is caused by the same issue.


I found out this issue will be reset when VS is rebooted. When VS is rebooted it will be packing each dll only 1 time. The 2nd build it will be packing each dll twice.

I'm still looking for a permanent solution for this problem.

like image 503
Mark Baijens Avatar asked May 31 '19 13:05

Mark Baijens


People also ask

How to add a setup project in visual studio?

From Visual Studio, choose Extensions > Manage Extensions, and search for "Visual Studio Installer Projects". Or, download the extension directly from the Marketplace. From the Start window, choose Create a new project, and then type "setup" in the search box. Choose a Setup project, and follow instructions.

How do I add content to setup project?

To add custom folders and/or files to setup project following these steps: File System – select setup project in Solution Explorer, right click select View -> File System option.

How do I create an MSI file in Visual Studio?

Go to Extensions > Manage Extensions > Online > Search, find, download and install Microsoft Visual Studio Installer Projects extension. 2). Add a new Setup Project in your solution > right-click Application Folder > Add > Project Output… > choose the corresponding Project > select Primary output > OK.


1 Answers

Take a look at this similar issue.

I would think it's one issue about setup project itself, but not msbuild. And after my test, though the same message has changed from 1 to 2 to 3 to 4, the real build time is similar.(Maybe because my project is small so the consuming-time is not easy to compare?) .

enter image description here

1.You can try right-click on the "Detected Dependencies" folder and select the option "refresh dependencies".

The Setup project will then resolve and remove any redundant references. (The build output will always display the message more than once but the build time can be shorter)

2.And the only way i found which can resolve the wrong message output is restart VS and build it.(Not suggested) I suggest you post this issue to the team who support this extension.

like image 106
LoLance Avatar answered Oct 19 '22 06:10

LoLance