Visual Studio本地工作区+启用Nuget包还原(disableSourceControlIntegration) [英] Visual Studio local workspace + Enable Nuget Package Restore (disableSourceControlIntegration)

查看:263
本文介绍了Visual Studio本地工作区+启用Nuget包还原(disableSourceControlIntegration)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对服务器工作区中的disableSourceControlIntegration = true(和/packages/未签入TFS)感到满意.

I was happy with disableSourceControlIntegration = true (and /packages/ not checked-in to TFS) in server workspace.

现在,我决定尝试使用本地工作区和繁荣-它在/packages/中找到了数千个检测到的更改",由于在我的NuGet.Config中disabledisableControlControlIntegration = true,应将其忽略掉

Now I decided to try local workspace and boom - it finds thousands of 'Detected Changes' in /packages/, which should be ignored because of disableSourceControlIntegration = true in my NuGet.Config

有人让本地工作区和程序包还原一起工作了吗? 我相信添加.tfignore是一个非常糟糕的选择. 顺便说一句,我正在使用VS13.

Anyone got local workspace and package restore working together? I believe that adding .tfignore is a really bad option. Btw, I'm using VS13.

推荐答案

在解决方案目录的根目录中,创建一个名为.nuget的文件夹,并添加具有以下内容的nuget.config.

In your solution directory root, create a folder called .nuget and add a nuget.config with the following contents.

<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution>
</configuration>

可以在此处找到其他配置设置: https://docs.nuget. org/docs/reference/nuget-config-settings

Additional configuration settings can be found here: https://docs.nuget.org/docs/reference/nuget-config-settings

您可能还需要关闭/重新打开Visual Studio,并且必须为\packages文件夹还原TFS源代码管理中的挂起更改(如果有挂起的添加项).

You might also need to close/reopen Visual Studio and have to revert pending changes in TFS Source Control for your \packages folder (if you have pending additions).

这篇关于Visual Studio本地工作区+启用Nuget包还原(disableSourceControlIntegration)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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