Nuget PowerShell script to modify Global.asax.cs

后端 未结 4 1882
一生所求
一生所求 2021-01-06 01:22

I\'m building a nuget package for my company MVC4 template. I have run into an issue where I need the Global.asax.cs to be modified to add these two lines:

4条回答
  •  执念已碎
    2021-01-06 01:46

    I would take a look at WebActivator before going down the route of writing a PowerShell script to update existing source code. WebActivator is a NuGet package that you can use to add startup and shutdown code into an application without having to modify global.asax.

    You will probably want to use the PostApplicationStartMethod attribute so your bundle registration is done at the end.

提交回复
热议问题