NuGet.exe 包提供对路径的访问被拒绝 [英] NuGet.exe pack gives access to the path is denied

查看:90
本文介绍了NuGet.exe 包提供对路径的访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试打包我的 MVC 项目(NuGet.exe 包)时,我得到:

When I try to pack my MVC project (NuGet.exe pack) I get:

NuGet.exe : Access to the path '...' is denied.

我的 MVC 解决方案的 contentscript 文件夹中的所有文件恰好都是这种情况.如果我删除所有这些文件上的只读标志,NuGet.exe 就能够创建 NuGet 包.

This happens to be the case for all files in the content and script folder of my MVC solution. If I remove the readonly flag on all these files NuGet.exe is able to create the NuGet package.

为什么我必须删除只读标志?还有别的方法吗?

Why do I have to remove the readonly flag? Is there another way?

我正在使用 TFS,它在源代码控制下的所有文件上指定只读标志.

I'm using TFS which specify the readonly flag on all files under source control.

我正在跑步:

  • NuGet 版本:1.7.30402.9028
  • Microsoft Visual Studio 2010 版本 10.0.40219.1 SP1Rel

我使用的是您在安装 NuGet 包 NuGet.CommandLine 时获得的 NuGet.exe,它位于 http://nuget.org/packages/NuGet.CommandLine.

I'm using the NuGet.exe that you get when you install the NuGet package NuGet.CommandLine which is located at http://nuget.org/packages/NuGet.CommandLine.

推荐答案

显然,你需要为它访问的文件设置ReadOnly=false

Apparently, you need to set ReadOnly=false for the files it accesses

这篇关于NuGet.exe 包提供对路径的访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