Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Prepare uap package #15866

Merged
merged 3 commits into from
Feb 8, 2017
Merged

Prepare uap package #15866

merged 3 commits into from
Feb 8, 2017

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Feb 6, 2017

cc: @weshaggard @ericstj

These changes will move packaging assets to bin\$(TargetGroup)\pkg into bin\pkg\$(TargetGroup).
It will also mark all of the applicable libraries as UAP and will deploy them to be ready for packaging. Both folders have closure complete except for System.IO.IsolatedStorage

@@ -25,5 +25,11 @@
<FileToExclude Include="System.EnterpriseServices.Thunk" />
<FileToExclude Include="System.EnterpriseServices.Wrapper" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)'=='uap' or '$(TargetGroup)'=='uapaot'">
Copy link
Member

Choose a reason for hiding this comment

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

Does this really belong to this file? It does not sound right to have coupling between netfx and uap/uapaot.

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that we need this targeting pack in order to build the desktop and netstandard shims, which are required in order to be able to build the uap tree. We should probably consider renaming this project in order to avoid confusion.

Copy link
Member

Choose a reason for hiding this comment

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

The filtering shouldn't be done here. It should be done in the shims.proj file.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe these lines I added are required anyway, or else the depproj won't resolve those assemblies, but what we can do is that in the shims.proj we can remove them from non-uap builds.

Copy link
Member

Choose a reason for hiding this comment

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

No you shouldn't need them in this depproj any more we need to keep the set of things resolve across the different configurations consistent otherwise BuildAll will keep thrashing this directory.

Copy link
Member Author

Choose a reason for hiding this comment

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

So then you want me to add these lines to the itemgroup above and remove the condition?

Copy link
Member

Choose a reason for hiding this comment

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

No I would like you to remove this entire section in this depproj and only have the filtering in the shims.proj

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, I finally see what you mean, seems like we recently changed the default on depproj targets. I'll rebase and fix this.

@@ -31,7 +31,7 @@
<Compile Include="Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs" />
<Compile Include="System\Security\AccessControl\RegistryRights.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' AND '$(TargetsWindows)' == 'true'">
<ItemGroup Condition="('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap') AND '$(TargetsWindows)' == 'true'">
Copy link
Member

Choose a reason for hiding this comment

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

This condition should rather be:

'$(TargetGroup)' != 'netfx' and '$(TargetsWindows)' == 'true'

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree it would be cleaner, but @weshaggard suggested that we should always do inclusive conditions as opposed to exclusive, I'm fine with either.

Copy link
Member

Choose a reason for hiding this comment

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

Yes my preference is to generally be inclusive instead of exclusive but we should keep the conditions within reason. I wonder if we should set some other property in here that means TargetsCore and use that in the various places.

@@ -16,7 +16,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
Copy link
Member

Choose a reason for hiding this comment

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

This should be '$(TargetGroup)' != 'netfx'

binplace.targets Outdated
<RefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</RefPath>
<RuntimePath>$(UAPPackageRuntimePath)</RuntimePath>
</BinplaceConfiguration>
<!-- binplace targeting packs which may be different from BuildConfiguration -->
Copy link
Member

Choose a reason for hiding this comment

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

nit: indention.

binplace.targets Outdated
@@ -7,6 +7,8 @@
https://github.com/dotnet/corefx/issues/14291 is tracking cleaning this up -->
<IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(SourceDir)/$(AssemblyName)') and !Exists('$(SourceDir)/$(AssemblyName)/ref') and !$(AssemblyName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
<IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
<IsUAPRef Condition="'$(IsUAPRef)' == ''">$(IsUAP)</IsUAPRef>

Copy link
Member

Choose a reason for hiding this comment

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

nit: extra empty line.

@@ -5,6 +5,8 @@
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
<IsUAP>true</IsUAP>
Copy link
Member

Choose a reason for hiding this comment

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

What pulls in registry into the closure?

Copy link
Member Author

@joperezr joperezr Feb 6, 2017

Choose a reason for hiding this comment

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

System.Diagnostics.Process and System.Private.Xml. Implementation only, it is not required for refs.

Copy link
Member

Choose a reason for hiding this comment

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

OK we can keep it for now but I suspect this will be one of the libraries flagged once we enable the PInvoke checker.

