简体   繁体   English

Visual Studio本地工作区+启用Nuget包还原(disableSourceControlIntegration)

[英]Visual Studio local workspace + Enable Nuget Package Restore (disableSourceControlIntegration)

I was happy with disableSourceControlIntegration = true (and /packages/ not checked-in to TFS) in server workspace. 我对服务器工作区中的disableSourceControlIntegration = true(和/ packages / not-checked-in TFS)感到满意。

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 现在我决定尝试本地工作空间和繁荣 - 它在/ packages /中发现了数千个“检测到的变化”,由于我的NuGet.Config中的disableSourceControlIntegration = true,因此应该忽略它们

Anyone got local workspace and package restore working together? 任何人都有本地工作区和包恢复一起工作? I believe that adding .tfignore is a really bad option. 我相信添加.tfignore是一个非常糟糕的选择。 Btw, I'm using VS13. 顺便说一下,我正在使用VS13。

In your solution directory root, create a folder called .nuget and add a nuget.config with the following contents. 在解决方案目录根目录中,创建一个名为.nuget的文件夹,并添加一个带有以下内容的nuget.config

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

Additional configuration settings can be found here: https://docs.nuget.org/docs/reference/nuget-config-settings 其他配置设置可在此处找到: https//docs.nuget.org/docs/reference/nuget-config-settings

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,并且必须还原\\packages文件夹的TFS源代码管理中的挂起更改(如果您有待处理的添加项)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决 Visual Studio 中的“NuGet package 还原失败”? - How to resolve "NuGet package restore failed" in Visual Studio? Visual Studio编译错误-计算机中缺少nuget软件包,但是nuget restore表示已安装所有软件包? - Visual Studio compile error - nuget package missing from computer, but nuget restore says all packages installed? “启用NuGet包恢复”在VS 2015中消失了 - “Enable NuGet Package Restore” is gone in VS 2015 Visual Studio 中的 Nuget package 内容 - Nuget package content in Visual Studio 在 Visual Studio 中更新 Nuget Package - Updating Nuget Package in Visual Studio Nuget 包未在 Visual Studio 中更新 - Nuget package not updating in Visual Studio 在Visual Studio 2015 Enterprise中Nuget还原失败 - Nuget restore fails in Visual Studio 2015 Enterprise Visual Studio 2017-无法还原Nuget程序包 - Visual studio 2017 - Not able to restore Nuget packages NuGet在Visual Studio 2015中自动打包还原是童话还是神话中的野兽? - Is NuGet automatic package restore in Visual Studio 2015 a fairy tale/mythical beast? Visual Studio 2013 NuGet包还原在命令行中不起作用(不是msbuild而是vcvarsall.bat) - Visual Studio 2013 NuGet package restore does not work from command line (not msbuild but vcvarsall.bat)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM