【发布时间】:2021-11-25 19:46:29
【问题描述】:
我们有一个应用程序,用 .NET Core rc2 编写,在验收环境(Linux 服务器)上运行。 最近我们的客户运行了他们自己的性能测试,结果完全破坏了应用程序。由于以下几个原因,我们无法自己复制它:
- 我们在 windows 上开发
- 我们已经从 rc2 迁移到 1.0.0。
在 Windows 上,我们无法在新版本 (1.0.0) 或 rc2 中重现。 所以我们尝试在linux机器上重现它。在 1.0.0 上,我们也无法重现他们的结果,但是当我们尝试针对 rc2(显然是我们的应用程序的旧版本)进行实际测试时,我们遇到了一个非常烦人的问题:我似乎无法安装1.0.0 和 rc2 并排,即使错误消息暗示它是可能的。 以下是错误信息
The specified framework 'Microsoft.NETCore.App', version '1.0.0-rc2-3002702' was not found.
- Check application dependencies and target a framework version installed at:
/usr/share/dotnet/shared/Microsoft.NETCore.App
- The following versions are installed:
1.0.0
- Alternatively, install the framework version '1.0.0-rc2-3002702'.
基本上,我们希望能够在 linux 机器上接受我们的应用程序 (rc2) 时检查当前运行的版本,但我们正在努力在其上实际获取 rc2。
谢谢。如果有任何不清楚的地方,请在 cmets 中发布您的问题。
编辑: 我尝试将其构建为独立部署,但随后出现以下错误:
Errors in /home/nicolaas/Projects/digipolis-survey-engine/Digipolis.FormEngine/Digipolis.FormEngine.Response.API/project.json
System.AppContext 4.1.0-rc2-24027 provides a compile-time reference assembly for System.AppContext on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with ubuntu.15.10-x64.
System.Runtime.InteropServices.RuntimeInformation 4.0.0-rc2-24027 provides a compile-time reference assembly for System.Runtime.InteropServices.RuntimeInformation on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with ubuntu.15.10-x64.
One or more packages are incompatible with .NETCoreApp,Version=v1.0 (ubuntu.15.10-x64).
这是意料之中的,因为机器上实际上没有安装rc2,我想在linux机器上构建它
【问题讨论】:
-
你试过standalone deployment .Net core 选项了吗?
-
我没有。以前没想到...我现在试试,谢谢!
-
您找到解决问题的方法了吗?
-
@Sharif 对不起,我们没有。如果我没记错的话,我们找到了一种解决方法(基本上只是启动另一个只安装了特定版本的虚拟机)
-
是的,这几乎就是我正在做的一种解决方法。