Hi NopCommerce lovers, its great to be in love with any opensource solution like NopCommerce. Its long time that I am playing with NopCommerce because I started learning MVC from that. There comes some errors while publishing NopCommerce from visual studio something like "Could not load file or assembly" for Autofac.dll, Nop.Services Nop.Services.dll, Nop.Web.Framework, Nop.Services.dll could not be found etc. Today we are going to discuss about that why these errors get occurs. When I dig in deep I found that when we unzip the NopCommerce source zip file, there are locks applied on some of the directories/files by default. This is the reason when we go for publishing the NopCommerce solution Visual Studio failed to find those locked files.
Now lets come to the solutions. There are many solutions but the most easiest one is to unlock all the folders inside the source folder and to do that you need to launch powershell as administrator. One you have launched the powershell cope following command in it and press enter :
dir [path of source folder] -recurse | Unblock-File
Now run again your Visual Studio and try to publish your solution, hopefully you get succeed this time. Thanks