You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documenting .NET Core MSBuild targets and properties/CSPROJ #2642
@mairaw mentioned to me on Slack that props and targets perhaps are best explained as part of a topic that addresses .NET Core-specific csproj generally ... not so much just "targets and properties" disconnected from the project file.
... to find useful/helpful props and targets. I think we all agree that that's not a good UE.
This issue addresses the need to have a clearly-visible topic for the project file that isn't migration-based, perhaps with a companion reference topic on only targets and properties in a tables format. Those could pertain to sdk, websdk, or both; but I suggest getting the websdk bits covered somewhere clearly visible in addition to merely covering the sdk ones.
cc/ @dasMulli ... Who has helped hundreds of devs with props/targets for .NET Core. I hope he'll make some observations for this issue.
Reacted by Justin Constantino, Ben Collins, Steven Moschidis, Petr Onderka, JeremyTCD, Ryan Yandle, Nirmal Guru, nopara73, Robin Sue, Kieren Johnstone and 7 more
Reacted by Joseph Musser
Reacted by Magnus Österlund, Ben Collins, Ibrahim Najjar, Kai Ruhnau, Kieren Johnstone, kt81 and Joseph Musser
There are likely at least two distinct concerns here:
Things to use for configuring properties and items that the SDK / build targets will understand.
e.g. things like CopyLocalLockFileAssemblies, RuntimeFrameworkVersion.
Things available in custom targets and when they will be available (=> knowing what to put in AfterTargets / DependsOnTargets).
e.g. OutputPath, DocumentationFile etc.
This might also include common items and which target generates them.. for example, knowing that depending on ResolvePackageDependenciesForBuild enables accessing @(PackageDefinitions) and @(PackageDependencies) items, which allowed me to create a reverse dependency list.
Reacted by Magnus Österlund, Luke Latham and Patrick Westerhoff
As part of this, the documentation for BaseIntermediateOutputPath needs to indicate that it must not be set in the body of a <Project Sdk="Microsoft.NET.Sdk">. See dotnet/sdk#1518 (comment)
Please also document all properties that have special meaning for the compiler etc.
I was bitten by setting an Instrument property, which apparently triggers the use of an undocumented C# compiler option (at least it's not listed here).
I'm not sure it makes sense to impact the user namespace like that; such flags could/should be named something like CscInstrument/C#.Instrument/Csc:Instrument.
From @proog:
"The csproj reference topic lists the two main SDKs that can be specified in the Sdk attribute of a element.
While it does have a vague mention of the SDK being a "set of tasks and targets," it does not explain which, and perhaps more importantly does not explain what the consequences of choosing one over the other is.
In my opinion it would be helpful to have a paragraph dedicated to choosing the right SDK, or a reference to a more in-depth explanation of their differences."
Add info about the degree to which the .NET Core SDK supports existing project files (not SDK style).
I believe the communication from the SDK/CLI team over the years was along the lines of "not officially supported, it may work for you and only you".
Would be good to have that somewhere as some GH issues have been raised in the past, especially during 1.0-2.0 time (not sure if there were many recently).
Activity
BillWagner commentedon Jul 17, 2017
Related to this topic we should provide guidance for how to configure client side builds (npm, grunt, gulp tasks) for CI builds.
dasMulli commentedon Jul 31, 2017
There are likely at least two distinct concerns here:
e.g. things like
CopyLocalLockFileAssemblies,RuntimeFrameworkVersion.AfterTargets/DependsOnTargets).e.g.
OutputPath,DocumentationFileetc.This might also include common items and which target generates them.. for example, knowing that depending on
ResolvePackageDependenciesForBuildenables accessing@(PackageDefinitions)and@(PackageDependencies)items, which allowed me to create a reverse dependency list.nguerrera commentedon Aug 31, 2017
As part of this, the documentation for BaseIntermediateOutputPath needs to indicate that it must not be set in the body of a
<Project Sdk="Microsoft.NET.Sdk">. See dotnet/sdk#1518 (comment)guardrex commentedon Sep 13, 2017
Cross ref (might be good to include something on <RunWorkingDirectory>): https://github.com/aspnet/websdk/issues/238
dougbu commentedon Oct 23, 2017
Please include information about breaking changes affecting project files after migration from the "old style". Hit the breaking change described at https://github.com/dotnet/project-system/blob/master/docs/configurations.md over the weekend and didn't find that page 'til @natemcmaster told me about it. Need something better than tribal knowledge here…
Zastai commentedon Jan 12, 2018
Please also document all properties that have special meaning for the compiler etc.
I was bitten by setting an Instrument property, which apparently triggers the use of an undocumented C# compiler option (at least it's not listed here).
I'm not sure it makes sense to impact the user namespace like that; such flags could/should be named something like CscInstrument/C#.Instrument/Csc:Instrument.
mairaw commentedon Jan 22, 2018
From @proog:
"The csproj reference topic lists the two main SDKs that can be specified in the Sdk attribute of a element.
While it does have a vague mention of the SDK being a "set of tasks and targets," it does not explain which, and perhaps more importantly does not explain what the consequences of choosing one over the other is.
In my opinion it would be helpful to have a paragraph dedicated to choosing the right SDK, or a reference to a more in-depth explanation of their differences."
66 remaining items
mairaw commentedon Jan 6, 2020
Assigning this to @gewarren. Feel free to break this task into smaller issues if it helps or schedule a meeting for us to go over the details.
ghogen commentedon Jan 24, 2020
As of Jan 2020, I own MSBuild docs, so I will be looking at similar issues in the coming weeks. @gewarren
gewarren commentedon Apr 25, 2020
Add info about the degree to which the .NET Core SDK supports existing project files (not SDK style).
dasMulli commentedon Apr 27, 2020
I believe the communication from the SDK/CLI team over the years was along the lines of "not officially supported, it may work for you and only you".
Would be good to have that somewhere as some GH issues have been raised in the past, especially during 1.0-2.0 time (not sure if there were many recently).
gewarren commentedon Apr 30, 2020
I've created manageable chunk issues to track the remaining work on https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props. Closing this one out.