在asp.net核心RC2中使用swagger

编码器

我正在将一个项目从ASP.NET RC1迁移到RC2,但是某些程序包无法正常工作。VS抱怨无法解决它们。要添加的正确软件包/版本是什么

  "Swashbuckle.SwaggerGen": "6.0.0-rc1-final",
  "Swashbuckle.SwaggerUi": "6.0.0-rc1-final"

以下是整个project.json文件(以防丢失)。最后3个软件包失败,并显示相同的错误(The dependency XXX >= YYY could not be resolved

{ "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true }, "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1-rc2-24027", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", "Microsoft.AspNetCore.Mvc.Core": "1.0.0-rc2-final", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", "Microsoft.Extensions.Logging": "1.0.0-rc2-final", "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", "RestSharp": "105.2.3", "Flurl.Http": "0.7.0", "Microsoft.EntityFrameworkCore.Tools": { "version": "1.0.0-preview1-final", "type": "build" }, "Swashbuckle.SwaggerGen": "6.0.0-rc1-final", "Swashbuckle.SwaggerUi": "6.0.0-rc1-final", "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final" }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": { "version": "1.0.0-preview1-final", "imports": "portable-net45+win8" }, "Microsoft.EntityFrameworkCore.Tools": { "version": "1.0.0-preview1-3002702", "imports": [ "portable-net45+win8", "portable-net4+win8" ] }, "Microsoft.Extensions.SecretManager.Tools": { "version": "1.0.0-preview1-final", "imports": "portable-net45+win8" } }, "frameworks": { "net452": { "frameworkAssemblies": { "System.Runtime.Serialization": "4.0.0.0", "System.ServiceModel": "4.0.0.0", "System.Net.Http": "4.0.0.0" } } }, "runtimeOptions": { "gcServer": true }, "publishOptions": { "include": [ "wwwroot", "appsettings.json", "web.config" ] } }

拉利西亚·维拉克马塞斯卡拉

它适用于.net 4.5。检查这个project.json

{
   "dependencies": {
        "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
        "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
        "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
        "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
        "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
        "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
        "Microsoft.Extensions.Logging": "1.0.0-rc2-final",
        "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
        "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
        "Swashbuckle.SwaggerGen": "6.0.0-beta9",
        "Swashbuckle.SwaggerUi": "6.0.0-beta9"
},

"tools": {
       "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
         "version": "1.0.0-preview1-final",
         "imports": "portable-net45+win8+dnxcore50"
       }
},

"frameworks": {
       "net452": { }
},

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

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

 "scripts": {
   "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
 }
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在ASP.NET Core 1.0 RC2中使用RSS的正确方法

来自分类Dev

带有HtmlEncoder()的asp.net核心1.0 mvc RC2 tagBuilder方法在RC1中不起作用RC2

来自分类Dev

在ASP.NET Core RC2中使用AddAuthentication时的模棱两可的调用

来自分类Dev

在ASP.NET Core应用程序(RC2)中使用net451库

来自分类Dev

ASP.NET Core rc2中的Cookie

来自分类Dev

ASP.NET Core RC2中的网址重写

来自分类Dev

ASP.NET Core RC2中的网址重写

来自分类Dev

将rc2 asp.net核心应用程序发布到Azure

来自分类Dev

ASP.nET核心Web应用程序(.NET Core RC2)-为什么head标签中的项目显示在body标签中

来自分类Dev

Asp.net核心RC1到RC2集成测试:UseServices去了哪里?

来自分类Dev

ASP.NET Core 1.0 RC2中的“找不到类型或名称空间名称”

来自分类Dev

如何禁用ASP.NET Core rc2中的浏览器缓存?

来自分类Dev

如何在ASP.NET Core 1.0 RC2中加载程序集

来自分类Dev

在ASP.NET MVC Core应用程序(RC2)中显示项目版本

来自分类Dev

无法在IISExpress中启动ASP.NET Core RC2 Web应用程序

来自分类Dev

如何在ASP.NET Core RC2中制作Websocket服务器?

