I use dotnet on macOS and want to build an application for Linux. To achive this, I use the following commands: According to this article, the dotnet command should support a command-line flag to pack the application into a single executable: My question is two-fold: Why is there no PublishSingleFile option for dotnet on macOS? Why does dotnet both create
Tag: .net-core
While trying to retrieve the AccesToken using HttpClient I am getting an error
While trying to retrieve the Acces Token from a windows server using HttpClient I am getting an error: “GSSAPI operation failed with error – An invalid status code was supplied (SPNEGO cannot find mechanisms to negotiate).” system.ComponentModel.win32Exception is throwing as GSSAPI operation failed with error – An invalid status code was supplied (SPNEGO cannot find mechanisms to negotiate) The above
Simplest way to build dotnet SDK project requiring net461 on MacOS
I have a dotnet SDK .sln (and a build.proj) with <TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>. It builds on Windows using Visual Studio and dotnet build, but I’d also like it to build as many other places as possible. What do I need to put in my README.md and/or what can I put in the project files to make it build on Rider and/or on
.NET Core build in docker linux container fails due to SSL authentication to Nuget
I was given a .NET Core project to run in a Linux Docker container to do the build, everything seems to be okay on the docker configuration side, but when I run this command: dotnet publish -c Release -o out, I get the SSL authentication error below. The SSL connection could not be established, see inner exception. Authentication failed because
Add SpecFlow tests to .NET Core project in VSCode
I’ve created a .NET Core project and I’m using VSCode on Linux. I installed SpecFlow with dotnet add package SpecFlow but I don’t think there is IDE integration yet. Can I use the SpecFlow nuget package from the command line to create a test? Answer SpecFlow 3.0 will have .NET Core support. A preview is currently available. See blog post:
How to create a navigation menu in dotnet application?
I have created a console application which have a menu that allow me to navigate between the menu items. I handle the navigation logic in this method: here the full class. Now on windows all works well, but when I run this application on my linux with systemd I get: Unhandled Exception: System.InvalidOperationException: Cannot read key when either application does
`dotnet new command` in openSuse causes `No usable version of the libssl was found` error
I’m trying to develop .NET Core in openSuse. I did install the SDK and everything in tutorials. Now, when I try to run dotnet new console command, I get this error: No usable version of the libssl was found Aborted (core dumped) I found this answer: (.NET Core 2.1 SDK Linux x64 No usable version of the libssl was found),
No executable found matching command “dotnet-ef” in linux
I’m having this error No executable found matching command “dotnet-ef” when I try add migration with ‘dotnet ef migrations add Initial’ command in linux cli. I’ve installed dotnet sdk 2.1, I can build and run projects. System is Debian Linux 9 64 bit In windows env (win 10) everything works well on same setup. How to fix this? Update: dotnet
Analyze memory dump of a dotnet core process running in Kubernetes Linux
I am using Kubernetes in Google Cloud (GKE). I have an application that is hoarding memory I need to take a process dump as indicated here. Kubernetes is going to kill the pod when it gets to the 512Mb of RAM. So I connect to the pod And run: Find the process I want: But when I try to dump…
Setting GCServer = True when running on Linux in .net core project
How do set GCServer to true in a .net core project? Usually in .net framework projects I add an App.Config xml file that sets GCServer variable to true but this does not work in a .net core project running on Linux (the App.Config file is generated and publish but the variable still doesn’t change) Answer Add <ServerGarbageCollection>True</ServerGarbageCollection> to your csproj