@@ -4,5 +4,7 @@
<PropertyGroup>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
<IsUAP>true</IsUAP>
<IsUAPRef>false</IsUAPRef>
Copy link
Member

Choose a reason for hiding this comment

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

We will eventually want to revisit these IsUAPRef=false choices because we will likely just include them as refs as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

sounds good, for now I only selected the ones required to satisfy the following:

  • Support our shipped UAP package.
  • All dependencies of netstandard.dll facade.
  • Required assemblies to have a full closure (Excluding classic assembly facades)

@@ -255,8 +255,10 @@
<RuntimeProjectFile Condition="'$(RuntimeProjectFile)' == ''">$(ProjectDir)\external\runtime\runtime.depproj</RuntimeProjectFile>

<!-- Paths to binplace package content -->
<NETCoreAppPackageRefPath>$(BinDir)netcoreapp\pkg\ref</NETCoreAppPackageRefPath>
<NETCoreAppPackageRuntimePath>$(BinDir)netcoreapp\pkg\lib</NETCoreAppPackageRuntimePath>
<NETCoreAppPackageRefPath>$(BinDir)pkg\netcoreapp\ref</NETCoreAppPackageRefPath>
Copy link
Member

Choose a reason for hiding this comment

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

Should we generalize these and just call the PackageRefPath and PackageRuntimePath?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure I can do that and use $(TargetGroup) instead

Copy link
Member Author

Choose a reason for hiding this comment

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

I've been trying to address this, but I'm having problems with the binplacing logic. The reason is that today we use the Target group specific paths in the following snippet:

    <BinplaceConfiguration Condition="'$(IsNETCoreApp)' == 'true'" Include="netcoreapp-$(OSGroup)">
      <RefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</RefPath>
      <RuntimePath>$(NETCoreAppPackageRuntimePath)</RuntimePath>
    </BinplaceConfiguration>
    <BinplaceConfiguration Condition="'$(IsUAP)' == 'true'" Include="uap-$(OSGroup)">
      <RefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</RefPath>
      <RuntimePath>$(UAPPackageRuntimePath)</RuntimePath>
    </BinplaceConfiguration>

Basically the problem is that if we are building a netstandard asset, today we are binplacing it in both the uap package paths and the netcoreapp ones. If we decide to unify these paths, then we would be giving that up unless we change the logic of how we do that here.

Copy link
Member

Choose a reason for hiding this comment

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

Ok don't let this hang you up. We can look at cleaning this up later.

@@ -74,8 +74,8 @@
<!-- Copy the facades to the package ref and lib folders to be included in the packages -->
<!-- TODO: replace with BinPlacing targets -->
<ItemGroup>
<PackageOutputPaths Include="$(BinDir)$(TargetGroup)/pkg/ref" />
<PackageOutputPaths Include="$(BinDir)$(TargetGroup)/pkg/lib" />
<PackageOutputPaths Include="$(BinDir)pkg/$(TargetGroup)/ref" />
Copy link
Member

Choose a reason for hiding this comment

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

I would like to genralize the Package paths so we can share them here.

Copy link
Member Author

Choose a reason for hiding this comment

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

those are shared already, as they use $(TargetGroup) in their definition.

Copy link
Member

Choose a reason for hiding this comment

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

I realize these will be correct but I would still prefer we share a common path from dir.props here instead of maintaining the pkg output directory structure in multiple locations.

@joperezr joperezr merged commit afaaf45 into dotnet:master Feb 8, 2017
@joperezr joperezr deleted the PrepareUAPPackage branch February 8, 2017 18:39
@karelz karelz modified the milestone: 2.0.0 Feb 9, 2017
@@ -5,5 +5,6 @@
<PackageVersion>1.4.0</PackageVersion>
<AssemblyVersion>1.2.2</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
<IsUAP>true</IsUAP>
Copy link
Member

Choose a reason for hiding this comment

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

@joperezr do you know why Immutable and Reflection.Metadata needed to be pulled into the UAP platform package?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC it was because they were in the previous stable package, so we needed to have it in there for the new one as well. This was the same case for the WCF assemblies.

macrogreg pushed a commit to open-telemetry/opentelemetry-dotnet-instrumentation that referenced this pull request Sep 24, 2020
Prepare uap package

Commit migrated from dotnet/corefx@afaaf45
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Prepare uap package

Commit migrated from dotnet/corefx@afaaf45
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.

5 participants