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

Commit

Permalink
Remove UAP target (#41759)
Browse files Browse the repository at this point in the history
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp
  • Loading branch information
ViktorHofer authored Oct 17, 2019
1 parent f9233ab commit 3b6ec2b
Show file tree
Hide file tree
Showing 1,437 changed files with 5,222 additions and 13,507 deletions.
28 changes: 0 additions & 28 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
<IsSourceProject>$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))</IsSourceProject>
</PropertyGroup>

<!-- Define vNext UAP Moniker -->
<PropertyGroup>
<UAPvNextVersion>10.0.16300</UAPvNextVersion>
<UAPvNextTFI>UAP</UAPvNextTFI>
<UAPvNextTFMFull>$(UAPvNextTFI),Version=v$(UAPvNextVersion)</UAPvNextTFMFull>
<UAPvNextTFM>uap$(UAPvNextVersion)</UAPvNextTFM>
</PropertyGroup>

<!-- Import configuration data model -->
<Import Project="$(RepositoryEngineeringDir)configurations/properties.props" />

Expand Down Expand Up @@ -148,16 +140,13 @@

<_packageRID />
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
<_packageRID Condition="$(TargetGroup.StartsWith('uap'))">win10-$(ArchGroup)</_packageRID>
<_packageRID Condition="$(TargetGroup.EndsWith('aot'))">$(_packageRID)-aot</_packageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(_packageRID)</PackageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(RuntimeOS)-$(ArchGroup)</PackageRID>
</PropertyGroup>

<!-- Set some shortcuts for more terse conditions in project files -->
<PropertyGroup>
<TargetsNetCoreApp Condition="$(TargetFramework.StartsWith('netcoreapp'))">true</TargetsNetCoreApp>
<TargetsUap Condition="$(TargetFramework.StartsWith('uap'))">true</TargetsUap>
<TargetsNetStandard Condition="$(TargetFramework.StartsWith('netstandard'))">true</TargetsNetStandard>
<TargetsNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</TargetsNetFx>
</PropertyGroup>
Expand All @@ -166,7 +155,6 @@
<PropertyGroup>
<BuildingNETCoreAppVertical Condition="'$(BuildingNETCoreAppVertical)' == '' AND ('$(_bc_TargetGroup)'=='netcoreapp' OR '$(BuildAllConfigurations)' == 'true')">true</BuildingNETCoreAppVertical>
<BuildingNETFxVertical Condition="'$(BuildingNETFxVertical)' == '' AND ('$(_bc_TargetGroup)'=='netfx' OR '$(BuildAllConfigurations)' == 'true')">true</BuildingNETFxVertical>
<BuildingUAPVertical Condition="'$(BuildingUAPVertical)' == '' AND ('$(_bc_TargetGroup)'=='uap' OR '$(BuildAllConfigurations)' == 'true')">true</BuildingUAPVertical>
</PropertyGroup>

<!--
Expand Down Expand Up @@ -301,8 +289,6 @@
<!-- Paths to binplace package content -->
<NETCoreAppPackageRefPath>$(ArtifactsBinDir)pkg\netcoreapp\ref</NETCoreAppPackageRefPath>
<NETCoreAppPackageRuntimePath>$(ArtifactsBinDir)pkg\netcoreapp\lib</NETCoreAppPackageRuntimePath>
<UAPPackageRefPath>$(ArtifactsBinDir)pkg\uap\ref</UAPPackageRefPath>
<UAPPackageRuntimePath>$(ArtifactsBinDir)pkg\uap\lib</UAPPackageRuntimePath>
<NetFxPackageRefPath>$(ArtifactsBinDir)pkg\netfx\ref</NetFxPackageRefPath>
<NetFxPackageRuntimePath>$(ArtifactsBinDir)pkg\netfx\lib</NetFxPackageRuntimePath>

Expand All @@ -317,15 +303,11 @@
<PropertyGroup Condition="'$(BuildAllConfigurations)' != 'true'">
<!-- We add extra binplacing for the test shared framework until we can get hardlinking with the runtime directory working on all platforms -->
<BinPlaceTestSharedFramework Condition="'$(_bc_TargetGroup)' == 'netcoreapp'">true</BinPlaceTestSharedFramework>
<BinPlaceUAPFramework Condition="'$(_bc_TargetGroup)' == 'uap'">true</BinPlaceUAPFramework>
<BinPlaceNETFXRuntime Condition="'$(_bc_TargetGroup)' == 'netfx'">true</BinPlaceNETFXRuntime>

