在ASP.NET Core项目模板中安装NuGet程序包

编程入门 行业动态 更新时间:2024-10-25 17:20:02
本文介绍了在ASP.NET Core项目模板中安装NuGet程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用VSIX扩展项目在Visual Studio 2017中为ASP.NET Core开发自定义项目模板。我使用IVSPackageInstaller使用以下默认函数将自定义第三方软件包安装到ASP.NET Core项目中。

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。我该如何解决这个问题?

1. How can I solve this problem?

2。请建议我在运行时将NuGet包安装到ASP.NET Core项目中的任何其他最简单的方法

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

谢谢,

Ganesan R。

Ganesan R.

推荐答案

您好GaneshRengasamy,

Hi GaneshRengasamy,

>> 1。如何解决此问题?

请尝试以下解决方法:

Please try the following workaround:

打开VS2017(无加载您的解决方案),打开软件包管理器控制台,等待它完全加载,然后打开您的解决方案。

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

>>。请向我建议在运行时将NuGet包安装到ASP.NET Core项目中的任何其他最简单方法

您可以使用IVSPackageInstaller来安装自定义第三方软件包。

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

祝你好运,

Cole Wu

更多推荐

在ASP.NET Core项目模板中安装NuGet程序包

本文发布于:2023-11-16 11:11:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603749.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模板   项目   程序包   NET   ASP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!