【发布时间】:2016-02-17 19:22:08
【问题描述】:
我需要在我的 UWP 平台中访问 Type.GetProperties,但我的 Type 类滞后于该方法。
在我看来,这是因为我们在 UWP 中有子集方法,但在尝试查找信息时,我发现了这个:Type.GetProperties() doesn't work in Release,因此该方法确实存在于 UWP 中。
如果我去类型的定义,第一行是这样的:
#region Assembly System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// C:\Users\JoséÁngel\.nuget\packages\System.Runtime\4.0.20\ref\dotnet\System.Runtime.dll
#endregion
也许我的 nuget 配置有问题?
项目的条件编译符号为:
NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS
我尝试了使用和不使用“使用 .NET Native 工具链编译”选项。
目标是通用 Windows
目标版本是:Windows 10 (10.0; Build 10586) 最低版本为:Windows 10 (10.0; Build 10240)
但我也尝试过使用最低版本:Windows 10 (10.0; Build 10586)
在 NuGET 中,该项目只有 Microsoft.NETCore.UniversalWindowsPlatform v5.0.0
【问题讨论】:
标签: c# reflection win-universal-app