Skip to content
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

Log when a property is being assigned a new value. #1841

Merged
merged 1 commit into from
Mar 10, 2017

Conversation

KirillOsenkov
Copy link
Member

@KirillOsenkov KirillOsenkov commented Mar 9, 2017

Log a low priority message during evaluation when a property that was previously assigned is being assigned a new and different value. This is useful to determine when your property might be stomped over later.

Also adding Evaluation started and Evaluation finished messages for each project evaluation to logically isolate messages coming from the evaluation phase.

Sample log output:

Evaluation started ("C:\CodeCleanupTools\SortProjectItems\SortProjectItems.csproj")
Property reassignment: $(ProcessorArchitecture)="msil" (previous value: "AnyCPU") at C:\MSBuild\bin\Bootstrap\15.0\Bin\Microsoft.Common.CurrentVersion.targets (457,5)
Evaluation finished ("C:\CodeCleanupTools\SortProjectItems\SortProjectItems.csproj")

Log a low priority message during evaluation when a property that was previously assigned is being assigned a new and different value. This is useful to determine when your property might be stomped over later.

Also adding Evaluation started and Evaluation finished messages for each project evaluation to logically isolated messages coming from the evaluation phase.

Sample log output:

Evaluation started ("C:\CodeCleanupTools\SortProjectItems\SortProjectItems.csproj")
Property reassignment: $(ProcessorArchitecture)="msil" (previous value: "AnyCPU") at C:\MSBuild\bin\Bootstrap\15.0\Bin\Microsoft.Common.CurrentVersion.targets (457,5)
Evaluation finished ("C:\CodeCleanupTools\SortProjectItems\SortProjectItems.csproj")
Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@KirillOsenkov KirillOsenkov merged commit 21eeb45 into dotnet:xplat Mar 10, 2017
@KirillOsenkov KirillOsenkov deleted the propertyreassignment branch March 10, 2017 20:53
@jaredpar
Copy link
Member

Is this only available as a log entry or can it be made into a warning?

@KirillOsenkov
Copy link
Member Author

Just a message (I'm not familiar with how strict mode works). I'm guessing this would fire a lot even for trivial builds (just the way common targets are written).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants