Solution build error - Rebuild Solution failed in Release mode 3.40

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hey Guys,

I just downloaded  3.40 source code from Codeplex, Rebuild Solution works fine with Debug mode but I can not Rebuild Solution or Run solution in Release mode.

I am not sure you guys also noticed same or if there is any other topic already opened.

Anyway, I tried to build the Libraries projects one by one in Release mode.
Nop.Core - build success
Nop.Data - build success
Nop.Services - build failed
Error  68  Could not load file or assembly '....\packages\Autofac.3.5.0\lib\net40\Autofac.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)  

But I see Autofac already referenced correctly, if I removed autofac and re-reference from NuGet, then same error for EPPlus and so on.

I also tried using 'Allow NuGet to download missing packages' from Visual Studio -> Options -> Package Manager but no luck

I am using Visual Studio 2013 Ultimate

Appreciate your response.
9 years ago
Hi,

for some reasons the downloaded dll's could be blocked.
You should go to every dll that cannot compile, right click it and choose 'Unblock'.

For more information, please see this link: http://stackoverflow.com/questions/21753979/visual-studio-could-not-load-file-or-assembly-operation-is-not-supported-erro.
9 years ago
like the above, but with a shortcut
right click on the downloaded file (the compressed one) -> properties -> press "Unblock"
then unzip the file

it will unblock all the files
9 years ago
Perfect, thanks nop-template, thanks hezy
9 years ago
I was able to fix it by renaming the packages folder in windows explorer and allowing NuGet to restore packages for the solution. Then just take the NopCommerceCustom folder from the old packages folder and it worked like a charm.

I thought this was a little easier than the hassle of unlocking files or unzipping again.
8 years ago
Another short cut, if you are familiar with nuget packages, do the following:
- Removed all packages under packages folder except custom packager from NopCommerce (nopCommerceCustom, since this is no a nuget package)
- Right click on your solution, and click on : Manage Nuget Pack. for Solution
- You should see "Restore" in the top of the screen
- Do clicking the restore button, will take sometimes to restore those packages
- Once done, you should be good rebuilding with release.

Note: backup your older package folder, in case these steps won't work for you.
8 years ago
yohanes wrote:
Another short cut, if you are familiar with nuget packages, do the following:
- Removed all packages under packages folder except custom packager from NopCommerce (nopCommerceCustom, since this is no a nuget package)
- Right click on your solution, and click on : Manage Nuget Pack. for Solution
- You should see "Restore" in the top of the screen
- Do clicking the restore button, will take sometimes to restore those packages
- you still need to manually unblock those dlls under /nopCommerceCustom folder.
- Once done, you should be good rebuilding with release.

Note: backup your older package folder, in case these steps won't work for you.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.