【发布时间】:2019-12-21 08:21:18
【问题描述】:
我的项目是 Visual Studio 扩展。该解决方案包含多个项目并引用多个 NuGet 包。
在构建解决方案时,我遇到了两个错误:
错误 MSB4064:“NgenLocalized”参数不受 “生成文件清单”任务。验证任务上是否存在参数, 它是一个可设置的公共实例属性。
错误 MSB4063:无法执行“GenerateFileManifest”任务 用它的输入参数初始化。
完整的错误是:
C:\Users\Phil\.nuget\packages\microsoft.vssdk.buildtools\16.3.2093\tools\VSSDK\Microsoft.VsSDK.targets(685,88): error MSB4064: The "NgenLocalized" parameter is not supported by the "GenerateFileManifest" task. Verify the parameter exists on the task, and it is a settable public instance property.
C:\Users\Phil\.nuget\packages\microsoft.vssdk.buildtools\16.3.2093\tools\VSSDK\Microsoft.VsSDK.targets(685,5): error MSB4063: The "GenerateFileManifest" task could not be initialized with its input parameters.
我在构建版本或调试版本时遇到这些错误。
这些错误是什么意思,我该如何消除它们?
奇怪的是,如果我只是开始调试,它会构建没有错误并启动 Visual Studio。但是,在这种情况下,我无法加载我的包。
活动日志显示错误:
SetSite failed for package [MultiLanguagePackage]
Source: "MultiLanguageWPF"
Description: Method not found: "Microsoft.VisualStudio.Threading.JoinableTaskFactory Microsoft.VisualStudio.Shell.AsyncPackage.get_JoinableTaskFactory()".
System.MissingMethodException: Method not found: "Microsoft.VisualStudio.Threading.JoinableTaskFactory Microsoft.VisualStudio.Shell.AsyncPackage.get_JoinableTaskFactory()".
at MultiLanguageWPF.MultiLanguagePackage.<InitializeAsync>d__2.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at MultiLanguageWPF.MultiLanguagePackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)
at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass19_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
 at Microsoft.VisualStudio.Services.VsTask.GetResult()</description>
这可能是一个相关的错误,也可能不是。
【问题讨论】:
-
尝试使用其他版本的 nuget 包。也许这个问题就是由此造成的。
-
仅供参考。运行时错误“SetSite failed for package”是一个不同的错误,但略有相关。为了解决冲突,我添加了对 Microsoft.VisualStudio.Threading 6.3.13 的引用。将 Microsoft.VSSDK.BuildTools 降级到 16.2.3073 后,我还能够删除对 Microsoft.VisualStudio.Threading 的引用(不会产生冲突),并且“SetSite failed”错误也消失了。
-
有用的信息,谢谢:)
标签: visual-studio msbuild nuget visual-studio-extensions