我正在使用microsoft.devices.tpm,很难调试问题。
当我添加软件包Microsoft.devices.tpm并尝试编译到本机或构建软件包时,我会收到以下错误:
1> Starting .NET Native compilation
1> Processing application code
1>...Resources.System.Linq.Expressions.rd.xml(35): warning : ILTransform_0027: Method 'CreateLambda' within 'System.Linq.Expressions.Expression' could not be found.
1>...Resources.System.Linq.Expressions.rd.xml(91): warning : ILTransform_0027: Method 'ParameterIsAssignable' within 'System.Linq.Expressions.Expression' could not be found.
1> Computing application closure and generating interop code
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Tbsi_Context_Create!tbs.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Tbsip_Context_Close!tbs.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Tbsip_Submit_Command!tbs.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Tbsip_Cancel_Commands!tbs.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'SetDllDirectory!kernel32.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_TPM_Init!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'TPM_Manufacture!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'ExecuteCommand!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Signal_Hash_Start!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Signal_Hash_Data!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method 'Signal_Hash_End!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__Signal_PhysicalPresenceOn!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__Signal_PhysicalPresenceOff!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__Signal_PowerOn!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__Signal_PowerOff!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__SetCancel!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__ClearCancel!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__NVEnable!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__NVDisable!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__RsaKeyCacheControl!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__LocalitySet!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__SetNvAvail!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006: Unresolved P/Invoke method '_plat__ClearNvAvail!tpm.dll' in assembly 'TSS.UWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not available in UWP applications. Please either use an another API , or use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP application APIs.
1> Generating serialization code
1> Compiling interop code
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : at SerializationAssemblyGenerator.Program.AddKnownContractsLists(McgCodeTypeDeclaration container, ContractTables tables)
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : at SerializationAssemblyGenerator.Program.GenerateDataContractSerializerHelperCode(IEnumerable`1 contracts, IEnumerable`1 jsonContracts, IEnumerable`1 wcfSerializers)
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : at SerializationAssemblyGenerator.Program.GenerateDataContractSerializerHelper(IEnumerable`1 contracts, IEnumerable`1 jsonContracts, GeneratorSettings settings, String intermediateAssembly, IEnumerable`1 wcfSerializers)
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : at SerializationAssemblyGenerator.Program.Main(String[] args)
1>C:Program Files (x86)MSBuildMicrosoft.NetNativex86ilcIlcInternals.targets(936,5): error : Internal compiler error: One or more errors occurred.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
我应该使用其他库吗?在调试模式下,工作完美。
这是一个已知问题,Microsoft正在研究它。
继续关注。