简体   繁体   中英

Publishing .NET Core C# self-contained application for linux architecture

So I'm trying to host a discord bot on a Google Cloud Server. I've got a base-level bot that works and runs from my local machine. The bot is written in C# .NET Core framework for Windows 10 x64.

Before anyone says it's been solved before, I have found those solutions and nothing is helping me.

I'm trying to publish the .NET application to a linux format self-contained. So that I can deploy and run the bot on the linux server (Ubuntu 18.04-x64 [I cross-checked on the .NET website to make sure it was a deployable package]) I looked it up and found the command, and also the changes I had to make inside my .vsproj file.

发布错误

.csproj文件

Is anyone able to walk me through something I'm missing? Do I have to download the linux version of something to build for it... or whatever. I'm not really sure what I'm missing. Then from that, I know how to upload the files to my server, but how do I "remotely" execute the deployed application on the server?

Thank you to those who commented. Performed the update for my .NET Core framework to 2.1.500 and hey presto! Successfully published the application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM