指定的deps.json'$$$'不存在

编程入门 行业动态 更新时间:2024-10-26 14:39:52
本文介绍了指定的deps.json'$$$'不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对.NET Core相当陌生,我有一个.NET Core WebAPI项目MyWebApp,也有,我有一个使用EntityFrameworkCore的.Net Core类库项目MyLib

I am rather new to the .NET Core, and I got a .NET Core WebAPI project MyWebApp, also, i have .Net Core Class Library project MyLib using EntityFrameworkCore

当我尝试使用Add-Migration时,出现错误 指定的deps.json [... \MyWebApp\bin\Debug\netcoreapp1 .1\MyWebApp.deps.json]不存在

When i try to use Add-Migration, i get the error The specified deps.json [...\MyWebApp\bin\Debug\netcoreapp1.1\MyWebApp.deps.json] does not exist

检查文件夹,我注意到我在[... \MyWebApp\bin中有一个文件\Debug\netcoreapp1.1\win10-x64\MyWebApp.deps.json]

Inspecting the folder, I noticed I have this a file in [...\MyWebApp\bin\Debug\netcoreapp1.1\win10-x64\MyWebApp.deps.json]

但我真的不知道该怎么办解决这个问题。

but i really can't figure what i am supposed to do to resolve this.

myWebApi project.json:

myWebApi project.json:

{ "dependencies": { "ShopManager": "1.0.0-*", "Microsoft.AspNetCore.StaticFiles": "1.1.0", "Microsoft.AspNetCore.Mvc": "1.1.0", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", "Microsoft.Extensions.Configuration.Json": "1.1.0", "Microsoft.Extensions.Logging": "1.1.0", "Microsoft.Extensions.Logging.Console": "1.1.0", "Microsoft.Extensions.Logging.Debug": "1.1.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", "Microsoft.NETCore.App": "1.1.0" }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" }, "runtimes": { "win10-x64": "" }, "frameworks": { "netcoreapp1.1": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } }, "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true }, "runtimeOptions": { "configProperties": { "System.GC.Server": true } }, "publishOptions": { "include": [ "wwwroot", "Views", "Areas/**/Views", "appsettings.json", "web.config" ] }, "scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } }

推荐答案

运行时在 project.json 看起来可疑。一旦只为一个运行时生成-无需使用它。

runtimes section in project.json looks suspicious. As soon as you build for one runtime only - there is no need to use it.

删除它并从 Microsoft.NETCore重写依赖关系。 App: 1.1.0 到 Microsoft.NETCore.App:{ type: platform, version: 1.1.0} 。

这会将您的应用程序部署模型从独立(即使没有框架也可以在特定平台上运行)更改为依赖框架 (可以在安装了框架的任何平台上运行)。详细信息在这里。

This will change your app deployment model from "self-contained" (can run on specific platform even without framework) to "framework-dependent" (may run on any platform with framework installed). Details are here.

更多推荐

指定的deps.json'$$$'不存在

本文发布于:2023-11-13 10:17:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584114.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不存在   deps   json

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!