c# - 在 ..Net5.0 中找不到 System.Windows.GridLength
问题描述
我无法将应用程序从 .NetFramework 转换为 .Net5.0。例如,我在 Properties.Settings.Default 中正确设置了一个 System.Windiws.GridLength 类型的变量,我在 Net5.0 中无法再引用它,因为它无处可寻(我收到错误“System.Windows. GridLength 类型未定义”,方法是在类型选择窗口的相应字段中插入类型名称,方法是从设置窗口的“类型”列中的弹出菜单中选择“浏览”项来显示)。我错过了什么?
**** 编辑 ************
我的项目的 .csproj 按要求:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<StartupObject>Stats4Betting_NetCore.App</StartupObject>
<ApplicationIcon>Resources\soccer_boom_alt.ico</ApplicationIcon>
<Platforms>AnyCPU;x64;x86</Platforms>
</PropertyGroup>
<ItemGroup>
....
</ItemGroup>
</Project>
解决方案
推荐阅读
- c# - 何时应使用 TaskScheduler.Current 作为参数调用 Task.ContinueWith?
- cmake - 如何在 CMake 的用户包注册表中支持多个包版本?
- r - 如何从r中的另一个数据框中提取相应的值
- javascript - 递归使用 element.click() 会导致内存问题并减慢/崩溃浏览器
- arrays - 跨文档的 Elasticsearch 查询数组字段
- leaflet - 传单 L.Control Overlay
- c++ - 生成代码(在编译时)以调用模板的每个实例化的静态函数
- php - 无法输出正确的表单提交
- automated-tests - 在 Katalon 中查找下一个元素
- selenium - 规范远程时如何运行量角器测试