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

623 Коммитов

Автор SHA1 Сообщение Дата
VS MobileTools Engineering Service 2 b32abc6c5b
[release/7.0.1xx] [dotnet/tools] Don't disable compact unwind info. Fixes #16546. (#16769)
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.

Backport of #16623

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-11-21 20:47:01 +01:00
VS MobileTools Engineering Service 2 1c82c43547
[release/7.0.1xx] [dotnet] Always use a four part VS component version (#16636)
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


Backport of #16633

Co-authored-by: Peter Collins <pecolli@microsoft.com>
2022-11-08 10:27:10 +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
Rolf Bjarne Kvinge e9e097c794
[dotnet] Don't try to collect RID-specific items to codesign unless we're connected to (or building on) a Mac. (#16153)
Fixes this problem when building universal Mac Catalyst apps on Windows:

    Target Name=_CollectRidSpecificCodesignItems Project=D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\GraphicsTester.Skia.Mac.csproj
        ReadItemsFromFile
            Assembly = D:\a\_work\1\s\bin\dotnet\packs\Microsoft.MacCatalyst.Sdk\15.4.1173-rc.2\tools\msbuild\iOS\..\iOS\Xamarin.iOS.Tasks.dll
            Parameters
                File = obj\Release\net7.0-macos\codesignitems-osx-x64.items
            Errors
                D:\a\_work\1\s\bin\dotnet\packs\Microsoft.macOS.Sdk\12.3.1173-rc.2\targets\Xamarin.Shared.Sdk.targets(1303,3): error MSB4018: The "ReadItemsFromFile" task failed unexpectedly.
    System.IO.FileNotFoundException: Could not find file 'D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\obj\Release\net7.0-macos\codesignitems-osx-x64.items'.
    File name: 'D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\obj\Release\net7.0-macos\codesignitems-osx-x64.items'
       at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
       at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
       at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
       at System.Xml.XmlTextReaderImpl.FinishInitUriString()
       at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
       at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
       at Xamarin.MacDev.Tasks.ReadItemsFromFileBase.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/ReadItemsFromFileBase.cs:line 39
       at Xamarin.MacDev.Tasks.ReadItemsFromFile.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/ReadItemsFromFile.cs:line 15
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\GraphicsTester.Skia.Mac.csproj]
2022-09-27 17:29:58 +02:00
Rolf Bjarne Kvinge 1683c18cec
Merge main into net7.0. (#16133) 2022-09-27 11:31:52 +02:00
VS MobileTools Engineering Service 2 8cbc5c3510
[net7.0] [workload] Update net6.0 KnownFrameworkReference (#15882)
A `Xamarin.Shared.Sdk.MultiTarget.targets` file has been added to update
the ref/runtime pack versions associated with the .NET 6 SDK.  This file
will ship as part of the .NET 7 SDK but only be imported when using the
.NET 6 SDK.  This should work around the need to add new and net7
versioned aliases of the `Ref` and `Runtime` packs.  Adding this file to
`AfterMicrosoftNETSdkTargets` will ensure that it is imported last,
after all `KnownFrameworkReferences` that need updating are declared.

Backport of #15834

Co-authored-by: Peter Collins <pecolli@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-26 22:55:24 +02:00
Rolf Bjarne Kvinge 9c3458dc33 Merge main into xcode14.1. 2022-09-26 22:46:59 +02:00
Rolf Bjarne Kvinge 56165a77ec Merge main into net7.0. 2022-09-26 22:44:48 +02:00
Peter Collins 85799ee55b
[build] Improve generated manifest MSI versions (#16092)
Attempt to improve consistency in generated workload manifest MSI versions by more closely following the four digit versioning schema used by Android and MAUI.  This change should only affect preview versioned workload manifests, as stable manifest MSIs will now use the three digit NuGet package version as the MSI version.

The previous version passed to the MSI version generation task in arcade contained the commit distance twice, and now the commit distance is only used in the fourth version part.

Before:
Version="15.4.1167.1167"

After:
Version="15.4.0.1167"

Compared to Android/MAUI:
Version="33.0.0.151"
Version="7.0.0.6683"

With these changes the arcade task should weigh the time delta between builds more heavily, which should produce MSI versions that increment more consistently and by smaller amounts.
2022-09-23 07:26:59 +02:00
Rolf Bjarne Kvinge 15e9683a53 Bump main in net7.0. 2022-09-22 07:55:18 +02:00
Rolf Bjarne Kvinge f4d5e6eeab Merge main into xcode14.1. 2022-09-22 07:50:58 +02:00
VS MobileTools Engineering Service 2 d8fb2672b0
[dotnet] Fix vs-workload.props generation when only some platforms are included in the build. (#16067)
Backport of #16030 with some additional changes.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-22 07:15:43 +02:00
Rolf Bjarne Kvinge 702510c028 Fix new template projects. 2022-09-20 07:57:33 +02:00
Rolf Bjarne Kvinge 4215eae4a3 Merge main into xcode14.1. 2022-09-16 18:35:48 +02:00
Rolf Bjarne Kvinge 40b3831bc7 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-16 2022-09-16 18:32:01 +02:00
Rolf Bjarne Kvinge fbb39bc2cf
[dotnet] Fix markdown syntax in BundleContents.md (#15962) 2022-09-15 15:41:25 +02:00
Rolf Bjarne Kvinge 17821f0585 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-12 2022-09-12 11:28:02 +02:00
Rolf Bjarne Kvinge 68eb7d401f Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14-2022-09-12 2022-09-12 11:27:02 +02:00
Rolf Bjarne Kvinge e84cca8cb6
[dotnet] Add binding templates for tvOS and macOS. Fixes #15839. (#15921)
Fixes https://github.com/xamarin/xamarin-macios/issues/15839.
2022-09-12 10:21:47 +02:00
Rolf Bjarne Kvinge b6cdde4280
[msbuild] Add support for keeping temporary output when looking for AOT compilers. (#15884) 2022-09-09 17:10:50 +02:00
Rolf Bjarne Kvinge 681fce6036 Merge remote-tracking branch 'origin/net7.0' into bump-main-in-net7.0-2022-09-07 2022-09-07 11:38:51 +02:00
Rolf Bjarne Kvinge ea4b193303 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-07 2022-09-07 10:57:58 +02:00
Rolf Bjarne Kvinge 433c48a35e Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14-2022-09-07 2022-09-07 10:56:00 +02:00
Rolf Bjarne Kvinge 2415050767
[dotnet] Fix issue with frameworks with dots. Fixes #15727. (#15872)
Since executables in frameworks usually don't have dots, `%(Filename)` will be
the entire filename, because `%(Extension)` is empty. However, if the
executable happens to have a dot, then we need to include the extension:
`%(Filename)%(Extension)`.

Fixes https://github.com/xamarin/xamarin-macios/issues/15727.
2022-09-07 10:43:33 +02:00
Rolf Bjarne Kvinge 200a5e6eef
[dotnet] Fix a few typos in variable names. (#15871) 2022-09-06 09:12:03 +02:00
Rolf Bjarne Kvinge 692c71bd8c Merge remote-tracking branch 'origin/net7.0' into backport-pr-15761-to-net7.0 2022-09-05 21:50:14 +02:00
Rolf Bjarne Kvinge d1ef85446d
Misc fixes to make the build more silent. (#15852) 2022-09-05 10:55:41 +02:00
Rolf Bjarne Kvinge a0ebd954c3 Bump to dotnet/runtime/release/7.0@608da95f.
Stop relying on dotnet/installer to provide dotnet/runtime bumps.

Ref: https://github.com/xamarin/xamarin-android/pull/7319
2022-09-01 18:39:22 +02:00
Rolf Bjarne Kvinge 91a568784c
Merge main into net7.0. (#15826) 2022-09-01 15:29:44 +02:00