Windows 8 兼容相机实现

Windows 8 compatible camera implementation

我在 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

如何解决这个错误。有人帮帮我..

"Problem generating manifest. Could not load file or assembly 'C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Windows.winmd' or one of its dependencies. An attempt was made to load a program with an incorrect format." was my error when i try to build the application. The problem solved by unchecking 'Enable ClickOnce security settings' under Security tab of project properties.

另一个解决方案https://robindotnet.wordpress.com/category/clickonce-deployment/