Closed ENikS closed 7 years ago
Sure, I will take a look at it. ;)
Can you can assign this issue to me? Also, I need a new repository/package to port MVC 6 since framework dependencies are different between MVC 5 and MVC 6. I could have made a new branch for MVC 6 but the base code is totally different.
OK, I renamed this repo to just MVC and created Unity.AspNet.Mvc for ASP 6 support. You would have to adjust namespaces once again but this time it will be all as you like it. We'll have legacy Unity.Mvc and new Unity.AspNet.Mvc. The next one will be Unity.Microsoft.DependencyInjection but that one requires Unity 6.
Namespaces can be the same since a developer should use MVC 6 OR MVC 5, not both of them.
Ehm, actually it seems like Microsoft killed ASP.NET 5 project (MVC 6) and "renamed it" .NET Core [1]. I noticed that the sources you linked me actually refers to a Microsoft.Framework.DependencyInjection package which seems to be the pre-release naming of Microsoft.Extensions.DependencyInjection.
About DependencyInjection: version 1.x is compatible with .NET Standard 1.6 but version 2.x is compatible only with .NET Standard 2.0. That code you linked seems to be a fine match for DependencyInjection 2.0. In order to make it compile it needs only minor adjustments.
Is it worth implementing (MVC 6)? Honestly, I could live without it.
Microsoft.Extensions.DependencyInjection 2.0 is a whole new beast. It has compatibility tests that require completely new functionality which is not supported by v5. It is the reason I've started with v6 to be honest.
The official packages for ASP.NET 5 (MVC 6 and WebAPI 3) do not exist anymore on NuGet so it is not possible to do anything about that. Maybe we can find something old in the ASP.NET Core repository but it is not really worth it.
Yesterday I ported the code written by pedro (I don't know who he is, the name is in the xproj file of the old MVC 6 project) to Dependency Injection 1.1.1 on a .NET Standard 1.0 project and it compiles just fine after some fixes I made. I did not tested it also because I've never used Dependency Injection before. I created a new repository for the code. I also added a (empty) project for testing and mimicked the structure other projects have.
Lets use existing microsoft-dependency-injection
repo and create branch for Core 1.x
and Core 2.x
implementations.
We will release Unity.Microsoft.DependencyInjection.1.x
package for v5.x container and later will release Unity.Microsoft.DependencyInjection.2.x
when Container.6.x is available.
The project looks good, I'll push it to microsoft-dependency-injection repo later tonight. I'd like to name package Unity.Microsoft.DependencyInjection to be consistent with other containers out there and to specify Microsoft.Extensions... as target. This way it will be immediately obvious to anyone looking at the search result on NuGet.
Fine by me.
@ENikS I seem to have no control over the tasks assigned to me. Can you close this issue? I will open up a new one for DependencyInjection 2.0 on the other repository. Thank you.
Done
@axelgenus Do you want to take a look? The code should be here