来自分类Dev

如何在ASP.NET Core RC2中制作Websocket服务器?

来自分类Dev

ASP.NET Core 1.0 RC2中的“找不到类型或名称空间名称”

来自分类Dev

无法在ASP.NET Core RC2中导入Oracle Client

来自分类Dev

ASP Net Core 1 RC2 AccountController注入

来自分类Dev

是否发布了ASP.NET Core RC2?

来自分类Dev

使用IIS从Asp Net Core RC2网站访问本地目录

来自分类Dev

使用ASP.NET Core RC2 404(而不是403)进行承载身份验证

来自分类Dev

在ASP Core 1.0 RC2中无法远程触发

来自分类Dev

如何在 Visual Studio Team Services (VSTS) 中构建 ASP.NET Core 2 RC2 项目?

来自分类Dev

无法让ConfigurationBuilder从ASP.NET Core 1.0 RC2的xunit类库中的appsettings.json中读取

来自分类Dev

无法让ConfigurationBuilder从ASP.NET Core 1.0 RC2的xunit类库中的appsettings.json中读取

来自分类Dev

Razor页面在运行时无法在ASP.NET Core RC2中看到引用的类库

来自分类Dev

如何在ASP.NET Core RC2应用程序中手动重新加载IOptions

Related 相关文章

  1. 1

    在ASP.NET Core 1.0 RC2中使用RSS的正确方法

  2. 2

    带有HtmlEncoder()的asp.net核心1.0 mvc RC2 tagBuilder方法在RC1中不起作用RC2

  3. 3

    在ASP.NET Core RC2中使用AddAuthentication时的模棱两可的调用

  4. 4

    在ASP.NET Core应用程序(RC2)中使用net451库

  5. 5

    ASP.NET Core rc2中的Cookie

  6. 6

    ASP.NET Core RC2中的网址重写

  7. 7

    ASP.NET Core RC2中的网址重写

  8. 8

    将rc2 asp.net核心应用程序发布到Azure

  9. 9

    ASP.nET核心Web应用程序(.NET Core RC2)-为什么head标签中的项目显示在body标签中

  10. 10

    Asp.net核心RC1到RC2集成测试:UseServices去了哪里?

  11. 11

    ASP.NET Core 1.0 RC2中的“找不到类型或名称空间名称”

  12. 12

    如何禁用ASP.NET Core rc2中的浏览器缓存?

  13. 13

    如何在ASP.NET Core 1.0 RC2中加载程序集

  14. 14

    在ASP.NET MVC Core应用程序(RC2)中显示项目版本

  15. 15

    无法在IISExpress中启动ASP.NET Core RC2 Web应用程序

  16. 16

    如何在ASP.NET Core RC2中制作Websocket服务器?

  17. 17

    如何在ASP.NET Core RC2中制作Websocket服务器?

  18. 18

    ASP.NET Core 1.0 RC2中的“找不到类型或名称空间名称”

  19. 19

    无法在ASP.NET Core RC2中导入Oracle Client

  20. 20

    ASP Net Core 1 RC2 AccountController注入

  21. 21

    是否发布了ASP.NET Core RC2?

  22. 22

    使用IIS从Asp Net Core RC2网站访问本地目录

  23. 23

    使用ASP.NET Core RC2 404(而不是403)进行承载身份验证

  24. 24

    在ASP Core 1.0 RC2中无法远程触发

  25. 25

    如何在 Visual Studio Team Services (VSTS) 中构建 ASP.NET Core 2 RC2 项目?

  26. 26

    无法让ConfigurationBuilder从ASP.NET Core 1.0 RC2的xunit类库中的appsettings.json中读取

  27. 27

    无法让ConfigurationBuilder从ASP.NET Core 1.0 RC2的xunit类库中的appsettings.json中读取

  28. 28

    Razor页面在运行时无法在ASP.NET Core RC2中看到引用的类库

  29. 29

    如何在ASP.NET Core RC2应用程序中手动重新加载IOptions

热门标签

归档