草庐IT

dotnet-aspnet-codegenerator

全部标签

c# - 将 dotnet 核心 (.NET Core) 嵌入到 Windows/Linux 上的 native 应用程序中

是否有可能将dotnet核心(.NETCore)环境嵌入到native进程中?我的用例是一个现有的游戏服务器,我想在其中提供在Windows和Linux上使用C#on.NETCore扩展游戏的可能性。额外的问题:还会有一个AppDomain概念,就像在“oldschool”.NET中一样可用吗? 最佳答案 是的,绝对有可能。我找到了带有示例的文档:.NETCoreHostingTutorial如果链接不再有效,请在网络上搜索“托管.NETCore”。关于AppDomains...我猜不是。如果您使用CoreClrHost.h,您可以

.net - 使用启动脚本运行 `Unhandled Exception: System.ArgumentNullException: Value cannot be null.` 时出现 `dotnet run` 错误

我正在尝试在系统服务器启动/重启时使用dotnetrun--configurationRelease运行dotnet应用程序。我正在使用init.d脚本来实现相同的目的。我的启动脚本位于/etc/init.d/myscript包含以下内容:#!/bin/sh/home/user/myscripts/botScript.shbotScript.sh的内容:#!/bin/bashcd/home/user/bot/nohupdotnetrun--configurationRelease&当我的服务器启动或重新启动时,启动脚本得到执行,但dotnetrun不起作用。我收到以下错误:Unhand

.net - 使用启动脚本运行 `Unhandled Exception: System.ArgumentNullException: Value cannot be null.` 时出现 `dotnet run` 错误

我正在尝试在系统服务器启动/重启时使用dotnetrun--configurationRelease运行dotnet应用程序。我正在使用init.d脚本来实现相同的目的。我的启动脚本位于/etc/init.d/myscript包含以下内容:#!/bin/sh/home/user/myscripts/botScript.shbotScript.sh的内容:#!/bin/bashcd/home/user/bot/nohupdotnetrun--configurationRelease&当我的服务器启动或重新启动时,启动脚本得到执行,但dotnetrun不起作用。我收到以下错误:Unhand

linux - 从 Windows 到 Linux 交叉编译 dotnet 核心应用程序

我在Windows中工作,想在Windows上构建一个dotnet核心应用以在Linux上运行。在build文件夹中,我在published文件夹中看到.DLL文件引用,这显然在Linux上不起作用-如何从我的Windows环境编译应用程序以在Linux上运行?可能吗?在project.json文件中指定了运行时版本,我认为这与C:\ProgramFiles\dotnet\sdk\1.0.0-preview2-003121\runtimes位置中的运行时相关?如果是这样,我如何在Windows中安装Linux运行时并引用它? 最佳答案

linux - 从 Windows 到 Linux 交叉编译 dotnet 核心应用程序

我在Windows中工作,想在Windows上构建一个dotnet核心应用以在Linux上运行。在build文件夹中,我在published文件夹中看到.DLL文件引用,这显然在Linux上不起作用-如何从我的Windows环境编译应用程序以在Linux上运行?可能吗?在project.json文件中指定了运行时版本,我认为这与C:\ProgramFiles\dotnet\sdk\1.0.0-preview2-003121\runtimes位置中的运行时相关?如果是这样,我如何在Windows中安装Linux运行时并引用它? 最佳答案

c# - 红隼错误 : address already in use (dotnet core)

总结:它作为dotnetrun工作,但它不作为dotnetmyappname.dll工作。我的Linux技能有限,但我正在努力按照书本进行操作,以免混淆(遵循来自ScottHanselman的thistutorial):$cd/home/myusername/dotnettest$dotnetrunNowlisteningon:http://localhost:5123然后我将它移动到/var,如下所示:$sudocp-a/home/myusername/dotnettest/bin/Debug/netcoreapp1.1/publish/var/dotnettest最后我测试它是否也

c# - 红隼错误 : address already in use (dotnet core)

总结:它作为dotnetrun工作,但它不作为dotnetmyappname.dll工作。我的Linux技能有限,但我正在努力按照书本进行操作,以免混淆(遵循来自ScottHanselman的thistutorial):$cd/home/myusername/dotnettest$dotnetrunNowlisteningon:http://localhost:5123然后我将它移动到/var,如下所示:$sudocp-a/home/myusername/dotnettest/bin/Debug/netcoreapp1.1/publish/var/dotnettest最后我测试它是否也

linux - DotNet Core 2.1 在 Linux 中囤积内存

我有一个websocket服务器,它会在几天内囤积内存,直到Kubernetes最终将其杀死。我们使用prometheous-net监控它.#dotnet--infoHost(usefulforsupport):Version:2.1.6Commit:3f4f8eebd8.NETCoreSDKsinstalled:NoSDKswerefound..NETCoreruntimesinstalled:Microsoft.AspNetCore.All2.1.6[/usr/share/dotnet/shared/Microsoft.AspNetCore.All]Microsoft.AspNet

linux - DotNet Core 2.1 在 Linux 中囤积内存

我有一个websocket服务器,它会在几天内囤积内存,直到Kubernetes最终将其杀死。我们使用prometheous-net监控它.#dotnet--infoHost(usefulforsupport):Version:2.1.6Commit:3f4f8eebd8.NETCoreSDKsinstalled:NoSDKswerefound..NETCoreruntimesinstalled:Microsoft.AspNetCore.All2.1.6[/usr/share/dotnet/shared/Microsoft.AspNetCore.All]Microsoft.AspNet

c# - ASP.NET 5 : Is the "dotnet" command replacing "dnu" and "dnx" commands?

今天,我按照多个教程在Linux上运行C#应用程序,但总是卡在命令dnurestore上,它返回了一个notfound错误。后来才知道thispage这似乎表明新命令是dotnetrestore,当我尝试它时,它起作用了。是否完全替换了dnu和dnx命令?此外,是否有一些关于dotnet命令的文档? 最佳答案 Isthedotnetcommandreplacingdnuanddnxcommands?是的。他们正在引入新的命令行工具链,ASP.NET5willtransitiontothenewtoolsforRC2.Thisisal