5

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.

Mark Baijens
  • 13,028
  • 11
  • 47
  • 73

2 Answers2

4

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.

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • Thanks for your response. At first refresh dependencies didn't seem to do anything. However after i rebooted VS, changed build configuration to from release to debug back to release and doing a full rebuild it solved this issue. Still wondering what could have caused this issue. – Mark Baijens Jun 03 '19 at 07:08
0

Recreate setup project.I think you are increment output folder .You reference same dll from output folder in setup dependency.Don't refer any file from output folder.

Jin Thakur
  • 2,711
  • 18
  • 15