代码之家  ›  专栏  ›  技术社区  ›  StayOnTarget Charlie Flowers

sqlite3.exe Nuget包安装失败-.NET框架兼容性?

  •  0
  • StayOnTarget Charlie Flowers  · 技术社区  · 6 年前

    sqlite3.exe C#项目目标框架4.7.2中的命令行程序。包装是:

    https://www.nuget.org/packages/sqlite3-command-line-shell/

    当我在VS2015中尝试此功能时,它会错误地显示:

    无法安装包“sqlite3命令行shell 1.0.1”。你是 尝试将此包安装到目标项目中 '.NETFramework,版本=v4.7.2',但是 该包不包含任何 框架 .

    现在,这个包裹 . 不存在任何.NET依赖项。所以我看不出这个错误的原因。

    Nuget包有问题吗?或者是我错过了解决这个问题的办法?


    <?xml version="1.0"?>
    <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
      <metadata>
        <id>sqlite3-command-line-shell</id>
        <version>1.0.1</version>
        <title>sqlite3 command-line shell</title>
        <authors>Darren Hale</authors>
        <owners>Darren Hale</owners>
        <licenseUrl>http://www.sqlite.org/copyright.html</licenseUrl>
        <projectUrl>http://www.sqlite.org/index.html</projectUrl>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>The sqlite3 command-line shell program.</description>
        <releaseNotes>Version 3.8.10.2 (x86) of sqlite3 command-line shell program.
    
    Removed unnecessary files accidentally included when packing .nuspec file.</releaseNotes>
        <copyright>Copyright 2015</copyright>
        <tags>sqlite3 cli shell exe</tags>
      </metadata>
    </package>
    

    我没有看到任何提到.NET的东西;但是我对如何构造Nuget包知之甚少。

    1 回复  |  直到 6 年前
        1
  •  1
  •   Matt Ward    6 年前

    sqlite3.exe位于NuGet包的根目录中。

    看起来您正在尝试创建一个tools NuGet包,类似于NUnit.ConsoleRunner。可执行文件需要在NuGet包内的tools目录中。

    <files>
      <file src="sqlite3.exe" target="tools" />
    </files>