Plugins not getting updated on build

6 years ago
I used to be able to only build my plugin project and reload page to see updates. All of the sudden that is not working anymore and the only way the get my plugin changes through is to rebuild entire soulution and start the dubugger, which takes tremendous of time. Anyone know what possibly can cause this? Or how to troubleshoot?
6 years ago
mgustafsson wrote:
I used to be able to only build my plugin project and reload page to see updates. All of the sudden that is not working anymore and the only way the get my plugin changes through is to rebuild entire soulution and start the dubugger, which takes tremendous of time. Anyone know what possibly can cause this? Or how to troubleshoot?


build the plugin project and then reload plugins at plugins page
6 years ago
hezyz wrote:
build the plugin project and then reload plugins at plugins page


Unfortunately that did not work.

If I build (or rebuild) the plugin project then run the debugger (without rebuilding the entire solution) the breakpoints won't get hit. If I rebuild entire solution they will get hit.
6 years ago
Is your plugin set to the right output directory when you build in debug mode?
6 years ago
AndyMcKenna wrote:
Is your plugin set to the right output directory when you build in debug mode?


Yes. I even deleted the plugin dll, rebuilt the plugin, watched the new dll get saved back in my plugin output directory, but changes still not get picked up by Nop.
6 years ago
The plugins are only shadow copied during the initial app startup.  If you are only replacing them you would need to click on Restart Application or do something that will trigger a recycle (modify anything in the root bin, change web.config/global.asax).  That's probably why it seems to work when you do a full rebuild but not just rebuilding your plugin.

I'm not sure but I think you can just "touch" (update the modified date on the file) the web.config and it will trigger a rebuild.

Check out the 2nd answer here:  http://stackoverflow.com/questions/51435/windows-version-of-the-unix-touch-command  You could probably do that in your Build Events
6 years ago
Try clearing your temporary Internet files (once) - C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files. Let me know if it helps
6 years ago
Nothing I try seems to work. But I found this is only happening for this particular plugin, so something must be messed up with it. I'm going to recreate and see if that helps.
3 years ago
AndyMcKenna wrote:
The plugins are only shadow copied during the initial app startup.  If you are only replacing them you would need to click on Restart Application or do something that will trigger a recycle (modify anything in the root bin, change web.config/global.asax).  That's probably why it seems to work when you do a full rebuild but not just rebuilding your plugin.

I'm not sure but I think you can just "touch" (update the modified date on the file) the web.config and it will trigger a rebuild.

Check out the 2nd answer here:  http://stackoverflow.com/questions/51435/windows-version-of-the-unix-touch-command  You could probably do that in your Build Events


To Andy's suggestion to touch a file to trigger an automatic app restart...

Add this to the plugin project properties in Visual Studio - Post-build event:
powershell (Get-Item '$(SolutionDir)Presentation\Nop.Web\bin\Nop.Web.dll').LastWriteTime = Get-Date


You have to have powershell installed.  Basically it just updates the Nop.Web.dll timestamp so that when you refresh your browser, Nop restarts automatically and sucks in your plugin changes.