Skip to content

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Mar 18, 2020

Now that most projects are Short-Form projects (cedf4d0), we can use
MSBuild multitargeting and the $(TargetFrameworks) MSBuild
property to build for multiple target frameworks at once.

This in turn will allow us to determine which apps can be built
against the .NETCoreApp,Version=v3.1 framework, which is our current
"stepping stone" to eventual .NET 5 compatibility.

Rename Configuration.props to Directory.Build.props, so that it
doesn't need to be explicitly <Import/>ed everywhere.

Update all projects so that $(OutputPath) is in turn a variable
defined in Directory.Build.props:

  • $(BuildToolOutputFullPath): Build-time utilities, e.g. files
    that belong in bin/BuildDebug.
  • $(ToolOutputFullPath): "Normal" output, e.g. bin/Debug.
  • $(TestOutputFullPath): Test-related artifacts, e.g.
    bin/TestDebug.
  • $(UtilityOutputFullPath): "Normal" output that is shared with
    xamarin-android and needs an alternate installation location when
    built from xamarin-android.

Of note is that when $(TargetFramework) starts with netcoreapp,
the above properties are changed to have a -$(TargetFramework)
suffix.

Update a few tools projects so that they build for both net472 and
netcoreapp3.1 frameworks, e.g. tools/logcat-parse now produces:

  • bin/Debug-netcoreapp3.1/logcat-parse.deps.json
  • bin/Debug-netcoreapp3.1/logcat-parse.dll
  • bin/Debug-netcoreapp3.1/logcat-parse.pdb
  • bin/Debug-netcoreapp3.1/logcat-parse.runtimeconfig.dev.json
  • bin/Debug-netcoreapp3.1/logcat-parse.runtimeconfig.json
  • bin/Debug/logcat-parse.exe
  • bin/Debug/logcat-parse.exe.config
  • bin/Debug/logcat-parse.pdb

Some projects fail when building for netcoreapp3.1. These projects
will be fixed separately.

@jonpryor jonpryor force-pushed the jonp-build-more-frameworks branch 2 times, most recently from ed92284 to 35f0c60 Compare March 19, 2020 02:28
Now that most projects are Short-Form projects (cedf4d0), we can use
MSBuild multitargeting and the [`$(TargetFrameworks)`][0] MSBuild
property to build for multiple target frameworks at once.

This in turn will allow us to determine which apps can be built
against the `.NETCoreApp,Version=v3.1` framework, which is our current
"stepping stone" to eventual .NET 5 compatibility.

Rename `Configuration.props` to `Directory.Build.props`, so that it
doesn't need to be explicitly `<Import/>`ed everywhere.

Update all projects so that `$(OutputPath)` is in turn a variable
defined in `Directory.Build.props`:

  * `$(BuildToolOutputFullPath)`: Build-time utilities, e.g. files
    that belong in `bin/BuildDebug`.
  * `$(ToolOutputFullPath)`: "Normal" output, e.g. `bin/Debug`.
  * `$(TestOutputFullPath)`: Test-related artifacts, e.g.
    `bin/TestDebug`.
  * `$(UtilityOutputFullPath)`: "Normal" output that is shared with
    xamarin-android and needs an alternate installation location when
    built from xamarin-android.

Of note is that when `$(TargetFramework)` starts with `netcoreapp`,
the above properties are changed to have a `-$(TargetFramework)`
suffix.

Update a few tools projects so that they build for both `net472` and
`netcoreapp3.1` frameworks, e.g. `tools/logcat-parse` now produces:

  * `bin/Debug-netcoreapp3.1/logcat-parse.deps.json`
  * `bin/Debug-netcoreapp3.1/logcat-parse.dll`
  * `bin/Debug-netcoreapp3.1/logcat-parse.pdb`
  * `bin/Debug-netcoreapp3.1/logcat-parse.runtimeconfig.dev.json`
  * `bin/Debug-netcoreapp3.1/logcat-parse.runtimeconfig.json`
  * `bin/Debug/logcat-parse.exe`
  * `bin/Debug/logcat-parse.exe.config`
  * `bin/Debug/logcat-parse.pdb`

Some projects fail when building for `netcoreapp3.1`.  These projects
will be fixed separately.

[0]: https://docs.microsoft.com/en-us/dotnet/standard/frameworks
@jonpryor jonpryor force-pushed the jonp-build-more-frameworks branch from 35f0c60 to abe51ef Compare March 19, 2020 13:46
@jonpryor
Copy link
Contributor Author

Downstream PR: dotnet/android#4424

@jonpryor jonpryor merged commit 95f698b into dotnet:master Mar 19, 2020
@jpobst jpobst added this to the d16-7 milestone Apr 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants