DotNet Core控制台应用程序:在应用程序依赖清单中指定的程序集 [英] DotNet Core console app: An assembly specified in the application dependencies manifest

查看:356
本文介绍了DotNet Core控制台应用程序:在应用程序依赖清单中指定的程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是试图在Windows Server 2012 R2上运行DotNet Core控制台应用程序,但我不断收到此错误:

Im just trying to run a DotNet Core console app on a Windows Server 2012 R2 but I keep getting this error:

错误:
找不到在应用程序依赖项清单(Application.deps.json)中指定的程序集:
软件包:'Microsoft.Web.Administration',版本:'11 .1.0'
路径:'lib / netstandard1 .5 / Microsoft.Web.Administration.dll'

缺少的dll位于/ publish文件夹中...
Dotnet使用正确的运行时标识符(win81-x64)发布

The dll that is missing is inside the /publish folder... I used Dotnet publish with the correct Runtime Identifier (win81-x64)

我在服务器上安装了Dotnet运行时2.0.7

I installed the Dotnet runtime 2.0.7 on the server

推荐答案

在部署到目标服务器时始终使用发布输出。

Always use the publish output when deploying to a target sever.

可以在

bin\Release\netcoreapp2.0\win81-x64\publish

在您的情况下(独立应用程序)

in your case (self-contained application)

或在

bin\Release\netcoreapp2.0\publish

用于依赖框架的部署。

上面目录中的输出表示只能用于开发中,因为它们特定于使用它构建的机器和用户配置。

The output in the directories above are meant to be used in development only, since they are specific to machine and user configuration built with.

这篇关于DotNet Core控制台应用程序:在应用程序依赖清单中指定的程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