Update MiniProfiler.MVC3 NuGet package after editing MiniProfiler.cs in App_Start

In the NaGet MiniProfiler.MVC3 package, it creates a file in App_Start, which is used to control MiniProfiler settings (used by SqlFormatter, changes in ViewEngines, when to launch MiniProfiler, etc.).

There are many TODO comments in this file that talk about how to change the code to execute the way you want. This is great, but when the NuGet package is updated, it will see that I changed the file and did not pull out the updated version. The problem here is that I lose any updates for this file and depending on what is still updated in the package, which makes it unusable (for example, when updating MiniProfiler.MVC3 from version 1.9 to version 2.0.1 after changing MiniProfiler.cs in App_Start, the project will no longer be created due to the necessary changes to this file in version 2.0.1).

What is the best way to handle this? Should I create my own file in App_Start and not modify it in the NuGet package, ensuring that I always get a full update when upgrading to the latest version of NuGet package?

+5
source share
3 answers

You can back up the file in App_Start, update it, then merge the files manually or using the merge tool. You will probably do it anyway if you use a control source.

+1
source

Quick and dirty: create the file you want. Then copy / merge each time you upgrade using nuggets. Or with each compilation. The added build time is negligible.

: precompile visual studio . - , . , , " xxx".

0

All Articles