The personal ramblings of Jon Carlos mobile & web developer and technology enthusiast.

Monday, 27 August 2012

Visual Studio touch file Post-build event

12:29 Posted by Jon Carlos No comments
Quick post as I’ve been working on a nopcommerce site recently and found that when writing plugins you have problems with the plugin cache not updating when you build your new plugin.

It seems there is an issue when you build that MVC does not pickup the newly created dlls until you restart the App Pool.

I found a post that said that you needed to touch the global.asax file to make this happen without recycling the App Pool.

I found this to be the case but got very quickl;y bored of opening and saving the global.asax file so I looked for an automated way yo do it.

In NopCommerce add the following code to you build script on  Nop.Web project and it'll automatically recycle the App Pool when you need it to.

copy /b "$(ProjectDir)global.asax" +,, "$(ProjectDir)"

0 comments: