我在winforms中有一个现有的应用程序。它使用第三方库(Touchless.Dll和WebCam.lib)来启用图像捕获功能。现在我想让它与Windows 8.1平板电脑兼容。当我试图在winform中应用WinRT API时,我得到一个错误相关的错误清单。
Error 1 The "ResolveManifestFiles" task failed unexpectedly.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.NativeMethods.GetAssemblyIdentityFromFile(String filePath, Guid& riid)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.MetadataReader.ImportAttributes()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.MetadataReader.get_Attributes()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.MetadataReader.get_Name()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.AssemblyIdentity.FromManagedAssembly(String path)
at Microsoft.Build.Tasks.ResolveManifestFiles.IsFiltered(ITaskItem item)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssemblies(PublishInfo[] publishInfos, List`1& assemblyList)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssembliesAndSatellites(PublishInfo[] assemblyPublishInfos, PublishInfo[] satellitePublishInfos)
at Microsoft.Build.Tasks.ResolveManifestFiles.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() 4DCam
如何解决此错误。有人帮助我..
答案 0 :(得分:3)
&#34;问题产生清单。无法加载文件或程序集&#39; C:\ Program Files(x86)\ Windows Kits \ 8.1 \ References \ CommonConfiguration \ Neutral \ Windows.winmd&#39;或其中一个依赖项。试图加载格式不正确的程序。&#34;是我尝试构建应用程序时的错误。通过取消选中&#39; 启用ClickOnce安全设置&#39;解决了该问题。在项目属性的“安全”选项卡下。
另一个解决方案https://robindotnet.wordpress.com/category/clickonce-deployment/