上传NuGet插件包到Episerver抛出异常
Uploading NuGet add-on package to Episerver throws exception
我正在研究 EPiserver。我设置了本地主机环境,创建了一个插件,现在我正在尝试上传,因为我已经创建了一个 .nupkg 文件。但是我收到这个例外:
“'TestAddOn' 的架构版本与 NuGet 版本 2.0.30619.9119 不兼容。请将 NuGet 从 http://go.microsoft.com/fwlink/?LinkId=213942 升级到最新版本。
“
我运行
nuget.exe update -Self
在我的电脑上,但我已经是最新版本了。
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.6.2.
NuGet.exe is up to date.
这里不匹配的地方是什么?提前谢谢你。
更新
这是 nuspec 文件:
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
<projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
<copyright>Copyright 2018</copyright>
<tags>Tag1 Tag2</tags>
Uploading NuGet add-on package to Episerver throws exception
根据错误消息,您的 nuget 包似乎使用了您正在使用的旧版本 NuGet 不支持的功能。您应该在 .nuget
文件夹中更新 Visual Studio 或 nuget.exe
的 NuGet 扩展:
更新 Visual Studio 的 NuGet 扩展:
转到“工具”>“扩展和更新...”> Select“更新”选项卡,查找 NuGet 包管理器并单击“更新”按钮。如果没有更新按钮,可能需要使用更高版本的VS,例如Visual Studio 2013,2015....
更新 .nuget
文件夹中的 nuget.exe
:
如果你的项目中有.neget
文件夹,其中有nuget.exe,你需要打开CMD并将路径切换到.nuget
文件夹,然后使用命令nuget.exe update -Self
。如果您的解决方案中不包含任何 nuget.exe
,请忽略此建议。
希望这对您有所帮助。
它可能很奇怪,但它需要将 NuGet.Core 包更新到更新的版本。例如从 2.0.3 到 2.7.2.
我正在研究 EPiserver。我设置了本地主机环境,创建了一个插件,现在我正在尝试上传,因为我已经创建了一个 .nupkg 文件。但是我收到这个例外:
“'TestAddOn' 的架构版本与 NuGet 版本 2.0.30619.9119 不兼容。请将 NuGet 从 http://go.microsoft.com/fwlink/?LinkId=213942 升级到最新版本。 “ 我运行
nuget.exe update -Self
在我的电脑上,但我已经是最新版本了。
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.6.2.
NuGet.exe is up to date.
这里不匹配的地方是什么?提前谢谢你。
更新
这是 nuspec 文件:
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
<projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
<copyright>Copyright 2018</copyright>
<tags>Tag1 Tag2</tags>
Uploading NuGet add-on package to Episerver throws exception
根据错误消息,您的 nuget 包似乎使用了您正在使用的旧版本 NuGet 不支持的功能。您应该在 .nuget
文件夹中更新 Visual Studio 或 nuget.exe
的 NuGet 扩展:
更新 Visual Studio 的 NuGet 扩展:
转到“工具”>“扩展和更新...”> Select“更新”选项卡,查找 NuGet 包管理器并单击“更新”按钮。如果没有更新按钮,可能需要使用更高版本的VS,例如Visual Studio 2013,2015....
更新
.nuget
文件夹中的nuget.exe
:如果你的项目中有
.neget
文件夹,其中有nuget.exe,你需要打开CMD并将路径切换到.nuget
文件夹,然后使用命令nuget.exe update -Self
。如果您的解决方案中不包含任何nuget.exe
,请忽略此建议。
希望这对您有所帮助。
它可能很奇怪,但它需要将 NuGet.Core 包更新到更新的版本。例如从 2.0.3 到 2.7.2.