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.

TargetPlatformAttribute & SupportedOSPlatformAttribute while Multi-Targeting

See original GitHub issue

When generating a project targeting framework and net5.0-<platform> the automatically generated attributes TargetPlatformAttribute and SupportedOSPlatformAttribute are not for framework such that <GenerateAssemblyInfo>true</GenerateAssemblyInfo> can’t be used.

A flag such as #14836 or another alternative while multi-targeting such that the other aspects of the automatically generated assembly info could be used would be nice.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
MrMikeJJcommented, Sep 2, 2022

@dsplaisted - i can confirm that removing the line which set AppendTargetFrameworkToOutputPath to false resolved this issue for me, @knoopr - it is worth checking your .csproj files and any Directory.Build.Props or Directory.Build.Targets for lines which manipulate the “bin” and"obj" directories.

thank you 😃 Mike

1reaction
knooprcommented, Sep 2, 2022

@MrMikeJJ Glad it worked! I left that position in late 2022 and don’t multi target anymore so can’t give it a go but trust it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support multiple .NET Framework versions in your project file
Description of the various methods to target multiple .NET Framework versions from within a single NuGet package in your project file.
Read more >
c# - How do you multi-target a .NET Core class library with ...
I will then look at the csproj file to figure out how to make that configuration happen. Multi-targeting more esoteric targets without a...
Read more >
Multi-Targeting and Porting a .NET Library to .NET Core 2.0
I've been holding off porting any of my full frameworks to .NET Core. With the latest .NET Core 2.0 and .NET Standard 2.0...
Read more >
Non-Trivial Multi-Targeting with .NET | by Brad Robinson
An elegant approach to separate out platform specific code without conditional compilation or per-platform implementation classes or interfaces ...
Read more >
Working With Multi-Target .NET Solutions - Forty Years of Code
A quick review of working with multi-targeted projects and solutions in VS2017.
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