簡體   English   中英

sqlite3.exe Nuget軟件包安裝失敗-.NET Framework兼容性?

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

我正在嘗試在面向Framework 4.7.2的C#項目中為sqlite3.exe命令行程序安裝Nuget程序包。 該軟件包是:

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

當我在VS2015中嘗試此操作時,出現以下錯誤:

無法安裝軟件包“ sqlite3-command-line-shell 1.0.1”。 您正在嘗試將此軟件包安裝到以'.NETFramework,Version = v4.7.2'為目標的項目中,但是該軟件包不包含任何與該框架兼容的程序集引用或內容文件

現在,此軟件包實際上僅安裝.exe文件 沒有任何.NET依賴項。 因此,我看不出該錯誤的原因。

Nuget軟件包有問題嗎? 還是有我可能錯過的解決方案?


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>

我看不到任何有關.NET的內容; 但是我對Nuget包的構造方法知之甚少。

sqlite3.exe在NuGet軟件包的根目錄中。

看來您正在嘗試創建工具NuGet包,類似於NUnit.ConsoleRunner。 可執行文件必須位於NuGet包內的tools目錄中。

.nu​​spec缺少文件部分,例如:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM