How to include assemblies from NuGet packages in a VSIX Installer?

后端 未结 4 1288
感动是毒
感动是毒 2021-01-04 02:42

I\'m working on creating a Visual Studio 2017 custom Check-In Policy extension. My current solution is structured as follows:

Note: I am taking advantage of

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-04 03:22

    I was able to successfully include NuGet packages in a template by performing the steps outlined in the following Microsoft tutorial: Packages in Visual Studio templates

    SDKs that are installed using an MSI can install NuGet packages directly on the developer's machine. This makes them immediately available when a project or item template is used, rather than having to extract them during that time. ASP.NET templates use this approach.

    I have seen others experiencing problems because of the NuGet packages they are using. For .NET Core, I have used Microsoft.Net.Http, although it does require Microsoft.BCL. Unless you are experiencing problems, I suggest leaving legacy systems as-is, especially since these namespaces seem to be moving targets.

    It appears System.Net.Http is the correct choice, at least for .NET on the Windows platform. It is also worth nothing that this package has no external dependencies.


    EDIT: It appears this could be related to bugs with PackageReference itself. I see a similar documented bug described here.

提交回复
热议问题