C
C#2y ago
DaVinki

✅ Framework targeting

A little lost on the point of targeting multiple frameworks. Why target anything higher than your lowest target? For example, why target netstandard2.1 if you're already targeting netstandard2.0? What benefits does a project get from targeting net48, netstandard2.0, netstandard2.1, netcoreapp3.1 and net6.0 all at once? What happens when all of these are targeted vs just net6.0 or just netstandard2.1?
40 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
I could target netstandard1.0 and net8.0 at the same time but what is happening when I do that?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
So it just builds the multiple versions separately in an application?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
Okay that clears up some build questions I've had in the past
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
Yes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
So with libraries, you can only write code against what's compatible between all of the targeted frameworks?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
Yes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
This though
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ero
ero2y ago
net7.0 is still STS in november
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
Why target net6.0 and net7.0 if you're targeting ns2.0 which are supported by net6.0 and net7.0
ero
ero2y ago
i don't think you should just drop support once a tfm goes out of support
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
But targeting ns2.0 wouldnt let us use the newer api
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
Oh yeah that's right for apps
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ero
ero2y ago
this is the exact reason why you target multiple tfms
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
Let the apps stay neglected
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ero
ero2y ago
i aint readin all that
DaVinki
DaVinkiOP2y ago
I see
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
i did not think about TFM as leverage but this makes sense too I will sleep on this information Thank you for your help
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
@tebeco What about the SDK you develop with while targeting lower frameworks Like using .NET 8 SDK and targeting ns2.0 or 2.1
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
.NET Standard
Learn about .NET Standard, its versions, and the .NET implementations that support it.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinkiOP2y ago
That's how I started wondering this question, by looking at libraries listed on nuget on github, and being required to target ns2.1 for some unity game mods
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server