小编Chr*_*ian的帖子

FirefoxWebdriver 没有数据可用于编码 437

我想创建一个 FirefoxWebdriver 但收到以下错误

  Message: 
    Initialization method Sma.Ldx.Systemtest.Ui.Tests.IbaTest.TestInitialize
 threw exception. System.TypeInitializationException: The type initializer for 
'System.IO.Compression.ZipStorer' threw an exception. ---> 
System.NotSupportedException: No data is available for encoding 437. For 
information on defining a custom encoding, see the documentation for the 
Encoding.RegisterProvider method..
Run Code Online (Sandbox Code Playgroud)

它是一个 netstandard2.0 lib 并在 dotnet core 2.2 上运行 有人可以帮忙吗?

我尝试导入 System.Text.Encoding.CodePages 并尝试使用 System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance) 但这在 dotnetcore2.2 中不受支持

  Message: 
    Initialization method Sma.Ldx.Systemtest.Ui.Tests.IbaTest.TestInitialize
 threw exception. System.TypeInitializationException: The type initializer for 
'System.IO.Compression.ZipStorer' threw an exception. ---> 
System.NotSupportedException: No data is available for encoding …
Run Code Online (Sandbox Code Playgroud)

c# .net-core

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

如何在 JetBrains Rider 和 MSTest 中设置 .runsettings

如何在 JetBrains Rider 中为 MsTest 设置 .runsettings?

我尝试File | Settings | Build, Execution, Deployment | Unit Testing | MSTest在测试设置中选择 .runsettings 文件,但这没有效果。

mstest jetbrains-ide rider

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

Docker.Dotnet 如何拉取镜像

我想使用Docker.DotNet拉取并运行一个镜像,但我很绝望,我不知道如何使用这个库来做到这一点。

谁能帮我?

我查看了https://github.com/microsoft/Docker.DotNet上的教程,但这没有帮助。

 public class DockerService
    {
        private readonly DockerClient DockerClient;

        public DockerService()
        {
            if (OperatingSystem.IsWindows())
            {
                DockerClient = new DockerClientConfiguration(new Uri("npipe://./pipe/docker_engine")).CreateClient();
            }
            else if (OperatingSystem.IsLinux())
            {
                DockerClient = new DockerClientConfiguration(new Uri("unix:///var/run/docker.sock")).CreateClient();
            }
            else
            {
                throw new Exception("unknown operation system");
            }
        }

        public void StartCompose()
        {
            var progress = new Progress<JSONMessage>();
            var task = PullImage(
                new ImagesCreateParameters()
                {
                    FromImage = "mcr.microsoft.com/dotnet/core/sdk",
                    Tag = "latest"
                },null,
                progress);
             task.Wait();

        }


        private Task PullImage(ImagesCreateParameters imagesCreateParameters, AuthConfig authConfig,
            Progress<JSONMessage> progress)
        { …
Run Code Online (Sandbox Code Playgroud)

c# docker .net-core

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

在 Intellij 调试器断点中使用多个条件

我想在 IntelliJ 中向断点添加多个条件。就像是:

stringA.equals("test") && objectA.equals(objectB);
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

debugging intellij-idea conditional-breakpoint

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

ASP.NET Core Web 应用程序:升级到 Angular 9 - es2015 错误为 esm2015

我使用这个 Angular 指南将我的 ASP.NET Core Web 应用程序(.NET Core 3.1)从 Angular 8 更新到了 9:

https://update.angular.io/#8.0:9.0

在此之后,我启动了应用程序并收到许多模块的以下错误:

失败:Microsoft.AspNetCore.SpaServices[0]
编译@angular/animations:es2015 为 esm2015

在浏览器的开发工具中我得到

未捕获的 SyntaxError:严格模式代码可能不包含 with 语句

我在网上找不到任何有用的东西。有任何想法吗?

我为此问题构建了一个示例应用程序。你可以在这里找到

asp.net-core angular

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