简体   繁体   中英

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. The package is:

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

When I try this from within VS2015 it errors out with:

Could not install package '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 .

Now, this package literally only installs the .exe file . There are no .NET dependencies whatsoever. So I don't see the rationale for this error.

Is there something wrong with the Nuget package? Or is there an option I've missed to work around this maybe?


The NUSPEC file inside the NUPKG file contains:

<?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; but I know very little about how Nuget packages are constructed.

The sqlite3.exe is in the root directory of the NuGet package.

It looks like you are trying to create a tools NuGet package, similar to say NUnit.ConsoleRunner. the executable would need to be in a tools directory inside the NuGet package.

The .nuspec is missing a files section, something like:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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