Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To configure File System Package Store:</p> <pre class="lang-html prettyprint-override"><code>&lt;appSettings&gt; &lt;add key="Gallery:PackageStoreType" value="FileSystem" /&gt; &lt;add key="Gallery:FileStorageDirectory" value="C:\Path\To\Packages" /&gt; &lt;/appSettings&gt; </code></pre> <p>To point to a different SQL Server:</p> <pre class="lang-html prettyprint-override"><code>&lt;connectionStrings&gt; &lt;add name="NuGetGallery" connectionString="Data Source=SQLSERVERNAME;Initial Catalog=NuGetGallery;Integrated Security=SSPI" providerName="System.Data.SqlClient" /&gt; &lt;/connectionStrings&gt; </code></pre> <p>EDIT: Support SQL Server as Package Store</p> <p>If you want to store your packages as BLOBs in SQL Server, you'll have to make a couple of changes to the code.</p> <p>First, create a class named <code>SqlServerFileStorageService</code> and implement <code>IFileStorageService</code>. This interface has several methods. The important ones are <code>GetFile()</code> and <code>SaveFile()</code>. Combining <code>folderName</code> and <code>fileName</code> will create a unique key you can use in your database table.</p> <p>You can use the same connection string <em>NuGetGallery</em> or add a new one for your data access.</p> <p>You then add an item to the enum <code>PackageStoreType</code> called <code>SqlServer</code>.</p> <p>In ContainerBinding.cs add a case for <code>PackageStoreType.SqlServer</code> to bind to your <code>SqlServerFileStorageService</code>.</p> <p>Now the NuGet Gallery should create a <code>SqlServerFileStorageService</code> and all gets and saves will use your class to store the blob in SQL Server.</p> <p>BTW: I'm basing this on a cursory look at the code. There may be an extra step or two, but these look like the main areas you'll need to focus on.</p> <p>Hope that helps.</p>
 

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