<NETCoreAppTestSharedFrameworkPath>$([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'shared', 'Microsoft.NETCore.App', '$(ProductVersion)'))</NETCoreAppTestSharedFrameworkPath>
<!-- For UAP, we'll produce the layout and hard-link this into each test's directory -->
<UAPTestSharedFrameworkPath>$([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'UAPLayout'))</UAPTestSharedFrameworkPath>

<TestHostRuntimePath Condition="'$(BinPlaceTestSharedFramework)' == 'true'">$(NETCoreAppTestSharedFrameworkPath)</TestHostRuntimePath>
<TestHostRuntimePath Condition="'$(BinPlaceUAPFramework)' == 'true'">$(UAPTestSharedFrameworkPath)</TestHostRuntimePath>
<TestHostRuntimePath Condition="'$(BinPlaceNETFXRuntime)' == 'true'">$(TestHostRootPath)</TestHostRuntimePath>

<PlatformManifestFile>$(TestHostRuntimePath)PlatformManifest.txt</PlatformManifestFile>
Expand All @@ -335,16 +317,6 @@
<PackageConflictPlatformManifests Include="$(PlatformManifestFile)" />
</ItemGroup>

<!-- AOT only asset that we currently don't support. -->
<ItemGroup>
<ProjectExclusions Include="$(SourceDir)System.Private.Reflection.Metadata.Ecma335/**/*.csproj" />
</ItemGroup>

<!-- Specify the default constants -->
<PropertyGroup>
<DefineConstants Condition="'$(TargetsUap)' == 'true'">$(DefineConstants),uap</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<!-- F5 and debugging support for netcoreapp and netfx inside VS. -->
<EnableLaunchSettings Condition="'$(EnableLaunchSettings)' == '' and '$(DotNetBuildFromSource)' != 'true'">true</EnableLaunchSettings>
Expand Down
10 changes: 1 addition & 9 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
<BinPlaceConfiguration Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
<RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath>
</BinPlaceConfiguration>
<!-- And the UAP folder for the F5 (CoreCLR UAP-debugging) scenario -->
<BinPlaceConfiguration Condition="'$(BinPlaceUAPFramework)' == 'true'" Include="uap-Windows_NT">
<RuntimePath>$(UAPTestSharedFrameworkPath)</RuntimePath>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(BinPlaceNETFXRuntime)' == 'true'" Include="netfx-Windows_NT">
<RuntimePath>$(TestHostRootPath)</RuntimePath>
</BinPlaceConfiguration>
Expand All @@ -83,16 +79,12 @@
<BinPlaceConfiguration Condition="'$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp2.0">
<RefPath>$(RefRootPath)netcoreapp2.0/</RefPath>
</BinPlaceConfiguration>
<!-- some libraries that produce packages will remain targeting uap10.0.16299 -->
<BinPlaceConfiguration Condition="'$(BuildingUAPVertical)' == 'true'" Include="uap10.0.16299">
<RefPath>$(RefRootPath)uap10.0.16299/</RefPath>
</BinPlaceConfiguration>
<!-- for BuildAllConfigurations make sure all refpaths are created. -->
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'" Include="@(TargetGroups)">
<RefPath>$(RefRootPath)%(Identity)/</RefPath>
</BinPlaceConfiguration>
<!-- for BuildAllConfigurations make sure runtimepaths are created for all vertical targetgroups. -->
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp-$(_bc_OSGroup);uap-Windows_NT">
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
<RuntimePath>$(ArtifactsBinDir)runtime/%(Identity)-$(ConfigurationGroup)-$(ArchGroup)</RuntimePath>
</BinPlaceConfiguration>

Expand Down
2 changes: 1 addition & 1 deletion Documentation/coding-guidelines/adding-api-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ the implementation without compat concerns in future releases.

