Skip to content

Avoid InitialTarget in libs tree for CoreLib - #65146

Merged
ViktorHofer merged 5 commits into
mainfrom
ViktorHofer-patch-1
Feb 11, 2022
Merged

Avoid InitialTarget in libs tree for CoreLib#65146
ViktorHofer merged 5 commits into
mainfrom
ViktorHofer-patch-1

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

InitialTargets are quite expensive as they run for every project invocation, even if the target invoked doesn't require the InitialTarget to run. Libraries projects only have one InitialTarget for correctly referencing CoreLib which can be changed so that it runs before RAR.

InitialTargets are quite expensive as they run for every project invocation, even if the target invoked doesn't require the InitialTarget to run. Libraries projects only have one InitialTarget for correctly referencing CoreLib which can be changed so that it runs before RAR.
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

InitialTargets are quite expensive as they run for every project invocation, even if the target invoked doesn't require the InitialTarget to run. Libraries projects only have one InitialTarget for correctly referencing CoreLib which can be changed so that it runs before RAR.

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure-libraries

Milestone:-

Comment on lines +77 to +80
<Target Name="ValidateReferenceAssemblyProjectReferences"
AfterTargets="ResolveReferences"
Condition="'$(IsReferenceAssembly)' == 'true'">
<Error Condition="'%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' and '%(ReferencePath.IsReferenceAssembly)' != 'true' and '%(ReferencePath.ReferenceAssembly)' == ''"

@ViktorHoferViktorHoferFeb 10, 2022

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

This is just updating the statement to use lowercase "AND" and putting the condition and aftertargets attributes into subsequent lines so that this is easier to read.

@ViktorHofer
ViktorHofer merged commit 5861bd9 into mainFeb 11, 2022
@ViktorHofer
ViktorHofer deleted the ViktorHofer-patch-1 branch February 11, 2022 10:33
@ghostghost locked as resolved and limited conversation to collaborators Mar 13, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ViktorHofer@safern