DJI-SDK教程“将WSDK集成到应用程序”中的问题

时间:2019-04-30 17:10:55

标签: c# uwp dji-sdk visual-studio-2019

我遵循本教程https://developer.dji.com/windows-sdk/documentation/application-development-workflow/workflow-integrate.html

我遇到此错误:

Severity    Code    Description Project File    Line    Suppression State
Error   CS7069  Reference to type 'Task<>' claims it is defined in 'System.Runtime', but it could not be found DJIWSDKDemo C:\Users\almendro.avellano\source\repos\DJIWSDKDemo\DJIWSDKDemo\MainPage.xaml.cs 61  Active

如果我注释该行并运行它,请告诉我下一个错误:

System.Reflection.TargetInvocationException
HResult=0x80131604
Message=Exception has been thrown by the target of an invocation.
Source=
StackTrace:
Inner Exception 1:
FileLoadException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. Exception from HRESULT: 0x80131040

我正在使用VS2019。谢谢您的帮助

1 个答案:

答案 0 :(得分:0)

在VS2017上遇到同样的麻烦:

var productType = (await DJISDKManager.Instance.ComponentManager.GetProductHandler(0).GetProductTypeAsync()).value;

除错误外,还有11条与System.Threading, System.Runtime等版本之间的冲突有关的警告。

VS或Universal Windows参考可能有问题。