VS2005+WM6开发时遇到关于“PlatformVerificationTask”的问题

本文介绍了一个VS2005编译过程中遇到的PlatformVerificationTask内部错误及其解决方法。通过修改特定文件并设置环境变量,可以成功禁用Platform Verification Task,从而解决编译问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我在用VS2005编译程序时,遇到下面的问题:

 

“PlatformVerificationTask 中发生内部错误。System.Runtime.InteropServices.COMException (0x8000000A):
完成该操作所需的数据还不可使用。 (异常来自 HRESULT:0x8000000A)
   在 System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   在 System.Reflection.Assembly.GetType(String name)
   在 Microsoft.CompactFramework.Build.MetadataService.GetAsmmetaType(Type sourceType)
   在 Microsoft.CompactFramework.Build.MetadataService.GetTypeAttributes(String instanceType)
   在 Microsoft.CompactFramework.Build.Tasks.PlatformVerificationRule.VisitExpressionStatement(ExpressionStatement statement)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.Visit(Node node)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitStatementList(StatementList statements)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitBlock(Block block)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.Visit(Node node)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitStatementList(StatementList statements)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitBlock(Block block)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitMethod(Method method)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.Visit(Node node)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitMemberList(MemberList members)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitTypeNode(TypeNode typeNode)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitClass(Class Class)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.Visit(Node node)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitTypeNodeList(TypeNodeList types)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitModule(Module module)
   在 Microsoft.CompactFramework.Build.Compiler.StandardVisitor.VisitAssembly(AssemblyNode assembly)
   在 Microsoft.CompactFramework.Build.Tasks.PlatformVerificationTask.Execute() HkxxMobile”

 

后来在网上查询到了解决的办法:

 

We will look into this issue. In the mean time to unblock your development, if you do not require Platform Verification task can you follow the below steps to disable PVT during build process:

 

1) Open the file %windir%/Microsoft.NET/Framework/v2.0.50727/Microsoft.CompactFramework.Common.Targets for editing.

2) Go to line which currently reads:

        Name="PlatformVerificationTask">

    and change it to:

        Name="PlatformVerificationTask" Condition="'$(SkipPlatformVerification)' == ''">

3) Add the SkipPlatformVerification environment variable to the system and set it to true.

4) Restart Visual Studio for the changes to take effect.

 

 经过试验,上述方法解决了我的问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值