**Update pkg**
- If changing the target framework
- Update `SupportedFramework` metadata on the ref ProjectReference to declare the set of concrete platforms you expect your library to support. (see [Specific platform mappings](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md#nuget)). Generally will be a combination of netcoreapp2.x, netfx46x, uap10.x, and/or `$(AllXamarinFrameworks)`.
- Update `SupportedFramework` metadata on the ref ProjectReference to declare the set of concrete platforms you expect your library to support. (see [Specific platform mappings](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md#nuget)). Generally will be a combination of netcoreapp2.x, netfx46x, and/or `$(AllXamarinFrameworks)`.
- If assembly or package version is updated the package index needs to be updated by running
`dotnet msbuild <Library>/pkg/<Library>.pkgproj /t:UpdatePackageIndex`

Expand Down
16 changes: 1 addition & 15 deletions Documentation/coding-guidelines/netstandard20-corefx-infra.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,5 @@ Provides compatibility between NETCore.App and libraries built against NETStanda
### End goal

- CoreFx does not build any reference assemblies for NETStandard.
- For every library in NETStandard.Library, the only configurations in CoreFx are framework-specific. EG: NETCoreApp1.2, UAP10.1
- For every library in NETStandard.Library, the only configurations in CoreFx are framework-specific. EG: netcoreapp3.0, net472
- For every library in NETCore.App but not in NETStandard.Library there must be a framework-specific configuration for NETCoreApp1.2. Other configurations may exist to ship in a package, but those will not be built by folks building just NETCore.App.

### Getting there (WIP)

Folks still consume our current packages so we need to keep building those until we transition.

1. Create a new NETCore.App package: Microsoft.Private.CoreFx.NETCore.App. This will be an identity package with every ref that targets NETCore.App and runtime-specific packages that have all runtime impl's that apply to NETCore.App.
2. Filter the content of Microsoft.Private.CoreFx.NETCore.App to just the things that are part of NETCore, and their closure.
3. Transition tests to use Microsoft.Private.CoreFx.NETCore.App.
4. Delete packages for things that are only part of Microsoft.Private.CoreFx.NETCore.App and don't ship independently.
- Delete configurations for libraries that are no longer used
- As packages are deleted we'll need to opt-in to Microsoft.Private.CoreFx.NETCore.App in some way.
- proposal:
- each CSProj is evaluated for layout path in the context of all of its build configurations.
- We'll determine applicability similar to how we do for pkgprojs to identify which config to binplace.
15 changes: 5 additions & 10 deletions Documentation/coding-guidelines/project-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ once before you can iterate and work on a given library project.

## Behind the scenes with build.cmd/sh

- Setup tools (currently done in init-tools but will later be a boot-strap script in run.cmd/sh)
- Setup tools (currently done in restore in build.cmd/sh)
- Restore external dependencies
- CoreCLR - Copy to `bin\runtime\$(BuildConfiguration)`
- Netstandard Library - Copy to `bin\ref\netstandard`
- UAP - Copy to `bin\runtime\$(BuildConfiguration)`
- NetFx targeting pack - Copy to `bin\ref\netfx`
- Build targeting pack
- Build src\ref.builds which builds all references assembly projects. For reference assembly project information see [ref](#ref)
- Build product
- Build src\src.builds which builds all the source library projects. For source library project information see [src](#src).
- Sign product
- Build src\sign.proj
//**CONSIDER**: We should make this as part of the src.builds file instead of a separate project file.

## Behind the scenes with build-test.cmd/sh
- build-test.cmd cannot be ran successfully until build.cmd has been ran at least once for a `BuildConfiguration`.
Expand All @@ -30,7 +28,7 @@ once before you can iterate and work on a given library project.
# Build Pivots
Below is a list of all the various options we pivot the project builds on:

- **Target Frameworks:** NetFx (aka Desktop), netstandard (aka dotnet/Portable), NETCoreApp (aka .NET Core), UAP (aka UWP/Store/netcore50)
- **Target Frameworks:** NetFx (aka Desktop), netstandard (aka dotnet/Portable), NETCoreApp (aka .NET Core)
- **Platform Runtimes:** NetFx (aka CLR/Desktop), CoreCLR, Mono
- **OS:** Windows_NT, Linux, OSX, FreeBSD, AnyOS
- **Flavor:** Debug, Release
Expand All @@ -39,7 +37,7 @@ Below is a list of all the various options we pivot the project builds on:
## Individual build properties
The following are the properties associated with each build pivot

- `$(TargetGroup) -> netstandard | netcoreapp | netfx | uap`
- `$(TargetGroup) -> netstandard | netcoreapp | netfx`
//**CONSIDER**: naming netcoreappcorert something shorter maybe just corert.
- `$(OSGroup) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]`
- `$(ConfigurationGroup) -> Release | [defaults to Debug when empty]`
Expand Down Expand Up @@ -82,7 +80,6 @@ All supported targets with unique windows/unix build for netcoreapp:
netcoreapp-Windows_NT;
netcoreapp-Unix;
netfx-Windows_NT;
uap-Windows_NT;
</BuildConfigurations>
<PropertyGroup>
```
Expand Down Expand Up @@ -125,15 +122,14 @@ Temporary versions are at https://github.com/dotnet/corefx/blob/dev/eng/src/Tool
## Supported full build configurations
- .NET Core latest on current OS (default) -> `netcoreapp-[RunningOS]`
- .NET Framework latest -> `netfx-Windows_NT`
- UAP F5 -> `uap-Windows_NT`

## Project configurations for VS
For each unique configuration needed for a given library project a configuration entry separated by a ';' should be added to the project so it can be selected and built in VS and also clearly identify the various configurations.<BR/>

`$(TargetGroup)-$(OSGroup)-$(ConfigurationGroup)|$(Platform`
- Note that the majority of managed projects, currently all in corefx, $(Platform) is overridden to be AnyCPU.

`<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>`
`<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>`

####*Examples*
Project configurations with a unique implementation on Unix and Windows
Expand All @@ -142,7 +138,7 @@ Project configurations with a unique implementation on Unix and Windows
```
Project configurations that are unique for a few different target frameworks and runtimes
```xml
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
```

## Updating Configurations
Expand Down Expand Up @@ -246,7 +242,6 @@ Each source file should use the following guidelines
- `.CoreCLR.cs` - implementation specific to CoreCLR runtime
- `.Win32.cs` - implementation based on [Win32](https://en.wikipedia.org/wiki/Windows_API)
- `.WinRT.cs` - implementation based on [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime)
- `.Uap.cs` - implementation specific to UAP, also known as [UWP](https://en.wikipedia.org/wiki/Universal_Windows_Platform)

## Define naming convention
As mentioned in [Conventions for forked code](conventions-for-forked-code) `#ifdef`ing the code is the last resort as it makes code harder to maintain overtime. If we do need to use `#ifdef`'s we should use the following conventions:
Expand Down
19 changes: 1 addition & 18 deletions Documentation/project-docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Calling the script `build` attempts to build both the native and managed code.

The build configurations are generally defaulted based on where you are building (i.e. which OS or which architecture) but we have a few shortcuts for the individual properties that can be passed to the build scripts:

- `-framework|-f` identifies the target framework for the build. It defaults to `netcoreapp` but possible values include `netcoreapp`, `netfx` or `uap`. (msbuild property `TargetGroup`)
- `-framework|-f` identifies the target framework for the build. It defaults to `netcoreapp` but possible values include `netcoreapp` or `netfx`. (msbuild property `TargetGroup`)
- `-os` identifies the OS for the build. It defaults to the OS you are running on but possible values include `Windows_NT`, `Unix`, `Linux`, or `OSX`. (msbuild property `OSGroup`)
- `-configuration|-c Debug|Release` controls the optimization level the compilers use for the build. It defaults to `Debug`. (msbuild property `ConfigurationGroup`)
- `-arch` identifies the architecture for the build. It defaults to `x64` but possible values include `x64`, `x86`, `arm`, or `arm64`. (msbuild property `ArchGroup`)
Expand Down Expand Up @@ -63,7 +63,6 @@ build -restore -build -buildtests -test
```
build -framework netcoreapp
build -framework netfx
build -framework uap
```

- Build only managed components and skip the native build
Expand Down Expand Up @@ -174,11 +173,6 @@ For libraries that have multiple build configurations the configurations will be
dotnet msbuild System.Net.NetworkInformation.csproj /p:OSGroup=Linux
```

- Build project for uap (not if trying to build on non-windows you also need to specify OSGroup=Windows_NT)
```
dotnet msbuild System.Net.NetworkInformation.csproj /p:TargetGroup=uap
```

- Build release version of library
```
dotnet msbuild System.Net.NetworkInformation.csproj /p:ConfigurationGroup=Release
Expand Down Expand Up @@ -433,17 +427,6 @@ If coverage succeeds, the individual report can be found at `$(TestPath)\report\
Code coverage reports from the continuous integration system are available from the links on the front page of the corefx repo.
### Building tests with UWP (Windows only)
This will allow you to build and run against `uap`, the managed version of the UWP Framework subset, used when debugging UWP applications in Visual Studio:
```cmd
cd src\Microsoft.CSharp\tests
dotnet msbuild /t:BuildAndTest /p:TargetGroup=uap
```
In this case, your test will get executed within the context of a wrapper UWP application, targeting the Managed uap.
The CoreFX build and test suite is a work in progress, as are the [building and testing instructions](../README.md). The .NET Core team and the community are improving Linux and OS X support on a daily basis and are adding more tests for all platforms. See [CoreFX Issues](https://github.com/dotnet/corefx/issues) to find out about specific work items or report issues.
## Testing with private CoreCLR bits
Generally the CoreFx build system gets the CoreCLR from a NuGet package which gets pulled down and correctly copied to the various output directories by building '\eng\restore\runtime\runtime.depproj' which gets built as part of `build.cmd/sh`. For folks that want to do builds and test runs in corefx with a local private build of coreclr you can follow these steps:
Expand Down
1 change: 0 additions & 1 deletion Documentation/project-docs/pullrequest-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ As part of our Pull Requests we have some validation builds where we build the p
| Windows x86_Release | netcoreapp | X | X |
| Windows x64_Debug | netcoreapp | X | X |
| Windows NETFX_x86_Release | netfx | X | X |
| Windows UWP_CoreCLR_x64_Debug | uap | X | X |
| Linux x64_Release | netcoreapp | X | X |
| Linux arm64_Release | netcoreapp | X | X |
| Linux arm_Release | netcoreapp | X | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Want to make your libraries multi-platform? Want to see how much work is require

## How to Use Portability Analyzer

To begin using the .NET Portability Analyzer, download the extension from the Visual Studio Gallery. You can configure it in Visual Studio via *Tools* >> *Options* >> *.NET Portability Analyzer* and select your Target Platforms. For now, please use ASP.NET 5 as a proxy for all .NET Core 5-based platforms (e.g. [Windows 10 .NET UAP apps](http://blogs.windows.com/buildingapps/2015/03/02/a-first-look-at-the-windows-10-universal-app-platform/)).
To begin using the .NET Portability Analyzer, download the extension from the Visual Studio Gallery. You can configure it in Visual Studio via *Tools* >> *Options* >> *.NET Portability Analyzer* and select your Target Platforms.

![](../images/portability_screenshot.png)

Expand Down
2 changes: 0 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,4 @@
<SolutionsToUpdate Include="@(_solutionsToUpdateFiles->'%(RootDir)%(Directory)')" Exclude="@(_solutionsToExcludeFromUpdate)" />
</ItemGroup>
</Target>

<Import Project="$(RepositoryEngineeringDir)restore\uap-tools.targets" />
</Project>
2 changes: 0 additions & 2 deletions eng/Packaging.props
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,4 @@
<SkipPackageFileCheck>true</SkipPackageFileCheck>
</File>
</ItemGroup>

<Import Condition="'$(MSBuildProjectExtension)' == '.pkgproj'" Project="$(MSBuildThisFileDirectory)disableUap.targets" />
</Project>
5 changes: 2 additions & 3 deletions eng/Packaging.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project>
<!-- Add validation for netcoreapp5.0 to package build and testing -->
<ItemGroup>
<DefaultValidateFramework Include="netcoreapp5.0">
<RuntimeIDs>@(NETCoreApp30RIDs)</RuntimeIDs>
</DefaultValidateFramework>
<DefaultValidateFramework Include="netcoreapp5.0" RuntimeIDs="@(NETCoreApp30RIDs)" />
<DefaultValidateFramework Remove="uap10.0.16300" />
</ItemGroup>

<!-- There are some packages where we require only one ref for a specific framework to be present. In order to avoid problems with this package when targetting
Expand Down
Loading

0 comments on commit 3b6ec2b

Please sign in to comment.