简体   繁体   中英

ASP.NET Core on ubuntu: mscorlib apparently not referenced

I am trying to get a ASP.NET Core App running on my ubuntu 14.04 server. However, when I try to reach the website, I get an "Internal Server Error", and it says that types System.Object, System.Void etc. are not referenced.

The strange thing is that on my Windows PC it works fine. On my server I have mono-complete installed and dotnet 1.0.0-preview1-002702 (latest version according to https://www.microsoft.com/net/core#ubuntu ).

My project.json file: https://gist.github.com/leodeuhh/4fd937e94cf0f0279c6f93988c2e7220

Error message as shown in browser: https://gist.github.com/leodeuhh/3a33fd721fc19c769acc033b26066764

Any help how to fix this would be greatly appreciated.

Found the solution - I had to publish it via 'dotnet publish', copy the file 'libhostpolicy.so' to publish directory from sdk dir and then run it via 'mono App.exe'. Now it works fine.. Just weird that 'dotnet run' doesn't do the job..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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