简体   繁体   English

Mono不执行带有Azure参考的VS编译的4.5 .NET API exe

[英]Mono not executing VS compiled 4.5 .NET API exe with Azure reference

I have a Linux/ubuntu Trusty64 virtual machine through virtual box manager. 我有一个通过虚拟盒子管理器的Linux / ubuntu Trusty64虚拟机。 I'm trying to run a VS 2015 compiled .NET4.5 Web API exe with Azure storage reference through Mono. 我正在尝试通过Mono运行带有Azure存储参考的VS 2015编译的.NET4.5 Web API exe。 I have the Exe and EXE.Config file in the app folder. 我在应用程序文件夹中有Exe和EXE.Config文件。 When I give the mono command it comes back saying 当我发出单声道命令时,它会说

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, version=7.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or one of its dependencies. 未处理的异常:System.IO.FileNotFoundException:无法加载文件或程序集“ Microsoft.WindowsAzure.Storage,版本= 7.0.0.0,区域性=中性,publickeytoken = 31bf3856ad364e35”或其依赖项之一。

Here is how I did it, I upgraded my .NET code into a 5.0 console package template. 这是我的工作方式,我将.NET代码升级为5.0控制台程序包模板。 Made sure it was DNX 5.0 core compliant code and made the below dockerfile in the Ubuntu virtual machine at the solution level of the project. 确保它是DNX 5.0核心兼容代码,并在项目的解决方案级别在Ubuntu虚拟机中创建了以下dockerfile。 FROM microsoft/aspnet COPY . 从microsoft / aspnet复制。 /app WORKDIR /app/src/"Projectname" RUN ["dnu","restore"] ENTRYPOINT ["dnx", "run"] / app WORKDIR / app / src /“项目名称” RUN [“ dnu”,“恢复”] ENTRYPOINT [“ dnx”,“ run”]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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