Visual Studio local workspace + Enable Nuget Packa

2019-05-11 09: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条回答
ら.Afraid
2楼-- · 2019-05-11 10:01

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).

查看更多
登录 后发表回答