Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding missing Configurations.props for refs and fixing the existing ones#15291

Merged
joperezr merged 5 commits intodotnet:masterfrom
joperezr:AddMissingConfigsForRefs
Jan 20, 2017
Merged

Adding missing Configurations.props for refs and fixing the existing ones#15291
joperezr merged 5 commits intodotnet:masterfrom
joperezr:AddMissingConfigsForRefs

Conversation

@joperezr
Copy link
Copy Markdown
Member

cc: @ericstj @tarekgh @weshaggard
FYI: @chcosta

  • Fixing the few Configurations.props we have for refs to remove their claimed netstandard config.
  • Adding uap configuration to all refs.
  • Adding configuration file to refs that didn't have one already.
  • Fixed uap logic on targetGroups in order to select the right imports.

@joperezr
Copy link
Copy Markdown
Member Author

@tarekgh With these changes, building src\ref.builds with /p:TargetGroup=netfx will skip all of the reference assemblies. build.cmd -framework:netfx will not work yet, because it still will try to build some configurations of src\src.builds and have a bunch of issues.

@joperezr
Copy link
Copy Markdown
Member Author

@weshaggard let me know if these changes are more or less what you had in mind, and if so I'll go ahead and start working on adding the right configurations to the implementation projects.

@tarekgh
Copy link
Copy Markdown
Member

tarekgh commented Jan 18, 2017

LGTM

<BuildConfigurations>
netstandard;
netcoreapp;
uap;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

With these we should also clean out the netcoreapp #ifdef's from the project and source files.

@weshaggard
Copy link
Copy Markdown
Member

Yes this is along the lines of what I was expecting. You should also go through and clean out the #ifdefs.

@ericstj should we add a default define for each configuration so it is present for each build config automatically?

@joperezr
Copy link
Copy Markdown
Member Author

You should also go through and clean out the #ifdefs.

Done with 904aa39

Comment thread binplace.targets Outdated
<TargetingPackDir Include="$(RefPath)" />
<TargetingPackDir Condition="'$(IsNETCoreAppRef)' == 'true'" Include="$(BinDir)netcoreapp\pkg\ref" />
</ItemGroup>
<ItemGroup Condition="'$(NuGetTargetMoniker)' == '' Or $(NuGetTargetMoniker.Contains('UAP'))">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just to clarify, if '$(NuGetTargetMoniker)' == '', then the TargetingPackDir includes both $(RefPath) and $(RefRootPath)uap/?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RefPath should already be set to $(RefRootPath)uap so we shouldn't need to add this. Also this is going to cause issues for tests which blindly take *.dll from all the TargetingPackDir's

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

'$(NuGetTargetMoniker)' == '' part of the condition was actually copy/pasted by mistake, the only condition that should be there is the UAP one. @weshaggard RefPath is not set to UAP since in dir.props it gets initialized to netcoreapp, so perhaps the change has to go there instead. I'll remove this small change on the file and try to figure out a better way to calculate this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah yes I forget we hardcoded that. We do need to move to a place where we compute that variable based on the BuildConfiguration.

Copy link
Copy Markdown
Member

@ericstj ericstj Jan 19, 2017

Choose a reason for hiding this comment

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

BuildConfiguration or Configuration? I'd imagine that it should be based off of Configuration, in which case it can just be a derived property in the data model.

Copy link
Copy Markdown
Member

@weshaggard weshaggard Jan 19, 2017

Choose a reason for hiding this comment

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

No this one should be based on BuildConfiguration, as we want to consistently create the targeting pack folders per BuildConfiguration. Similar to the runtime folders.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that's broken. Consider I build a project with only a netstandard configuration for both BuildConfiguration netcoreapp and uap: separate vertical builds on same machine. It will reuse the same intermediate/bin directories (per design) but with different refs we'll potentially have different assemblies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure I follow. It will be the same assembly just loaded from a different ref directory. The entire idea is that we want an easy reference resolution from flat targeting pack for each vertical BuildConfiguration and not have to try and add a bunch of logic to pick the correct reference for every library. We aren't in the contract store or nuget resolution world when we build a vertical. To resolve a Reference you are only looking in one targeting pack directory.

<PropertyGroup>
<BuildConfigurations>
netcoreapp;
uap;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this one is supported on UAP.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I believe it is, by looking at some pre-dev/eng packages it seems to have a netstandard1.3 reference assembly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixed.

<PropertyGroup>
<BuildConfigurations>
netcoreapp;
uap;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Supported on UAP?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you think our best way to figure out uap support?

Copy link
Copy Markdown
Member

@ericstj ericstj Jan 19, 2017

Choose a reason for hiding this comment

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

Look at existing pkgproj, or package reports from pre-dev/eng build.

<BuildConfigurations>
netcoreapp;
netstandard1.0;
<!-- portable_net40+sl4+win8+wp8-Windows_NT; Looks like our filtering mechanism doesn't understand this targetgroup. Do we even need it? -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes we need it. Please add to data model.

<PropertyGroup>
<BuildConfigurations>
netcoreapp;
netstandard1.0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to preserve the older configs of this one. It'll ship a package.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

... And on desktop I'd expect it to build the netstandard1.0 config.

<TargetingPackReference Include="System.Core" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<ItemGroup>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't remove this, update the condition.

<Imports>netcore50aot</Imports>
<CompatibleWith>netstandard2.0</CompatibleWith>
</TargetGroups>
<TargetGroups Include="uap">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also add a uapaot?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably and we are going to need some corert variants as well.

@joperezr joperezr force-pushed the AddMissingConfigsForRefs branch from 904aa39 to 1c4b28c Compare January 19, 2017 21:58
@joperezr
Copy link
Copy Markdown
Member Author

@weshaggard @ericstj I've addressed the feedback and removed the uap configurations for the projects where we didn't support uwp previously. Also, I've added Eric's new logic for calculating RefPath based on the original TargetGroup

@joperezr joperezr merged commit 2847e0e into dotnet:master Jan 20, 2017
@joperezr joperezr deleted the AddMissingConfigsForRefs branch January 20, 2017 00:38
<BuildConfigurations>
netcoreapp;
uap;
;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this one intentionally empty?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes. We haven't really added anything to these DirectoryServices assemblies yet, so it makes no sense to have them building on any framework. Plus, the code on the implementation side that we do have doesn't compile yet, so build is disabled there as well.

@karelz karelz modified the milestone: 2.0.0 Jan 21, 2017
macrogreg pushed a commit to open-telemetry/opentelemetry-dotnet-instrumentation that referenced this pull request Sep 24, 2020
…ones (dotnet/corefx#15291)

Adding missing Configurations.props for refs and fixing the existing ones

Commit migrated from dotnet/corefx@2847e0e
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…ones (dotnet/corefx#15291)

Adding missing Configurations.props for refs and fixing the existing ones

Commit migrated from dotnet/corefx@2847e0e
Sign up for free to 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.

6 participants