question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Should it be `NETCOREAPP5_0` or `NET5_0`?

See original GitHub issue

With the release of .NET 5 preview 3, the TFM has changed from netcoreapp5.0 to net5.0. However, the Define Constant for the TFM is still NETCOREAPP5_0 rather than NET5_0.

Is this intentional (e.g. for back-compat), something that hasn’t been done yet but is planned, or a bug because it should have been done as part of preview 3 and missed?

Sorry if this is the wrong repo, I wasn’t sure if this was an SDK thing or a compiler thing. I had a look in runtime, sdk and roslyn and couldn’t seem to find anything about this topic.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dsplaistedcommented, May 28, 2020

It will be NET5_0, with NETCOREAPP still defined for backwards compatibility. The spec for this is here: https://github.com/dotnet/designs/blob/master/accepted/2020/net5/net5.md#preprocessor-symbols

We have a PR in progress for it here: https://github.com/dotnet/sdk/pull/11635

0reactions
martincostellocommented, Jul 21, 2020

Looks like the change from NETCOREAPP5_0 to NET5_0 happened in preview 7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When TargetFramework=net5.0-windows, dotnet pack ...
If you look at your error more closely, it says, net50-windows7.0 is .NET Framework, which is how SDKs older than 5.0.100 would interpret...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found