簡體   English   中英

通過 devenv.com 構建 vdproj 並未打包所有依賴項

[英]Building vdproj via devenv.com doesn't pack all dependencies

我正在 VS2019 中開發一個插件(C# dll),我需要安裝程序項目。 由於 ClickOnce 不適用於 dll,我不得不求助於舊的 Windows 安裝程序 (vdproj)。 到目前為止,一切都很好。

問題是:如果我手動構建它,從 IDE 開始,一切都很好,我可以看到所有依賴項都打包在:

<...>
Packaging file 'System.Buffers.dll'...
Packaging file 'FontAwesome.WPF.dll'...
Packaging file 'System.ValueTuple.dll'...
Packaging file 'PowerMillExporterPlugin.dll'...
Packaging file 'Microsoft.Bcl.AsyncInterfaces.dll'...
Packaging file 'Newtonsoft.Json.dll'...
Packaging file 'System.IO.Compression.ZipFile.dll'...
Packaging file 'System.Net.Http.dll'...
Packaging file 'Swan.Lite.dll'...
Packaging file 'System.Memory.dll'...
Packaging file 'NLog.dll'...
Packaging file 'System.Text.Json.dll'...
Packaging file 'ByteSize.dll'...
Packaging file 'System.Net.Http.dll'...
Packaging file 'System.Runtime.CompilerServices.Unsafe.dll'...
Packaging file 'System.Runtime.CompilerServices.Unsafe.dll'...
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

但是,如果我使用devenv.com從控制台構建它: devenv.com.\PowerMillExporterPlugin.sln /rebuild "Debug|Any CPU".\Setup\Setup.vdproj只有一個依賴項(和我的 dll)被打包:

Packaging file 'System.Runtime.CompilerServices.Unsafe.dll'...
Packaging file 'PowerMillExporterPlugin.dll.config'...
Packaging file 'PowerMillExporterPlugin.dll'...
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

這是為什么? 構建配置是相同的...

我通過放棄舊的 Windows 安裝程序並改用 WixSharp 解決了這個問題。

暫無
暫無

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

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