Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>NuGet can use local settings for it's behavior which can be unpredictable if you're not 100% sure how the server is configured. </p> <p>I prefer putting the NuGet settings inside the <code>&lt;sln root&gt;/.nuget/NuGet.targets</code> file which is version controlled and at a single location. I got this working with 3 quick edits to <code>&lt;sln root&gt;/.nuget/NuGet.targets</code>, they should look as below after editting:</p> <p><strong>Change 1</strong>:</p> <pre><code>&lt;!-- Enable the restore command to run before builds --&gt; &lt;RestorePackages Condition=" '$(RestorePackages)' == '' "&gt;true&lt;/RestorePackages&gt; </code></pre> <p><strong>Change 2</strong>: </p> <pre><code>&lt;!-- Determines if package restore consent is required to restore packages --&gt; &lt;RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' "&gt;false&lt;/RequireRestoreConsent&gt; </code></pre> <blockquote> <p>My comment: Awkward logic but think of "<em>requires consent not equal to false must be true</em>" (original) as "<em>requires consent equal to true must be true</em>" (translated) and it makes sense to change the last part to "<em>false</em>" (the edit)</p> </blockquote> <p><strong>Change 3</strong> : I also added/uncommented the <code>&lt;PackageSource ... &gt;</code> tag to to remove any dependencies on the </p> <pre><code>&lt;ItemGroup Condition=" '$(PackageSources)' == '' "&gt; &lt;PackageSource Include="https://nuget.org/api/v2/" /&gt; &lt;/ItemGroup&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload