gpt4 book ai didi

amazon-ec2 - 在Docker容器中将ASP.NET 5应用程序部署到EC2

转载 作者:行者123 更新时间:2023-12-02 18:42:58 25 4
gpt4 key购买 nike

我有一个运行Amazon Linux AMI 2015.03.1。的t2.micro EC2实例。我在上面installed docker,然后手动updated it。最后,我使docker守护程序在我选择的端口上侦听,以便可以远程发布到它。

在我的开发机器上,我在VS2015中添加了VS2015 Tools for Docker - August Preview。我添加了一个新的ASP.NET 5 Web应用程序,对其进行了构建并点击了发布。容器将其发送到主机,但由于此异常它从未运行;

System.TypeLoadException: Could not load type 'Microsoft.Framework.Configuration.IConfigurationRoot' from assembly 'Microsoft.Framework.Configuration.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain (Microsoft.Dnx.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in <filename unknown>:0
at Microsoft.Dnx.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
at Microsoft.Dnx.Host.Bootstrapper.RunAsync (System.Collections.Generic.List`1 args, IRuntimeEnvironment env, System.Runtime.Versioning.FrameworkName targetFramework) [0x00000] in <filename unknown>:0

最佳答案

这是一个问题,因为有多个项目引用了不同版本的ASP.NET5- beta7和beta6。

确保在所有project.json中仅引用一个流即可解决此问题。

关于amazon-ec2 - 在Docker容器中将ASP.NET 5应用程序部署到EC2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32523045/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com