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.

Append TargetFramework to *OutputPaths only when MultiTargeting

See original GitHub issue

Rleated issues: #844 #550 #1376 (those github found out)

For single targeting projects, we don’t need to appened the *OutputPaths properties with TargetFramework since, we are only targeting single framework. This is also the behavior of the old projects before sdks were introduced.

  1. All the large winforms and wpf projects have custom targets that rely on hard coded paths based on the defaults set by the old project files. It’ll be easy to migrate those projects if those paths were the same. 😌

  2. It’ll reduce a directory overhead in the directory tree. One less dir to navigate! 😌

We can update the targets to preserve the old behavior that only appends the TargetFramework property only when it’s multi-targeting.

I can do a PR if you guys are ok with this!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
0xd4dcommented, Jul 18, 2019

It would be a breaking change to change it now. Use the above property instead. If you have many projects you can use a Directory.Build.props file.

1reaction
livarcocccommented, Jul 24, 2019

I disagree in making this breaking change for one kind of project but not for others. I believe differences like that make reasoning about the different project types harder.

There is a property to opt-out of this behavior if someone wants to, but at that point they made that decision explicitly.

Other than that, when you are moving to .net core, this is one of the differences you will have to learn/deal with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OutputPath when using multiple TargetFrameworks
How to specify output path only for single target framework in new SDK csproj project style. My project file has this PropertyGroup:
Read more >
Stopping MSBuild appending TargetFramework to ...
If you're using the new csproj format maybe you noticed that the OutputPath has the last part automatically appended according to the framework ......
Read more >
Controlling the output path in Visual Studio 2017
If you want to disable this automatic appending, for instance you're only going to be using one target framework or you're defining a...
Read more >
Solution-level `--output` option no longer valid for build- ...
Learn about a breaking change in the .NET 7.0.200 SDK where using the `--output` option is no longer valid when using a solution...
Read more >
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 >

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