project-system: Project properties doesn't understand how target framework and runtime identifier are appended to output path
- File -> New Console Application (.NET Core)
- Right click project and choose Properties
- Choose Build tab, in Output Path change “bin\Debug\netcoreapp2.0” to “Bar”
- Save, then close and reopen properties
EXPECTED: Output path is still “Bar” ACTUAL: Output path is “Bar\netcoreapp2.0”
Note that if the RuntimeIdentifier is set, then it will also be included in the output path.
The .NET SDK automatically appends the target framework and (if present) the runtime identifier to the output path. This can be disabled with the AppendTargetFrameworkToOutputPath and AppendRuntimeIdentifierToOutputPath properties. I’m not sure what we’d want for the behavior here. Perhaps the property page should set those properties to false if you modify the output path. Or maybe the value in the text box shouldn’t include the target framework and runtime identifier.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 3
- Comments: 31 (22 by maintainers)
Appending any version to the output path after the user has changed it to what they want should not be done. I set the output paths to what I wanted now I have visual studio changing it and appending something for .net core or .net standard. That’s not the behavior I need. We know what the version we are building is set to and we set a base path where everything needs to be. Can this please be addressed and removed as a feature.
Wait, what? NO. Big NO for anyone who is not multi-targeting by framework. I dont want to pay a price in complexity so a few others can have tfm folders setup for them automatically. The path we direct the output to needs to be where the binaries are found. (Its a direction given to the computer that should be followed and not interpreted as a suggestion). We shouldnt have to also read the target framework from the project file just to figure out where the output is for the current compilation. What a needless pain! How is the current choice the right one for the overall user base that does not multi target? I could be wrong about the muilti targeting usage, but someone will have to be armed with general user (i.e. not MSFT and probably not other tool vendor) stats.
Either detect the multi targeting and use the tfm folders and issue a build message about it, or put the checkboxes in and default them to unchecked or maybe both. The right choice was not to disrupt continuity and add complexity for the majority of the user base just to satisfy the needs of a few. I would hope that this poor decision was learned from, but the amount of justification here and elsewhere for it says we can expect more complexity for no benefit in the future.
Pulling into 15.8 to try and address this sooner.
See also 🔗 https://developercommunity.visualstudio.com/content/problem/37622/project-build-output-path.html