C
C#14mo 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 User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
I could target netstandard1.0 and net8.0 at the same time but what is happening when I do that?
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
So it just builds the multiple versions separately in an application?
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
Okay that clears up some build questions I've had in the past
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
Yes
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
So with libraries, you can only write code against what's compatible between all of the targeted frameworks?
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
Yes
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
This though
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
ero
ero14mo ago
net7.0 is still STS in november
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
Why target net6.0 and net7.0 if you're targeting ns2.0 which are supported by net6.0 and net7.0
ero
ero14mo ago
i don't think you should just drop support once a tfm goes out of support
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
But targeting ns2.0 wouldnt let us use the newer api
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
Oh yeah that's right for apps
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
ero
ero14mo ago
this is the exact reason why you target multiple tfms
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
Let the apps stay neglected
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
ero
ero14mo ago
i aint readin all that
DaVinki
DaVinki14mo ago
I see
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo 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 User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo 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 User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo ago
.NET Standard
Learn about .NET Standard, its versions, and the .NET implementations that support it.
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
DaVinki
DaVinki14mo 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 User14mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord14mo 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
More Posts