问题基本上与可能从常规.Net应用程序使用Toast Notifications有关吗?
如何从常规(非存储)Win32 .NET应用程序(控制台,WinForms,WPF)中使用Windows.UI命名空间?
有许多文章(codeproject,blog1,blog2,论坛)将WinRT库用于Windows 8中的.Net Framework控制台应用程序.
我在Windows 10中尝试使用UWP.但未能成功.我努力编译没有错误,但它发生BadImageFormatException在运行时.
这就是我做的.
<TargetPlatformVersion>10.0</TargetPlatformVersion>与Windows 8示例相反,System.Runtime.dll引用时会出错.
代码如下.请注意,该代码来自Microsoft论坛.
class Program
{
static void Main(string[] args)
{
Geolocator locator = new Geolocator();
var status = Geolocator.RequestAccessAsync();
if (status != null)
{
Console.WriteLine("not null");
Task.Run(async () =>
{
Geoposition pos = await locator.GetGeopositionAsync();
Console.WriteLine(pos.Coordinate.Accuracy);
});
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试用 C# 为 Windows 10 创建一个经典的桌面应用程序,它将能够与 BLE 设备通信。我按照说明(适用于 Windows 桌面 C# 应用程序的蓝牙 4.0(低功耗)API)并将标签添加到项目文件中
<TargetPlatformVersion>10.0.10156</TargetPlatformVersion>
Run Code Online (Sandbox Code Playgroud)
并重新加载项目。我只能访问 Windows 命名空间:引用对话框
我不知道我在其中一项测试中做了什么,但是一旦该列表填充了大量其他命名空间,我就可以检查 Windows.Devices 命名空间,这对我的项目至关重要。我现在可以通过最近选项添加 Windows.Devices,但不能添加任何其他命名空间...
你们知道我应该怎么做才能访问所有 Windows.xy 命名空间的列表吗?
我有一个希望从C#Windows服务(非UWP)中评估图像的ONNX模型。在构建UWP应用程序之外,我看不到从C#进入Windows ML框架的任何方法,对吗?
我发现这篇文章似乎表明从C ++可以实现。
至少有一个众所周知的COM包装器或其他东西吗?