How do I run nGen at the end of the installation (MSI)?

前端 未结 6 1022
耶瑟儿~
耶瑟儿~ 2021-02-14 01:55

I would like to execute nGen at the end of my installation simply to improve the perceived performance of the first startup of my application. How could I do that? Is there are

6条回答
  •  心在旅途
    2021-02-14 02:09

    To improve the perceived performance at startup, take a look at statics in your application. Lots of statics can cause a significant amount of overhead when starting an application.

    Additionally, consider having just your main form in the EXE and everything else in a seperate DLL. This not only improves performance but helps in guarenteeing that your seperating the view from the data.

    Finally, if your set on NGENing, take a look at the help on running custom actions in your MSI. You should be able to set up a custom action to do what you want.

提交回复
热议问题