Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Asp.Net Core 3.0 #181

Open
lvmajor opened this issue Nov 1, 2019 · 8 comments · May be fixed by #184 or #190
Open

Not working with Asp.Net Core 3.0 #181

lvmajor opened this issue Nov 1, 2019 · 8 comments · May be fixed by #184 or #190

Comments

@lvmajor
Copy link

lvmajor commented Nov 1, 2019

As the title says, I migrated to asp.net core 3.0, but I get a 500 Internal unhandled error when trying to access the LocalizationAdmin/Index.html page.

Would you have an idea of what could be the culprit here?

I saw and tried the propsed solution in issue #149 but it did not fix my issue.

@lvmajor
Copy link
Author

lvmajor commented Nov 1, 2019

According to logs, it fails in LocalizationAdministrationController.GetLocalizationInfo

@AmrAlsawy
Copy link

Same for me in Asp.Net Core 3.0

@gunduzemreozer
Copy link

Same for me in Asp.Net Core 3.0 project. I research source codes a little. I think the problem is related with json serializer namespace changing in core 3.0 version. I hope that the problem will be solved asap. Thanks for sharing.

@lvmajor
Copy link
Author

lvmajor commented Nov 7, 2019

I managed to get a more specific error by manually copying the repo and using that in my project instead, it seems to be related to the fact that Json effectively isn't included now with asp.net core 3.0 applications.

Also, when trying to import it (Microsoft.AspNetCore.Mvc.NewtonsoftJson), it has other errors as ths package is not compatible with .Net Standard 2.0 (nor .Net Standard 2.1), it requires absolutely .netcoreapp3.0. The exact error is because of the missing definition for JsonResult as seen in this capture
image

@gunduzemreozer
Copy link

Yes, I did same things :) Unfortunately, I couldn't solve the problem. Firstly I tried to override this Json methods in ControllerBase class of AspNetCore, unfortunately it took a lot of time and I stopped. The exact solution convert the application to .netcoreapp3.0 as you said.

@lvmajor lvmajor linked a pull request Nov 7, 2019 that will close this issue
@lvmajor
Copy link
Author

lvmajor commented Nov 7, 2019

@gunduzemreozer Just submitted a PR that fixes the issue for me and should also do so for you. As @RickStrahl does not seem super active currently (not blaming here, just noting 😉 ). I would advise you to also pull the project locally and reference it in your app until an official fix is pulled in this repo and pushed to Nuget.

@gunduzemreozer
Copy link

@os1r1s110 thank you so much for your help :) You opened up my horizon by conditinal package include :) And also read a lot of sources for packaging. I applied your code changing and uploaded to nuget as Westwind.Globalization.AspNetCore3. I think this will not be a problem for @RickStrahl. I used nuget.org for the first time. I didn't change Author and other infos of package. I will delist package when @RickStrahl publishes a new package.

Thank you so much again.

@lvmajor
Copy link
Author

lvmajor commented Nov 9, 2019

@gunduzemreozer great to hear. I was hoping that the fix would be merged in a timely manner so I didn't take the time to publish a new fork on Nuget but its great to see someone did! I will certainly reference your package until the official one is updated. Thanks for this! I'm sure it will help others too.

On my side I wrote an email to Rick hoping he would get it as I thought maybe he didn't receive notifications for the project by Github directly, but he may be away for whatever reason and this is fine. Glad we could find a solution to the problem and provide a fix (even if temporary) for others that will certainly face the same issue 😉

twenzel added a commit to twenzel/Westwind.Globalization that referenced this issue Feb 17, 2020
@twenzel twenzel linked a pull request Feb 17, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants