❔ Will there be issues if the target framework moniker is less than my .NET version installed?

Total scrub here, please correct if I say anything wrong. I've got Visual Studio installed with .NET 6, will there be any issues if the csprojec file I'm working has the following TargetFramework? <TargetFramework>netcoreapp3.0</TargetFramework> From what I've heard, .NET is backwards compatible so there should be any issues even if I only have.NET 6 installed right? And I'm assuming that I just need to be wary not to use any features from above .NET Core 3.0 or will Visual Studio warn me correct?
9 Replies
reflectronic
reflectronic2y ago
it will download the reference assemblies for .NET Core 3.0 and the SDK generally does not do breaking changes for old target frameworks so it will work fine even on a new SDK you will probably get warnings about using a target framework that isn’t supported anymore, though
TradingRaws4SeoulObjectStoryRaws
oh, so if I build the project but the compiler(?) sees that I have not installed .NET Core 3.0, then it'll download the assemblies for me?
mtreit
mtreit2y ago
Is there a reason you don't migrate it to something newer like .NET 6?
TradingRaws4SeoulObjectStoryRaws
it's for an assignment we're doing, I already had Visual Studio 2022 so I thought I could just use that instead
mtreit
mtreit2y ago
Just make it .NET 6. I doubt your assignment actually requires it to be 3.0 for some reason?
TradingRaws4SeoulObjectStoryRaws
yeah it's probably fine
reflectronic
reflectronic2y ago
to be clear, if you don’t have .NET Core 3.0 runtime installed, you won’t be able to run it, even if you can build it
TradingRaws4SeoulObjectStoryRaws
I see. Thanks for letting me know!
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