visualeyes / halcyon

A HAL implementation for ASP.NET
MIT License
81 stars 30 forks source link

Framework DNXCore v5.0 Not Supported #16

Closed brentarias closed 8 years ago

brentarias commented 8 years ago

I created a brand-new ASP.NET Core project, and immediately installed Halcyon.Mvc. It gave this error:

The dependency Halcyon.Mvc 1.1.0-alpha in project ConnectApis does not support framework DNXCore,Version=v5.0

I decided to create a brand new .NET Core project, and drop your source code into it. From that I created a NuGet package and have installed it into my original ASP.NET Core project. It seems to work fine. The project.json I have in this arrangement looks like this:

"frameworks": {
  "net451": { },
  "dotnet5.4": {
    "dependencies": {
      "Microsoft.CSharp": "4.0.1-beta-23516",
      "System.Collections": "4.0.11-beta-23516",
      "System.Linq": "4.0.1-beta-23516",
      "System.Runtime": "4.0.21-beta-23516",
      "System.Threading": "4.0.11-beta-23516"
    }
  }
},
"dependencies": {
  "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
  "Newtonsoft.Json": "8.0.3",
  "Tavis.UriTemplates": "1.0.0"
}
johncmckim commented 8 years ago

@brentarias I haven't had a chance to try and convert the main Halcyon over to .NET Core yet. Right now it works for ASP.NET Core projects that target .NET 4.5 but not .NET Core 1.0.

When I drop that config into Halcyon.Mvc, I get an error. Did you do that for the Halcyon and Halcyon.Mvc projects?

I'm happy to accept a pull request converting Halcyon to .NET Core project targeting .NET 4.5 + dnx. I'd just need to work out how to get appveyor to version .NET Core projects properly before merging it in.

brentarias commented 8 years ago

In my rush to simply "get it working", I combined the source code from both projects (Halcyon and Halcyon.Mvc) into a single project.

side note: Even with .NET Core compatibility, it occurred to me that Halcyon might not be suitable for my needs. I'm trying to combine HAL with Swashbuckle. Swashbuckle works best when I specify the type (attribute annotation) of a return value. But with Halcyon, the return type is more amorphous / composition based. The irony is that I normally prefer the composition approach, but I may be forced to take the inheritance approach to fit well with Swashbuckle. Thoughts?

johncmckim commented 8 years ago

Ah ok. I still need to support .NET 4.5 and ASP.NET 4.5 and higher. That's why I split the Halcyon project up so I could keep support.

Converting the Halcyon project to a .NET Core project that can still target .NET 4.5 is the plan. This should allow me to add support for .NET Core.

I'm not very familiar with Swashbuckle so I can't really help with that. I agree with you about a preference for a composed approach, which is why I created this project. If you do end up needing something that supports annotations, at this stage, the best option might be WebApi.Hal. If you have ideas on how I can make Halcyon better support your situation, happy to hear them.

johncmckim commented 8 years ago

I've just converted all the projects to .NET Core in #26. With this I have added support for dnx45, not the DNX Core framework yet.

I'm aiming to get an alpha release of all the recent changes out under 2.0.0. Once that's done, I'll see if I can add support for dnxcore50

johncmckim commented 8 years ago

The frameworks have changed a lot since this was created and DNX is no more. I'm going to close this issue as we won't support dnxcore50 but will support the newer frameworks. @brentarias if you are still interested in the new frameworks, can you please create a new issue.