none
Install NuGet package programmatic in ASP.NET Core project template RRS feed

  • Question

  • I am developing the custom project template for the ASP.NET Core in Visual Studio 2017 by using VSIX extension project. I am using the IVSPackageInstaller to install the custom 3rd party packages into the ASP.NET Core project with the below default function.

    InstallPackage(string source, Project project, string packageId, string version, bool ignoreDependencies);

    While running the above function I have faced the below error.

    1. How can I solve this problem?

    2. Please suggest to me anyother simplest way to install the NuGet packages at runtime into the ASP.NET Core project

    Thanks,

    Ganesan R.

    


    Tuesday, April 4, 2017 10:29 AM

All replies

  • Hi GaneshRengasamy,

    >>1. How can I solve this problem?

    Please try the following workaround:

    open VS2017 (without loading your solution), open the Package Manager Console, wait for it to fully load, then open your solution.

    >>. Please suggest to me anyother simplest way to install the NuGet packages at runtime into the ASP.NET Core project

    You could use  IVSPackageInstaller to install the custom 3rd party packages.

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 6, 2017 7:16 AM
    Moderator