-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Investigate how to support different target frameworks (e.g. .NET 4.x vs .NET 5 / 6) #764
Comments
I am happy to work on the multi targeting. Does this mean we have to runtime detect the target fx of an assembly and then use different weaving? I do recall we built something like this in Catel (e.g. detect whether we are running full fx, .net core or netstandard). |
I would get rid of the extra I've used this technique e.g. here: However this would requires to always reference something from the |
Looking forward to support for. Net 5.0 and even. Net 6.0, the. Net 5.0 I tested today was not successful. |
We use it successfully in .NET 5. The only downside is that you need to create your own appdomainloader to load the runtime assemblies. Here you can see the implementation we use for our plugin infrastructure: |
@FreeVB Please create a separate ticket for this. This is about the technical discussion how we can / should support it. |
@GeertvanHorrik what about my suggestion? Does it sound reasonable? |
Sorry for the late reply, my hands were tied with a big release. I will try to check this tomorrow. |
No need to hurry 😄 |
I assume Costura 5.8.0-alpha0094 includes the changes introduced in #763. Is it correct? Should we revert #763 to avoid the regressions I described above before releasing a new stable version? |
I think you are correct. I'll try to put it on my list for this week to look at. |
Added back the net standard resolver. Releasing new version now. @0xced / @tom-englert , please keep this ticket updated for the new release, then we have all information in 1 place. |
@GeertvanHorrik 5.8.0-alpha0098 works |
@0xced , can you verify it's working for you as well? |
Sorry, I'm away from computer this week, so I won't be able to check before next Monday. |
No problem, we will wait, we want to make sure it all keeps working. |
@0xced I don't want to put any pressure on you, but do you have an ETA when you can test this behavior? |
About the original issue: one option could be to inject the code as source via code generator instead off merging the IL. This way references would always be correct. |
side note. i helped build this as an alternative to Costura https://blog.sentry.io/2022/02/24/alias-an-approach-to-net-assembly-conflict-resolution/ |
Copied from initial discussion here: #763
By @0xced
The
NetStandardAssemblyResolver
was introduced in #701 in order to fix #697 (System.ArgumentNullException
deep inside Cecil) and as a bonus adds support for .NET Framework 4.7 and lower.Do we really want to revert both #696 (Use the assembly resolver from the module definition) and #701? This will drop .NET Framework 4.7 and lower and we are back at the undecipherable
System.ArgumentNullException
. 🙁=====================================
By @SimonCropp
embedding and loading the net48 version of netstandard is strange. the problem is cause since Costura.Template targets netstandard2 but costura support frameworks that do no support netstandard. ie version 471 and lower of .net has known incompatibilism with netstandard2.0 that MS has no intention of fixing
https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting
IMO the correct implementation would be to have multiple targets for Costura.Template, ie one that also targets the lowest version that costura supports
So the options here are
thoughts?
The text was updated successfully, but these errors were encountered: