是什么导致错误" The" ResolveManifestFiles"任务意外失败。路径中的非法字符

时间:2020-03-06 14:26:07  来源:igfitidea点击:
The "ResolveManifestFiles" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
   at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.Path.GetFullPath(String path)
   at Microsoft.Build.Tasks.Deployment.ManifestUtilities.Util.RemoveDuplicateItems(ITaskItem[] items)
   at Microsoft.Build.Tasks.ResolveManifestFiles.set_NativeAssemblies(ITaskItem[] value)

The "NativeAssemblies=@(NativeReferenceFile);@(_DeploymentNativePrerequisite)" parameter for the "ResolveManifestFiles" task is invalid.

The "ResolveManifestFiles" task could not be initialized with its input parameters.

解决方案

直到VFP在构建后自动注册COM库之前,我都遇到了相同的构建错误。完成之后,我必须从项目中删除对.dll的引用,然后重新添加它,然后,我的项目就构建并运行了文件。

如果遇到此问题,则可能需要确保没有未注册的本机库的引用。要手动注册这样的.dll,请使用Regsvr32实用程序。