mrahhal / MR.AspNetCore.Jobs

A background processing library for Asp.Net Core.
MIT License
59 stars 9 forks source link

Upgrade project to net core 6 #19

Open ralfbalzer opened 2 years ago

ralfbalzer commented 2 years ago

Hi Mohammad, have you got any plans to update the project to net core 6.0? I am using 6.0 and it is generelly working fine but I have started getting some issues with dependencies. (for example newtonsort.json.dll is on version 10 but there is now a version 13) Thanks

mrahhal commented 2 years ago

Hi. Can you tell me what kind of issue you're facing exactly with the dependencies? Is it something blocking or is there a workaround? For dependency versions (such as newtonsoft) you can usually fix the conflicts by adding the dependency (in this case version 13) in your own project. This tells it to break the conflict by using the version you specified.

I don't currently have plans to work on this so it's unlikely I can put time into updating the .net target version.

ralfbalzer commented 2 years ago

I have multiple projects in a solution. One of them uses newtonsort.json.dll version 12 (not 13 -sorry). But as MR.AspNetCore.Jobs uses verison 10, when I deploy the project, it includes version 10, therefore failing to load the assembly of verison 13 in the other project. I get around this by manually updating the DLL but it would make it easier to have everything on newer versions.

mrahhal commented 2 years ago

I feel this shouldn't happen. Can you try explicitly adding a dep to version 12 in the executable project and try it out? I think this should work.

ralfbalzer commented 2 years ago

I have tried that already in all possible ways, but the publisher always includes the wrong version :-(

mrahhal commented 2 years ago

If you can give me a link to a small repro that shows the problem I might be able to think of something. Because I tried including this in one of my .net 6 projects and the published version for newtonsoft was the latest, so I'm not able to repro your problem. Unfortunately I can't right now update this to .net 6 (or json dep) without code changes, as that would mean the latest version will stop working with older tfms.

ralfbalzer commented 2 years ago

I found this issue; [(https://github.com/dotnet/sdk/issues/3886)] Looks like this is a known issue in net core since 2019 :-(

mrahhal commented 2 years ago

Oh. Did you try running the publish command against the csproj instead of the solution to see if it solves the problem? Several people seem to be suggesting it: https://github.com/dotnet/sdk/issues/3886#issuecomment-953634904

ralfbalzer commented 2 years ago

Problem is, that the solution includes 3 projects and the MVC project (the one I try to publish), has the other two as dependencies. I will work around it for now by manually adding the correct version to the publishing.