twitchax / AspNetCore.Proxy

ASP.NET Core Proxies made easy.
MIT License
525 stars 83 forks source link

Support for AspNetCore 3 #29

Closed lehne closed 4 years ago

lehne commented 4 years ago

Right now it looks like AspNetCore 2.2 is used. If installing for 3, a lot more packages are required.

twitchax commented 4 years ago

@lehne, while I am preparing a big release right now to make the library feel more native to .NET, I have no plans to move fully to ASP.NET Core 3.

You can use this library from ASP.NET Core 3, though. The test project is targeting 3.

lehne commented 4 years ago

Alright was just curious. I have it working now, but just includes all the 2.2 libs. Works great though--nice library!

twitchax commented 4 years ago

Ahhh, good point. That is not ideal. I will probably ship different targets, then. Reopening for tracking that work. Glad that the workaround works, though.

kylepope-ge commented 4 years ago

Just FYI, the workaround unfortunately doesn't work when you're referencing the latest AspNetCore.Proxy library from dotnet core 3+ a web project (i.e. the csproj file has <Project Sdk="Microsoft.NET.Sdk.Web"> at the top). The test project you referenced isn't a web project, which is why this hasn't been seen yet, mabye? The error I seem to get when I try it is the following:

CSC : error CS8034: Unable to load Analyzer assembly /usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.aspnetcore.mvc.analyzers/2.2.0/analyzers/dotnet/cs/Microsoft.AspNetCore.Mvc.Analyzers.dll : Assembly with same name is already loaded [/Users/kylepope/Code/Tests/Test1/Test1.csproj]

I've been looking into a workaround and, according to the docs I believe it's because the Microsoft.AspNetCore.Mvc.Analyzers project is already referenced in dotnet 3+ web projects, so it can't load the same library again.

I haven't been able to find out a way of disabling the analyzer or ignoring the duplicate reference. Any thoughts on how to do so? Annoying for sure.

twitchax commented 4 years ago

Sorry, all, still working on the release that moves to 3.0.

Basically, procrastinating because all that is left is xml docs.

dbettin commented 4 years ago

@twitchax Thanks for this project! Is the 3.0 support on a branch? I would like to start testing the upgrade.

twitchax commented 4 years ago

Yes, check out the 4-release branch. There are syntactic changes as well. The new readme doesn’t describe them yet, but the tests do.

Mostly just missing docs.

https://github.com/twitchax/AspNetCore.Proxy/tree/4-release?files=1

kylepope-ge commented 4 years ago

It's been a couple months... @twitchax do you need any help to wrap this issue up? Sounds like you were close to closing this out.

twitchax commented 4 years ago

Sorry! Day job has gotten the better of me recently.

I am taking a new role, so I will have some time to work on this coming up. That being said, if you want to help out with some XML doc PRs, then I will take them. If you do, please try to match some of the existing docs and let me know so I can work on different docs.

Also, as a stop gap, there is an alpha release without the docs: https://github.com/twitchax/AspNetCore.Proxy/releases/tag/v4.0.0-alpha.

twitchax commented 4 years ago

PR out.