我在这个板上看到了几个类似的问题,但我认为有几个问题会导致此消息,而我的特定问题可能不在其中,当然我的解决方案看起来比其他任何一个都简单和有效。
我有一个使用 packages.config 的项目。
我使用 Visual Studio UI 将项目引用从 package.config 迁移到 PackageReference ( https://devblogs.microsoft.com/nuget/migrate-packages-config-to-package-reference/ )。我这样做是因为它允许使用 msbuild /t:restore mysln.sln 进行构建——这不适用于 packages.config。
我认为这通常有效(我在其他项目上尝试了 5 或 6 次)。但是在我重建的一个项目中,我收到了错误消息:
c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(236,9): error MSB3188: Assembly 'C:\Users\lew
is\.nuget\packages\mousekeyhook\5.6.0\lib\net40\Gma.System.MouseKeyHook.dll' must be strong signed in order to be marked as a prerequisite.