-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add additional net6.0 target framework #515
Conversation
This gives the compiler additional changes to apply optimizations
if (prevFunc is not null || prevFunc.Address != address) | ||
if (prevFunc is not null && prevFunc.Address != address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this was an unintentional mixup of the ||
and &&
operators which would result in right-hand side being executed only if prevFunc
was null
causing an NRE. If I'm wrong feel free to correct me.
[HandleProcessCorruptedStateExceptions, SecurityCritical] // Req'd on .NET Framework 4.0 | ||
// Required attributes on .NET Framework 4.0 | ||
// HandleProcessCorruptedStateExceptions is obsolete on .NET Core and newer | ||
#if !NETCOREAPP | ||
[HandleProcessCorruptedStateExceptions] | ||
#endif | ||
[SecurityCritical] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone ahead and used conditional compilation here to exclude the HandleProcessCorruptedStateExceptions
attribute as it is marked with Obsolete
and the obsolescence message claims this attribute is ignored by the runtime. I have not verified this behavior. An alternative could be to use #pragma
directive to disable the obsolescence warning and still include the attribute in the compiled code just in case it does actually make a difference.
Thanks! |
Fixes #514
This PR adds support
net6.0
target fordnlib
. The rationale for this change was discussed in the aforementioned issue and updates the NuGet packages used bydnlib
to the latest available versions.I've also gone ahead and replaced most of the usages of string concatenation and replaced it with string interpolation. This allows Roslyn to better take advantage of the faster string API's available in .NET 6. Some code changes were also necessary to resolve warnings regarding obsolete members and platform compatibility of the unmanaged Windows PDB support. A few NRE's which were picked up by code analysis were also fixed!