代码之家  ›  专栏  ›  技术社区  ›  Grigoris Loukidis

将nuget加载项包上载到episerver时引发异常

  •  0
  • Grigoris Loukidis  · 技术社区  · 7 年前

    我在研究观察者。我设置了环境localhost,创建了一个插件,现在我正在尝试上传,因为我已经创建了一个.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>
    

    2 回复  |  直到 7 年前
        1
  •  2
  •   Leo Liu    7 年前

    将nuget加载项包上载到episerver时引发异常

    根据错误消息,您的nuget包似乎使用了旧版本的nuget所不支持的功能。您应该更新visual studio的nuget扩展,或者 nuget.exe 在里面 .nuget 文件夹:

    1. 更新visual studio的nuget扩展 以下内容:

      转到“工具”>“扩展和更新…”>选择“更新”选项卡,查找NuGet包管理器,然后单击“更新”按钮。如果没有更新按钮,则可能需要使用更高版本的vs,例如visual studio 20132015….

    2. 更新 nuget.exe 在里面 .努杰 文件夹 四分之一_

      如果你有 .neget 项目中包含nuget.exe的文件夹,需要打开一个cmd并将路径切换到 .努杰 文件夹,然后使用命令 nuget.exe update -Self 是的。如果你不包括任何 nuget.exe 在你的解决方案中,忽略这个建议。

    希望这有帮助。

        2
  •  0
  •   Grigoris Loukidis    7 年前

    这可能很奇怪,但它需要将nuget.core包更新到一个新版本。例如从2.0.3到2.7.2。