.netcoreapp 发布到 linux 的问题,vs靠不住

.netcore 2.0 发布后,小版本更新速度惊人

截止目前:2.1.200

 

最新一个新项目,vs发布到linux@debian9一直报错,反复发布n次依然失败。把本地2.1.100更新到最新2.1.200再次vs发布,依然失败。

root@omni:/data/xxx# dotnet WebHost.dll

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.IO.FileSystem, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Aborted

 

最后使用命令行:dotnet publish --f netcoreapp2.0 -r linux-x64

上传后运行正常。

 

可能原因:dotnet小版本更新太快,vs没更新到最新小版本。也算是坑一个,错误信息太不明显。

posted @ 2018-05-16 20:28  nicye  阅读(474)  评论(0编辑  收藏  举报