我们有一个应用程序,用.NET Core rc2编写,在验收环境(linux服务器)上运行.最近我们的客户运行了他们自己的性能测试,结果证明完全破坏了应用程序.我们无法自己重现它有以下几个原因:1)我们在Windows上开发2)我们已经从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'.
Run Code Online (Sandbox Code Playgroud)
基本上我们希望能够检查当前在linux机器上接受我们的应用程序(rc2)时正在运行的版本,但我们正在努力实际获得rc2.
谢谢.如果有任何不清楚的地方,请在评论中发布您的问题.
编辑:我尝试将其构建为独立部署,但后来我收到以下错误:
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 Code Online (Sandbox Code Playgroud) 我还没有找到解压缩.tgz文件的方法。这是我到目前为止尝试过的:
使用ZipArchive时,显然会出现以下错误:
End of Central Directory record could not be found
Run Code Online (Sandbox Code Playgroud)
我也尝试过使用GZipStream解压缩文件,但可悲的是,我只能将其解压缩为文件,而我做不到的事情...以下代码是我用来处理的:
using (var stream = File.OpenRead("C:\\file.tgz"))
{
using (var decrompressedFileStream = File.Create("C:\\file"))
{
using (GZipStream decompressionStream = new GZipStream(stream, CompressionMode.Decompress))
{
decompressionStream.CopyTo(decrompressedFileStream);
}
}
}
Run Code Online (Sandbox Code Playgroud)
我应该如何将压缩包解压缩到目录中?
我将解释一下我的用例:
我必须下载一个特定的npm软件包(从客户端的个人npm注册表),并对该软件包中的某些文件进行一些处理。
如果您需要任何其他信息,请在评论中提出。谢谢!