小编Dom*_*urf的帖子

Android 应用程序中 startForeground 的错误通知

我正在使用Xamarin Android 3.5开发服务。我们的应用面向 Android 8.1 (API 27 - Oreo)。我希望该服务作为前台服务运行。但是,当我运行该服务时出现以下错误。

Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x42 color=0x00000000 vis=PRIVATE)
Run Code Online (Sandbox Code Playgroud)

这是服务的代码。

public override StartCommandResult OnStartCommand(Intent intent, StartCommandFlags flags, int startId)
{
  base.OnStartCommand(intent, flags, startId);
  var context = Application.Context;
  const int pendingIntentId = 0;
  PendingIntent pendingIntent = PendingIntent.GetActivity(context, pendingIntentId, intent, PendingIntentFlags.OneShot);
  var notification = new NotificationCompat.Builder(context)
    .SetContentTitle("Testing")
    .SetContentText("location tracking has begun.")
    .SetSmallIcon(Resource.Drawable.icon)
    .SetContentIntent(pendingIntent)
    .SetOngoing(true)
    .Build();
    // Enlist this instance of the service …
Run Code Online (Sandbox Code Playgroud)

android xamarin.android xamarin xamarin.forms

5
推荐指数
2
解决办法
2770
查看次数

"不确定:测试未运行"错误在Visual Studio/Resharper中以调试模式运行单元测试

我在Visual Studio中尝试在调试模式下运行单元测试时收到上述错误" Inconclusive:Test not run "错误.

我正在使用Visual Studio 2017修补最新的.NET Core 2版本15.3.5和Resharper Ultimate 2017.1.3

自从我最近安装了最新的.NET Core 2.0补丁以来,这种情况才刚刚开始.

c# resharper unit-testing visual-studio visual-studio-2017

2
推荐指数
1
解决办法
1904
查看次数

来自 Azure DevOps 的 Azure 部署未能找到 zip 包

我正在使用Azure DevOps为我们的 Azure 移动应用程序设置构建和发布管道。我已经完成了构建并且一切正常。我定义了一个构建任务,用于创建部署到 Azure 所需的 zip 文件,这成功了,并且在文件夹的根目录创建了 zip 文件。但是部署失败,说明找不到 zip 文件。

这是我创建 zip 文件的构建任务。

在此处输入图片说明

这是构建步骤的输出,显示它已成功创建 zip 文件。

在此处输入图片说明

但是部署失败,因为它找不到 zip 文件。

在此处输入图片说明

azure azure-mobile-services azure-devops

2
推荐指数
1
解决办法
4842
查看次数

从 ASP.NET Core 2.2 迁移到 3.1

我们目前有一个ASP.NET Core 2.2 Web 应用程序,我们希望将其迁移到3.1(因为它更新并包含多项增强功能)。有关于迁移的文章,从2.23.0,但没有2.23.1

首选的迁移路线是先升级到3.0,然后再升级到 3.1?2.2和较新的3.0 / 3.1框架之间似乎有很多不兼容。

是否有将现有ASP.NET Core 2.2 Web 应用程序升级到3.0 / 3.1 的最佳实践/一般指南?

.net-core asp.net-core asp.net-core-2.2 asp.net-core-3.0

2
推荐指数
1
解决办法
1958
查看次数

ASP.NET Web API的Service Bus体系结构

我正在使用Telerik Platform开发移动应用程序.应用程序使用的服务是Azure上托管的ASP.NET Web API RESTful服务.我想通过添加服务总线为应用程序构建一些弹性,并且一直在寻找Azure服务总线,这似乎是我正在寻找的.

这对我来说还算新,我有几个问题.

  • Azure Service Bus是否可以用于返回数据的RESTful服务,或者只是一次性发送?
  • 对于简单的RESTful服务,还有Azure Service Bus可行的方式还是Azure存储队列?你什么时候使用一个与另一个?
  • 我何时使用队列与主题/订阅?

asp.net rest azure azureservicebus asp.net-web-api

1
推荐指数
1
解决办法
1650
查看次数