nuget - 创建可以针对多个框架的 ASP.NET vNext NuGet

标签 nuget asp.net-core

我正在尝试创建一个可在 ASP.NET vNext(Desktop 和 CoreCLR)以及 .NET Framework 4.5 上运行的 NuGet 包。

我看过http://json.schemastore.org/project对于模式,但似乎没有关于什么“框架”是可接受的指导。这是我当前的project.json,但我不确定它是否正确。

“框架”可能取什么值?

"frameworks": {
        "aspnet50": {
            "frameworkAssemblies": {
                "System.Net.Http": "4.0.0.0",
                "System.Runtime.Serialization": "4.0.0.0",
                "System.Xml": "4.0.0.0",
                "System.Xml.Linq": "4.0.0.0"
            }
        },
        "aspnetcore50": {
            "dependencies": {
                "System.Runtime": "4.0.20-beta-22231",
                "System.Runtime.Serialization.Primitives": "4.0.0-beta-22231",
                "System.Xml.ReaderWriter": "4.0.10-beta-22231",
                "System.Xml.XDocument": "4.0.0-beta-22231",
                "System.Net.Http": "4.0.0-beta-22231",
                "System.Globalization": "4.0.10-beta-22231",
                "System.Diagnostics.Debug": "4.0.10-beta-22231",
                "System.Diagnostics.TraceSource": "4.0.0-beta-22231",
                "System.Collections": "4.0.10-beta-22231",
                "System.Linq": "4.0.0-beta-22231",
                "System.Linq.Parallel": "4.0.0-beta-22231",
                "System.Runtime.Extensions": "4.0.10-beta-22231",
                "System.IO.Compression": "4.0.0-beta-22231",
                "System.Reflection": "4.0.10-beta-22231",
                "System.IO.FileSystem": "4.0.0-beta-22231",
                "System.Threading.Thread": "4.0.0-beta-22231",
                "System.Threading": "4.0.0-beta-22231",
                "System.Reflection.Extensions": "4.0.0-beta-22231"
            }
        },
        "framework45": {
            "dependencies": {
                "Newtonsoft.Json": "6.0.4"
            }
        },
    }

最佳答案

以下是如何定位其他框架:https://github.com/aspnet/EntityFramework/blob/dev/src/EntityFramework.Core/project.json

对 .NET 4.5 使用 net45

关于nuget - 创建可以针对多个框架的 ASP.NET vNext NuGet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27951587/

相关文章:

c# - 扩展方法中的 Azure 存储表 ExecuteQuerySegmentedAsync 调用错误

windows - 我应该在 Windows 2016 上使用 Docker EE 在 Windows 上使用哪些图像

c# - 使用 Swashbuckle Aspnetcore 将 `host` 、 `basePath` 和 `schemes` 添加到 swagger.json

.net - 将 ASP.Net Identity 表链接到用户详细信息表

asp.net-mvc - 在 MVC 5 上设置 Jasmine 测试框架

asp.net - 升级到 MVC 5.2.0.0 导致异常 "Method not found: ' Boolean System.Web.WebPages.BuildManagerWrapper.IsNonUpdateablePrecompiledApp”

powershell - NuGet init.ps1 执行两次

c# - 如何阻止从 Controller 继承的类的 OnActionExecuting 中执行操作

asp.net - NuGet 包还原不会为 asp.net 网站安装包

InfoPath 表单中的 C# 字符串插值