-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasehelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged
Milestone
Description
This is a feature request: Add a command line switch which would make MSBuild evaluate a project and output the value of a property or a list of items. No target would be called. This would be useful for scripting purposes.
Some examples of what I mean:
C:\Project> msbuild SomeProject.csproj -evaluate:'$(TargetPath)'
C:\Project\SomeProject\bin\Debug\SomeProject.exe
C:\Project> msbuild SomeProject.csproj -evaluate:'@(Compile)'
Program.cs
Foo.cs
Bar.cs
C:\Project> msbuild SomeProject.csproj -evaluate:'@(Compile->%(FileName))'
Program
Foo
Bar
Or a simpler version:
C:\Project> msbuild SomeProject.csproj -evaluateProperty:TargetPath
C:\Project\SomeProject\bin\Debug\SomeProject.exe
C:\Project> msbuild SomeProject.csproj -evaluateItems:Compile
Program.cs
Foo.cs
Bar.cs
xtmq, yatli, DoCode, ViktorHofer, svick and 9 moreTherzok, danmoseley and rcollinapaulomorgado
Metadata
Metadata
Assignees
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasehelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged