❔ 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
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
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?
Is there a reason you don't migrate it to something newer like .NET 6?
it's for an assignment we're doing, I already had Visual Studio 2022 so I thought I could just use that instead
Just make it .NET 6. I doubt your assignment actually requires it to be 3.0 for some reason?
yeah it's probably fine
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
I see. Thanks for letting me know!
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.