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

不打扰是莪最后的温柔 提交于 2019-12-22 10:46:22

问题


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

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

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


回答1:


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>

Additional configuration settings can be found here: 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).



来源:https://stackoverflow.com/questions/24386933/visual-studio-local-workspace-enable-nuget-package-restore-disablesourcecontr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!