Tag: .net core

VSCode在连接到Windows泊坞窗容器上的远程debugging器时挂起在断点上

将VSDB.exe与代码clr远程debugging器连接到VSCode中的一个Windows Docker容器中的一个运行进程的dotnet时,应用程序进入debugging模式,并检索一个线程列表并显示debugging输出,但是当我点击一个断点时,VS代码挂起并停止debuggingclosuresdocker容器。 使用相同的debugging器在本地工作正常。 这是在Docker或VSCode的问题? docker信息 Server Version: 17.06.0-ce Storage Driver: windowsfilter Windows: Logging Driver: json-file Plugins: Volume: local Network: l2bridge l2tunnel nat null overlay transparent Log: awslogs etwlogs fluentd json-file logentries splunk syslog Swarm: inactive Default Isolation: hyperv Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-1834) Operating System: Windows 10 Enterprise N OSType: windows Architecture: x86_64 Debug Mode […]

Docker有多个针对Linux上的dotnet核心的项目

我有一个简单的dotnet核心控制台应用程序,其中包含2个项目(C#)第一个是外部库,围绕dotnet标准的dotnet标准websockets客户端做一些包装。 另一个是实际的控制台应用程序,它从websockets客户端获取结果并将其推送到Azure中的服务总线队列中。 它工作正常使用dotnet ConsoleApp.dll在我的电脑和Windows容器内。 但是,当我在Linux容器中运行它失败。 我认为它是因为它不能加载依赖 – 即使它们在容器中的输出文件夹中。 我的Docker文件如下所示: FROM microsoft/dotnet:2.0-sdk COPY WebsocketClient ./app/WebsocketClient WORKDIR / COPY ConsoleApp ./app/ConsoleApp WORKDIR ./app/ConsoleApp RUN dotnet publish -c Release -o out CMD ["dotnet", "./out/ConsoleApp.dll"] root @ e70c9468b11c:/ app / ConsoleApp / out#dotnet运行 启动Websocket客户端! 套接字状态从无更改为正在连接 未处理的exception:套接字状态从连接更改为closures套接字closures原因:空System.AggregateException:发生一个或多个错误。 (无法连接到远程服务器)—> System.Net.WebSockets.WebSocketException:无法连接到远程服务器在System.Net.WebSockets.WebSocketHandle.d__28.MoveNext()—堆栈跟踪结束以前的位置抛出exception—在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)在System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult )在System.Net.WebSockets.WebSocketHandle.d__24.MoveNext()—从以前的位置抛出exception的堆栈跟踪结束—在System.Runtime.CompilerServices System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() .TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)在System.Net.WebSockets.ClientWebSocket.d__16.MoveNext()—结束内部exception堆栈跟踪—在System.Threading.Tasks.Task.ThrowIfExceptional(布尔includeTaskCanceledEx 在PureWebSockets上的System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,CancellationToken cancellationTokenToken)上的ceptions)。PureSocketCluster.PureSocketClusterSocket.Connect()上的PureWebSocket.Connect()在/ app / WebsocketClient / WsClient中的WebsocketClient.WsClient.Connect […]

dotnet核心SDK /运行在Debian的debian中

我正在试图为我们的docker集群做一个dotnet运行时镜像。 我遵循微软的以下教程。 https://www.microsoft.com/net/core#linuxdebian 但是,当我运行“dotnet新控制台-o hwapp”我得到“你是否要运行dotnet SDK命令?请安装dotnet SDK从: http : //go.microsoft.com/fwlink/ ?LinkID=798306&clcid=0x409” 以下是我的docker文件。 FROM "Our registry" RUN apt-get update RUN apt-get install curl libunwind8 gettext -y #Installing DOTNET CORE SDK ENV DOTNET_VERSION 1.1.1 ENV DOTNET_DOWNLOAD_URL `https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/$DOTNET_VERSION/dotnet-debian-x64.$DOTNET_VERSION.tar.gz` RUN curl -SL $DOTNET_DOWNLOAD_URL –output dotnet.tar.gz \ && mkdir -p /usr/share/dotnet \ && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ && […]

“dotnet恢复”失败,“SSL对等证书或SSH远程密钥不正确”

我正在做一个Docker容器内的dotnet恢复下面的错误信息: christian@debian:~/workspace$ docker build -t projectimage:v2 . Sending build context to Docker daemon 4.336 MB Step 1/9 : FROM microsoft/dotnet:1.1.1-sdk —> 6aa7ef4f1f91 Step 2/9 : ADD https://adeartifactory/artifactory/tools/certificates/ca-bundle.crt /usr/local/share/ca-certificates/ Downloading 4.92 kB/4.92 kB —> Using cache —> 16d949cfeb21 Step 3/9 : RUN update-ca-certificates —> Using cache —> b86a8b2407e6 Step 4/9 : RUN mkdir /app —> Using […]

.Net Core WebApi拒绝在Docker容器中的连接

我正在尝试Docker与我已经在dotnet核心写的一个小的WebApi。 该Api似乎工作正常,因为当我运行它的networkingdotnet run它正常启动,并可以在端口5000.但是,当我在Docker容器中运行它启动,但我无法达到暴露/映射的端口上。 我使用VirtualBox在Windows 10上运行Docker。 我的Dockerfile看起来像这样: FROM microsoft/aspnetcore-build:latest COPY . /app WORKDIR /app RUN dotnet restore EXPOSE 5000 ENV ASPNETCORE_URLS http://*:5000 ENTRYPOINT ["dotnet", "run"] 我正在build造这样的容器: docker build -t api-test:v0 . 并用这个命令运行它: docker run -p 5000:5000 api-test:v0 运行命令的输出是: Hosting environment: Production Content root path: /app Now listening on: http://localhost:5000 我也尝试了不同的方法来绑定url: 如http://+:5000 , http://localhost:5000 , http://localhost:5000 ,… […]

如何在Docker容器中运行.NETunit testing

我有一个包含MSTestunit testing的.NET核心应用程序。 使用这个Dockerfile执行所有testing的命令是什么? FROM microsoft/dotnet:1.1-runtime ARG source COPY . . ENTRYPOINT ["dotnet", "test", "Unittests.csproj"] 文件夹结构是: /Dockerfile /Unittests.csproj /tests/*.cs

Dotnet core 2 docker:找不到可执行的匹配命令“dotnet-watch”

我正在尝试为dotnet core 2创build一个开发Dockerfile 。到目前为止,我有以下内容: FROM microsoft/aspnetcore-build:2.0 VOLUME /app WORKDIR /app COPY . ./ ENV ASPNETCORE_SERVER.URLS http://*:5000 ENV ASPNETCORE_ENVIRONMENT Development RUN dotnet restore ENTRYPOINT dotnet watch run –configuration Debug 如果我运行: dotnet restore dotnet watch run 从同一个文件夹,一切似乎都工作得很好(观察者开始)。 当我运行该docker文件(在docker-compose环境中)时,它一直在喊: 找不到可执行的匹配命令“dotnet-watch” 我的configuration文件如下: <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> </PropertyGroup> <ItemGroup> <Folder Include="wwwroot\" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" […]

Docker:在CLI上运行dotnet发布-o / output会导致非零的错误

我使用的是Ubuntu 16.04 LTS, Docker-compose v 1.18.0-rc2, build 189468b Docker version 17.12.0-ce-rc1, build ee2f943 运行这个命令: dotnet发布带docker的-o / output会导致这个错误: ERROR: Service 'generator' failed to build: The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 145 我已经安装了Ubuntu的.NET SDK,不知道如何解决这个错误; 它只是不会创build该发布文件夹; 这里是dotnet –info joel @ worker-2:〜/ workspace / asp(copy)/ api $ dotnet –info .NET命令行工具(2.0.2) 产品信息:版本:2.0.2提交SHA-1哈希:a04b4bf512 […]

dnu发布后ASP.Net VNext不能在linux机器上工作

我使用dnx运行香草ASP.Net VNext hello world应用程序。 当我执行“DNX运行”,它运行得很好。 但是当我使用“dnu发布”来创build自包含的包(作为其结果创buildweb.cmd),它无法运行在Linux上的错误 root@Xavier:~/Net/HelloWorldCore/bin/output# web.cmd web.cmd: command not found 我厌倦了“chmod 777 web.cmd”,然后它不能识别DNX root@Xavier:~/Net/HelloWorldCore/bin/output# chmod 777 web.cmd root@Xavier:~/Net/HelloWorldCore/bin/output# ./web.cmd ./web.cmd: line 1: $'\r': command not found ./web.cmd: line 2: @dnx.exe: command not found 我正在使用Ubuntu 14.04 root@Xavier:~/dnvm list Active Version Runtime Arch Location Alias —— ——- ——- —- ——– —– 1.0.0-beta4 coreclr x64 ~/.dnx/runtimes […]

Bitbucketpipe道。 无法指定windowsservercore泊坞窗图像

Bitbucket Pipelines允许(使用bitbucket-pipelines.yml )从Dockerhub指定一个自定义的docker镜像作为构build环境。 下一张图片被用作.NET Core的默认值: # You can specify a custom docker image from Dockerhub as your build environment image: microsoft/dotnet:onbuild 但是,因为我需要Windows容器图像,我正在尝试将图像更改为“windowsservercore”。 基于微软/ dotnetdocker集线器的信息,我试过了 image: microsoft/dotnet:1.0.0-windowsservercore-core 和 image: microsoft/dotnet:1.0.0-preview2-windowsservercore-sdk 但图像尚未下载: + docker pull "microsoft/dotnet:1.0.0-windowsservercore-core" 1.0.0-windowsservercore-core: Pulling from microsoft/dotnet 1239394e5a8a: Pulling fs layer d90a2ac79ff2: Pulling fs layer cde3fa87b2c9: Pulling fs layer 9f60be4f8205: Pulling fs layer c4f6347ed968: […]