Change target frameworks to fix warnings and allow updating dependencies#4624
Merged
Morilli merged 3 commits intoTASEmulators:masterfrom Feb 18, 2026
Merged
Conversation
Referencing net framework projects from a netstandard project is technically possible, but generates NU1702 and might fail on runtime. There is no advantage to target netstandard when it causes issues without offering any advantage, so don't.
now possible without warnings
Member
|
I think the only thing that having main solution libs target |
Collaborator
Author
|
Are there any relevant apis that only apply to net framework and not .NET (core)? If there are it's probably fine to disallow them, I'm not against using netstandard in places where it doesn't result in issues. |
Contributor
|
Looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
BizHawk.BizInvoketarget netframework 4.8 because it uses certain APIs that aren't available under netstandard2.0. Other projects depending onBizHawk.BizInvoketarget netstandard2.0 though, which generates NU1702, which is currently suppressed.If we want to update
System.Memory(which is required at least for other dependencies), we start getting tons ofMSB3277warnings because the framework version of theSystem.Memorydll has a higher assembly version than the netstandard one, resulting in unresolvable conflicts on build. Those are of course not fatal because the API surface is the same, so it could probably also be ignored.However, considering that we're getting warnings that need to be suppressed simply because we're doing questionable things with target framework and dependencies I'd argue adjusting the
TargetFrameworkproperty is the more correct resolution here, unless someone can convince me that targeting netstandard instead of net framework has any advantages.