Home

Is their a central place to put Nuget Packages

For example Json.net, I use this in 90% of my work. Every time I start writing a query, I have to go through the process of adding a package, which is a few clicks. Ideally, I select a bunch of Nuget packages and put them in a special location, and these are cached and always used. Thx

Comments

  • There are a number of solutions.

    One is to use the code snippet feature. Create a new query, add NuGet references to the package(s) you want, and also optionally add namespace references for commonly used namespaces in those packages. Then press F4 for query properties and click "Save as snippet". Choose a short name such as "json" (this becomes the shortcut). Then whenever you want to add these NuGet references and namespaces to a query, type json and press the Tab key.

    Another solution is to save an empty query that has the desired properties, and then right-click the query in "My Queries" and choose "Use as template for new query".

    The final solution is to add your commonly used NuGet package references to the "My Extensions" query - they'll then be available to all queries. Keep in mind that there's then no option to remove these references from individual queries.

Sign In or Register to comment.