JOhn
JOhn

Reputation: 1

Orchard - Deployment/publish - Error: NuGet.core.dll acces denied

O/ Stack

So im trying to publish my first Orchard CMS to a webserver, but i seem to get this the same error every time i try to publish it - both from inside Visual Studio & from the ClickToBuild.bat file. I have been using a good 1-2 hour on google, and havent been able to come with ANYTHING.

Visual Studio Version: 2012 Orchar Version: 1.6.1 Error msg:

"Unable to copy file "C:\Users\Mac\Documents\Visual Studio 2012\Projects\Orchard CMS\lib\nuget\NuGet.Core.dll" to "bin\NuGet.Core.dll". Access to the path 'bin\NuGet.Core.dll' is denied. Orchard.Web"

Have anybody tried anything similar?

Upvotes: 0

Views: 272

Answers (1)

Paul Devenney
Paul Devenney

Reputation: 1319

generally a message like this means that you have the location you are copying to locked. In Orchard one of the more common ways is probably to have a cmd line currently open that has the "orchard" command running currently (it would almost certainly load pretty much everything in BIN up when it creates its shell context).

The brute force test is close your machine and restart. Then go straight into VS and do the publish operation. In general, if this kind of "access denied to bin" error occurs, check the following

The

  1. orchard command line tool is not currently running in cmd or powershell

  2. You don't have a sub-folder of the bin folder open in an additional windows explorer window

  3. You don't have the properties dialog of the file itself open

  4. You have'tried closing and re-opening VS, as sometimes it does not let go of a lock

If you want to really diagnose the issue (because it happens regularly even after restarts), then I would suggest using Process Explorer to identify the process that is maintaining a handle.

Upvotes: 1

Related Questions