-
Notifications
You must be signed in to change notification settings - Fork 91
Set DebugType and DebugSymbols after SDK import #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Not that my review matters, but i've noticed this quite a while ago and forgot to pass this on. |
|
I'm conflicted on this change. On one hand, this SDK should be a good citizen and not override properties that are already declared. On the other hand, the SDK is known to not emit symbols and so it might as well create a pit of success. If everyone's What's everyone's thoughts? |
Right. Neither Arcade nor dotnet/runtime nor any other repository that I know of, thinks about this SDK when writing property conditions.
I understand your concern. This SDK already intentionally overwrites properties, mostly in targets files. As another example, the Traversal SDK overwrites tons of targets that are set by the MSBuild's common logic. I don't think that the NoTargets SDK can continue to exist without overwriting properties / targets set by the Microsoft.NET.Sdk or MSBuild's common files. I would even go as far as suggest to move these two properties into the SDK's targets file so that props or project level settings are intentionally overwritten. |
|
Okay I agree, the feature of emitting symbols for a NoTarget is already disabled in other ways MSBuildSdks/src/NoTargets/Sdk/Sdk.targets Line 44 in 0167add
And there's precedence for setting properties and not letting them be set by the user MSBuildSdks/src/NoTargets/Sdk/Sdk.targets Line 33 in 0167add
I'm going to update your branch to move the properties to |
It's fairly common for repositories to set a default DebugType and/or DebugSymbols setting in their Directory.Build.props file. As an example, Arcade does that which impacts every repository in the .NET stack. The NoTargets SDK should overwrite these default settings (including the Microsoft.NET.Sdk setting) as the project clearly doesn't produce a symbol. Setting in the props file to allow a project to overwrite the setting if it explicitly wants to do so.
jeffkl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ViktorHofer!
It's fairly common for repositories to set a default DebugType and/or DebugSymbols setting in their Directory.Build.props file. As an example, Arcade does that which impacts every repository in the .NET stack. The NoTargets SDK should overwrite these default settings (including the Microsoft.NET.Sdk setting) as the project clearly doesn't produce a symbol. Setting in the props file to allow a project to overwrite the setting if it explicitly wants to do so.