Граф коммитов

649 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 1be62b286e Merge main into net8.0. 2022-12-20 16:11:10 +01:00
Rolf Bjarne Kvinge e06f49dd90
[dotnet] We no longer need to add the entry assembly as a root assembly for the linker. (#17026)
It's automatically done in the linker's MSBuild logic.

Not only is it no longer necessary (hasn't been for a while), it'll be wrong
in .NET 8 after https://github.com/dotnet/linker/pull/3124.
2022-12-19 18:36:54 +01:00
Rolf Bjarne Kvinge e2c9487027 Merge main into net8.0. 2022-12-16 18:08:15 +01:00
Andoni Morales Alastruey 4cfccff38e
Fix libs reidentification deployed in a subdirectory (#16706)
Dynamic libraries might be deployed in subdirectories such as libclrjit.dylib from the nuget package cefglue.common:
Contents/MonoBundle/CefGlueBrowserProcess/libclrjit.dylib

The library ID for that library should be: @executable_path/../MonoBundle/CefGlueBrowserProcess/libclrjit.dylib

Instead of: @executable_path/../MonoBundle/libclrjit.dylib

Beside the library ID being wrong, when it's combined with the nuget package microsoft.netcore.app.runtime.osx-x64 providing a library with the same name, both uses the same `ReidentifiedPath`, which can cause a failure in the InstallNameTool tasks that are run in parallel operating on the same temporary file.

The following patch uses the `RelativePath` for the tempory file used by `InstallNameTool` so that there are no clashes with other files with the same name deployed in other directories. It also uses the `RelativePath` to create the correct library id: @executable_path/../../Contents/MonoBundle/CefGlueBrowserProcess/libclrjit.dylib

Partially fixes https://github.com/xamarin/xamarin-macios/issues/15173 for this scenario
2022-12-16 09:17:01 +01:00
Rolf Bjarne Kvinge aee3f88ae8
[msbuild/dotnet] Use a more unique property name than _AOTCompiler. (#17049)
Use a more unique property name than _AOTCompiler (use _XamarinAOTCompiler
instead) to try to prevent any problems if somebody else tries to use
'_AOTCompiler' somewhere.

Ref: https://github.com/xamarin/xamarin-macios/pull/17033#discussion_r1047823981
2022-12-16 07:22:51 +01:00
Rolf Bjarne Kvinge 07702485c0 Merge main into net8.0. 2022-12-15 08:49:18 +01:00
Rolf Bjarne Kvinge 7fd33cce1b
[dotnet] Cache the AOT compiler path. Fixes #16774. (#17033)
Cache the AOT compiler path, to avoid an expensive recomputation on every
build. This is even more expensive when building remotely from Windows, so
store the cached value on Windows.

Fixes https://github.com/xamarin/xamarin-macios/issues/16774.
2022-12-14 18:23:43 +01:00
Rolf Bjarne Kvinge 9cdb2042ce Merge main into net8.0. 2022-12-12 18:01:02 +01:00
Rolf Bjarne Kvinge 85b4b791a2
[dotnet] Fix line endings in template localizations. (#16981)
The automatic translation apparently runs on windows, creates files with crlf,
and will check in the corresponding files as such. During the local build
these files will be read and written out again, but now with lf endings,
leaving all these files modified.

So set the 'text' git attribute for these files, so that they're stored as
'lf' and converted to 'crlf' on Windows.
2022-12-12 17:12:35 +01:00
Rolf Bjarne Kvinge 294314a518
[autoformat] Add the rest of the repository. (#16974) 2022-12-07 09:13:36 +01:00
Rolf Bjarne Kvinge 90c4972db1 Merge main into net8.0. 2022-12-07 08:07:44 +01:00
Jeffrey Stedfast 1075c66d95
Fix typo in iOS Storyboard template (#16966)
Partial fix for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1694105

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-12-06 13:00:28 +01:00
Rolf Bjarne Kvinge 684c664740
[dotnet] Fix the TargetFramework version in a few templates. (#16938) 2022-12-06 08:58:52 +01:00
VS MobileTools Engineering Service 2 a201c4b3af
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7046351 (#16955)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2022-12-05 09:10:55 -06:00
Jonathan Peppers b7170fb735
[build] Add support for Visual Studio on win-arm64 (#16935)
Context: https://github.com/xamarin/yaml-templates/pull/204
Context: https://github.com/xamarin/xamarin-android/pull/7471

Updates the VSMAN files generated for our .NET workload to support Visual Studio on windows-arm64.
2022-12-02 09:08:56 +01:00
Rolf Bjarne Kvinge 62a4038187 Merge main into net8.0. 2022-12-01 17:23:19 +01:00
VS MobileTools Engineering Service 2 96c39dcaf9
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 6990346 (#16843)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2022-11-22 10:35:04 -06:00
Rolf Bjarne Kvinge 5583f5c6b2
[dotnet] Ensure all templates are targetting .NET 7. (#16819) 2022-11-21 09:35:40 +01:00
Rolf Bjarne Kvinge 1d81ada61b Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2022-11-17 2022-11-18 08:32:57 +01:00
Rolf Bjarne Kvinge 1fe87884f4
[dotnet] Make sure to create a directory before we try to put files into it. (#16778)
Fixes this random build error:

    cp: Workloads/Microsoft.NET.Sdk.tvOS/LICENSE: clonefile failed: No such file or directory
    make[1]: *** [Makefile:193: Workloads/Microsoft.NET.Sdk.tvOS/LICENSE] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory '/Users/rolf/work/maccore/dotnet/xamarin-macios/dotnet'

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-18 08:03:01 +01:00
Rolf Bjarne Kvinge 0a53f3cd60
Add automatic support for not building iOS 32-bit stuff when min iOS version is >= 11.0 (#16746)
There are no changes for 32-bit watchOS, because watchOS support is likely to
go away completely anyways.
2022-11-18 07:59:46 +01:00
Rolf Bjarne Kvinge a88d7e6745 Merge main into net8.0. 2022-11-17 13:14:10 +01:00
Rolf Bjarne Kvinge fc12f4db2b
[dotnet] Make sure to create a directory before we try to put files into it. (#16757)
Fixes this random build error:

    /bin/sh: Workloads/Microsoft.NET.Sdk.macOS/WorkloadManifest.targets.tmp: No such file or directory
    make[1]: *** [Workloads/Microsoft.NET.Sdk.macOS/WorkloadManifest.targets] Error 1
    make[1]: *** Waiting for unfinished jobs....
2022-11-16 07:54:13 +01:00
Rolf Bjarne Kvinge 807acdce2f Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2022-11-07 2022-11-09 07:56:51 +01:00
Rolf Bjarne Kvinge b8c5f46d84
[dotnet/tools] Don't disable compact unwind info. Fixes #16546. (#16623)
Don't disable compact unwind info in the native linker, it may break C++
exception handling.

We originally disabled compact unwind info to fix a warning from the native
linker, this will have to be solved another way (in any case extra build
warnings is preferrable compared to an app crashing at runtime due to broken
C++ exception handling).

This partially reverts c05e774612.

Fixes https://github.com/xamarin/xamarin-macios/issues/16546.
2022-11-08 12:16:11 +01:00
Peter Collins c6dfc40eae
[dotnet] Always use a four part VS component version (#16633)
The `%(Version)` metadata declared in `vs-workload.props` should always
be a four part version, this was missed when reviewing commit 9f1dc519ea.
Fix this by adding a trailing `.0` to stable branded packages.

For "Preview" branded manifest packs, the fourth part of the version
should be the commit distance (e.g. 16.1.0.5).

For "Stable" branded manifest packs, the third part of the version
should be the commit distance (e.g. 16.1.5.0).

See the following for more info on `vs-workload.props` versioning:
https://github.com/xamarin/sdk-insertions/wiki/How-to-create-a-new-insertion#msi-generation-and-vs-versioning-requirements
2022-11-08 09:15:32 +01:00
Rolf Bjarne Kvinge 1d16b66542
[dotnet] Show a better error when trying to launch an app using 'dotnet run' on Windows. (#16610)
Ref: https://github.com/xamarin/xamarin-macios/issues/16609
2022-11-08 07:32:03 +01:00
Rolf Bjarne Kvinge 89b75b8ce1 Bump to net8.0 2022-11-04 09:41:56 +01:00
Rolf Bjarne Kvinge 9f1dc519ea
[dotnet] Adjust stable MSI versioning. (#16501)
Stable MSIs are versioned like non-stable MSIs, except that:

* We define the commit distance as the number of commits since the branch
  bacame a release branch (and started using stable branding). Technically
  this is the number of commits since the `NUGET_RELEASE_BRANCH` variable
  changed (which will be incorrect for non-stable branches, but in that case
  we shouldn't use this number in those scenarios).
* We use the above-mentioned commit distance as the third number in the MSI
  version (as opposed to the fourth number in non-stable branches.)

Note: we detect if we're building a stable release by checking if the
`NUGET_PRERELEASE_IDENTIFIER` is empty (we can't use `NUGET_RELEASE_BRANCH`,
because this variable will be set for PRs to the release branch, while
`NUGET_PRERELEASE_IDENTIFIER` will only be empty for CI builds from a stable
branch).
2022-10-31 15:30:58 +01:00
dotnet-maestro[bot] 12f8af16c6
[net7.0-xcode14.1] Update dependencies from dotnet/installer (#16455)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.AspNetCore.App.Ref**: from 7.0.0-rtm.22479.3 to 7.0.0-rtm.22512.1 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: df408977-ead8-4cfb-e40b-08dab20af502
- **Build**: 20221019.39
- **Date Produced**: October 20, 2022 12:51:36 AM UTC
- **Commit**: e6dd91c290b808f971a1ac69c2fb29395bbf1051
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.100-rtm.22479.5 to 7.0.100-rtm.22519.39][3]
  - **Microsoft.AspNetCore.App.Ref**: [from 7.0.0-rtm.22479.3 to 7.0.0-rtm.22512.1][4]

[3]: eb23d8c...e6dd91c
[4]: 02d62cf...c686535

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-27 12:08:56 +02:00
Rolf Bjarne Kvinge 24f1fc18ed Merge remote-tracking branch 'origin/xcode14.1' into net7.0-xcode14.1 2022-10-20 19:30:22 +02:00
Rolf Bjarne Kvinge cb6f555665 Merge main into xcode14.1. 2022-10-17 11:35:33 +02:00
Rolf Bjarne Kvinge 5975ffd6f1 Merge main into net7.0. 2022-10-17 10:21:24 +02:00
Rolf Bjarne Kvinge e4fb94b3d1
[dotnet] Tweak a template name slightly. (#16323) 2022-10-13 23:26:01 +02:00
Rolf Bjarne Kvinge 18962171b9 Merge main into net7.0. 2022-10-13 13:36:40 +02:00
Rolf Bjarne Kvinge eec5f62054 Merge main into xcode14.1. 2022-10-13 13:36:23 +02:00
Rolf Bjarne Kvinge 74641f120a
[devops] Make each platform its own maestro build. (#16301)
This will hopefully make it easier to correctly subscribe to our maestro feeds
and only pick certain platforms.

It also fixes a problem where publishing wouldn't work unless we were building
for iOS, because the code was assuming that iOS was always enabled.
2022-10-11 23:55:30 +02:00
Rolf Bjarne Kvinge 9e3dbf2c09
[dotnet] Hardcode 'true' as the default value for GenerateSatelliteAssembliesForCore. Fixes #16193. (#16306)
Hardcode 'true' as the default value for GenerateSatelliteAssembliesForCore,
because .NET gets it wrong when building from inside VS (Windows).

When building using either VSMac or the command line (either from Windows or
Mac), the `MSBuildRuntimeType` property is set to `Core`, and as a result, the
default value for `GenerateSatelliteAssembliesForCore` is `true`:

```xml
<GenerateSatelliteAssembliesForCore Condition=" '$(GenerateSatelliteAssembliesForCore)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">true</GenerateSatelliteAssembliesForCore>
```

See: 00100960bf/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets (L41)

This is the correct behavior.

However, when building from inside Visual Studio (for Windows), the
`MSBuildRuntimeType` property is set to `Full`, and thus
`GenerateSatelliteAssembliesForCore` is not set to `true`, and we end up
executing al.exe to generate satellite assemblies, which is wrong (al.exe
complains that 'arm64' is an invalid platform).

Fix this by always defaulting `GenerateSatelliteAssembliesForCore` to `true`,
independent on where we're executing.

Ref: https://github.com/dotnet/sdk/issues/28419.

Fixes https://github.com/xamarin/xamarin-macios/issues/16193.
2022-10-10 21:41:36 +02:00
Rolf Bjarne Kvinge 6b0d192131 Merge main into xcode14.1. 2022-10-10 13:02:13 +02:00
Rolf Bjarne Kvinge 9d306f3862 Merge main into net7.0. 2022-10-10 13:01:32 +02:00
Rolf Bjarne Kvinge acf4edbfed
[dotnet] Add numerous item templates. Fixes #15836. (#16287)
Add the following item templates for all platforms:

* Controller (View Controller with UI written in code)
* View
* View Controller (View Controller with UI written in XIB)
* Storyboard

Item templates won't show up in VSMac until this is released:
https://github.com/xamarin/vsmac/pull/9133.

Fixes https://github.com/xamarin/xamarin-macios/issues/15836.

Also update the template tests accordingly.

This PR might be easier to review commit-by-commit due to the large number of generated localization files.
2022-10-10 08:09:34 +02:00
Rolf Bjarne Kvinge 67f95e64f8
[dotnet] Fix whitespace in templates. (#16275)
Make indentation consistent, and add eol at the end of files.
2022-10-07 13:15:31 +02:00
Rolf Bjarne Kvinge 85292582ec
[dotnet] Add helpful make targets to implement and test templates (#16261) 2022-10-07 08:04:26 +02:00
Rolf Bjarne Kvinge 6d6c3b8570
[dotnet] Add class library project templates for tvOS, macOS and Mac Catalyst. (#16263)
These new project templates won't show up in VSMac until the new templates are
added to VSMac.

Ref: 61afbd1cd1/Xamarin.Addins.Core/Xamarin.Ide.Templating/TemplateDescriptionProvider.cs (L207-L216)

Also update the corresponding template tests.

This PR might be easier to review commit-by-commit due to the large number of generated localization files.
2022-10-06 16:47:06 +02:00
Rolf Bjarne Kvinge 6afa8eaeae
[dotnet] macOS is not a mobile platform, so don't claim it is in the templates. (#16262) 2022-10-06 16:46:27 +02:00
Rolf Bjarne Kvinge ec2390ad6c
[dotnet] Improve name and descripting in a few existing templates a little bit. (#16260)
This increases the consistency with how other templates are named.
2022-10-06 15:50:33 +02:00
Rolf Bjarne Kvinge ed612dcd6e Merge main into net7.0. 2022-09-28 17:17:10 +02:00
Rolf Bjarne Kvinge 7cc91e0c53 Merge main into xcode14.1. 2022-09-28 17:14:31 +02:00
VS MobileTools Engineering Service 2 f9bd979f7a
[main] [ci] Only try to sign nested zips if they exist (#16143)
Recent signing attempts on branches that are building a limited set of
Apple platforms are failing:

Target "_UnzipNestedZips: (TargetId:3)" in file
"D:\a\_work\_temp\artifact-signing\extracted\SignList.targets" from
project "D:\a\_work\_temp\artifact-signing\SignFiles.proj" (target
"_CalculateItemsToSign" depends on it):
Set Property:
_NestedZipExtractionDir=D:\a\_work\_temp\artifact-signing\extracted\nested\
Using "RemoveDir" task from assembly "Microsoft.Build.Tasks.Core,
Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    Task "RemoveDir" (TaskId:2)
Task
Parameter:Directories=D:\a\_work\_temp\artifact-signing\extracted\nested\
(TaskId:2)
Directory "D:\a\_work\_temp\artifact-signing\extracted\nested\" doesn't
exist. Skipping. (TaskId:2)
    Done executing task "RemoveDir". (TaskId:2)
Using "Unzip" task from assembly "Microsoft.Build.Tasks.Core,
Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    Task "Unzip" (TaskId:3)
D:\a\_work\_temp\artifact-signing\extracted\SignList.targets(16,5):
Error MSB4044: The "Unzip" task was not given a value for the required
parameter "DestinationFolder".

We should only attempt to extract and sign content in `Broker.zip`,
`Build.zip`, and `Xamarin.PreBuilt.iOS.app.zip` if the zip exists.


Backport of #16141

Co-authored-by: Peter Collins <pecolli@microsoft.com>
2022-09-28 07:53:27 +02:00
Rolf Bjarne Kvinge 00578621d4
[dotnet] Don't try to ILStrip assemblies unless we're connected to a Mac. (#16160)
Fixes this error:

	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018: The "Xamarin.MacDev.Tasks.ILStrip" task failed unexpectedly.
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018: System.ArgumentException: 'Assemblies' is required. (Parameter 'Assemblies')
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at ILStrip.Execute()
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at ILStripTasks.ILStripBase.Execute() in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Tasks/ILStripBase.cs:line 18
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at Xamarin.MacDev.Tasks.ILStrip.Execute() in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Tasks/ILStrip.cs:line 16
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
     0 Warning(s)
     1 Error(s)
2022-09-28 07:29:52 +02:00