简体   繁体   English

sqlite3.exe Nuget软件包安装失败-.NET Framework兼容性?

[英]sqlite3.exe Nuget package installation failure - .NET framework compatibility?

I am trying to install the Nuget package for the sqlite3.exe command line program in a C# project targeting Framework 4.7.2. 我正在尝试在面向Framework 4.7.2的C#项目中为sqlite3.exe命令行程序安装Nuget程序包。 The package is: 该软件包是:

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

When I try this from within VS2015 it errors out with: 当我在VS2015中尝试此操作时,出现以下错误:

Could not install package 'sqlite3-command-line-shell 1.0.1'. 无法安装软件包“ sqlite3-command-line-shell 1.0.1”。 You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework . 您正在尝试将此软件包安装到以'.NETFramework,Version = v4.7.2'为目标的项目中,但是该软件包不包含任何与该框架兼容的程序集引用或内容文件

Now, this package literally only installs the .exe file . 现在,此软件包实际上仅安装.exe文件 There are no .NET dependencies whatsoever. 没有任何.NET依赖项。 So I don't see the rationale for this error. 因此,我看不出该错误的原因。

Is there something wrong with the Nuget package? Nuget软件包有问题吗? Or is there an option I've missed to work around this maybe? 还是有我可能错过的解决方案?


The NUSPEC file inside the NUPKG file contains: NUPKG文件中的NUSPEC文件包含:

<?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>

I don't see any mention of any .NET anything; 我看不到任何有关.NET的内容; but I know very little about how Nuget packages are constructed. 但是我对Nuget包的构造方法知之甚少。

The sqlite3.exe is in the root directory of the NuGet package. sqlite3.exe在NuGet软件包的根目录中。

It looks like you are trying to create a tools NuGet package, similar to say NUnit.ConsoleRunner. 看来您正在尝试创建工具NuGet包,类似于NUnit.ConsoleRunner。 the executable would need to be in a tools directory inside the NuGet package. 可执行文件必须位于NuGet包内的tools目录中。

The .nuspec is missing a files section, something like: .nu​​spec缺少文件部分,例如:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM