指定的deps.json不存在angular2 asp.net核心应用程序。 [英] the specified deps.json does not exist angular2 asp.net core application.

查看:745
本文介绍了指定的deps.json不存在angular2 asp.net核心应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库,我试图将我的角度2 .net核心应用程序。我升级到.net core 1.1遵循大多数步骤,但是我收到指定的deps.json不存在的错误。这是我的project.json

  {
dependencies:{
Microsoft.NETCore.App :{
version:1.1.0,
type:platform
},
Microsoft.AspNetCore:1.1.0
Microsoft.AspNetCore.Mvc.Core:1.1.1,
Microsoft.AspNetCore.AngularServices:1.0.0- *,
Microsoft.AspNetCore.Razor .Tools:{
version:1.0.0-preview2-final,
type:build
},
Microsoft.AspNetCore.Diagnostics :1.1.0,
Microsoft.AspNetCore.Mvc:1.1.1,
Microsoft.AspNetCore.Server.IISIntegration:1.1.0,
Microsoft.AspNetCore.Server.Kestrel:1.1.0,
Microsoft.AspNetCore.StaticFiles:1.1.0,
Microsoft.Extensions.Configuration.CommandLine:1.1 .0,
Microsoft.Extensions.Configuration.EnvironmentVariables: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.EntityFrameworkCore.SqlServer:1.1.0,
Microsoft.EntityFrameworkCore.SqlServer.Design:1.1.0 ,
Microsoft.EntityFrameworkCore.Tools:1.1.0-preview4-final
},

工具:{
Microsoft.AspNetCore。 Razor.Tools:1.0.0-preview2-final,
Microsoft.AspNetCore.Server.IISIntegration.Tools:1.0.0-preview2-final,
Microsoft.DotNet。 Watcher.Tools:1.0.0-preview2-final
},

框架:{
netcoreapp1.1.0:{
:[
dotnet5.6,
portable-net45 + win8
]
}
},

buildOptions :{
emitEntryPoint:true,
preserveCompilationContext:true
},

runtimeOptions:{
con figProperties:{
System.GC.Server:true
}
},

publishOptions:{
include:[
appsettings.json,
ClientApp / dist,
node_modules,
Views,
web.config,
wwwroot
]
},

脚本:{
prepublish:[
npm install,
节点node_modules / webpack / bin / webpack.js --config webpack.config.vendor.js --env.prod,
node node_modules / webpack / bin / webpack.js --env.prod
],
postpublish:[dotnet publish-iis --publish-folder%publish:OutputPath%--framework%publish:FullTargetFramework%]
},

tooling:{
defaultNamespace:HannaOilAndGas2
}
}

这是我试图支架我的数据库

  Scaffold-DbContextServer = myserver,1433 ; Initial Catalog = database; Persist Security Info = False; User ID = my ID,密码=输入mypassword; MultipleActiveResultSets = FALSE;加密= TRUE; TrustServerCertificate = TRUE; Microsoft.EntityFrameworkCore.SqlServer -OutputDir数据

此连接字符串的作品是因为我已经构建了常规模型并访问它们用这个连接字符串。任何帮助将不胜感激。

解决方案

在这一行



 框架:{
netcoreapp1.1.0:{
imported:[
dotnet5.6 ,
portable-net45 + win8
]
}
},

我需要更改为

 框架:{
netcoreapp1.1 :{
imports:[
dotnet5.6,
portable-net45 + win8
]
}
},


I have a database I am trying to scaffold into my angular 2 .net core application. I upgraded to .net core 1.1 followed most steps but I am getting the error the specified deps.json does not exist. This is my project.json

  {
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "Microsoft.AspNetCore": "1.1.0",
    "Microsoft.AspNetCore.Mvc.Core": "1.1.1",
    "Microsoft.AspNetCore.AngularServices": "1.0.0-*",
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.0.0-preview2-final",
      "type": "build"
    },
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Mvc": "1.1.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "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.EntityFrameworkCore.SqlServer": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final"
  },

  "tools": {
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
    "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final"
  },

  "frameworks": {
    "netcoreapp1.1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "appsettings.json",
      "ClientApp/dist",
      "node_modules",
      "Views",
      "web.config",
      "wwwroot"
    ]
  },

  "scripts": {
    "prepublish": [
      "npm install",
      "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod",
      "node node_modules/webpack/bin/webpack.js --env.prod"
    ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  },

  "tooling": {
    "defaultNamespace": "HannaOilAndGas2"
  }
}

this is how I am trying to scaffold my database

Scaffold-DbContext "Server=myserver,1433;Initial Catalog=database;Persist Security Info=False;User ID=myid;Password=mypassword;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Data

this connection string works because I have built regular models and accessed them with this connection string. Any help would be greatly appreciated.

解决方案

on this line

"

frameworks": {
    "netcoreapp1.1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

I needed to change to

"frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

这篇关于指定的deps.json不存在angular2 asp.net核心应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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