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

860 Коммитов

Автор SHA1 Сообщение Дата
VS MobileTools Engineering Service 2 ada4d2cb31
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7603393 (#18005)
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.
2023-04-10 08:23:00 -05:00
Rolf Bjarne Kvinge 059aa7ad8f [net8.0] Merge main into net8.0. 2023-04-10 12:44:17 +02:00
Rolf Bjarne Kvinge 8c9ee8289f
[msbuild/dotnet] Rework how we collect and process native references. (#17554)
Previously, we'd do this:

* Collect all possible native references.
* Extract any compressed native references (*.framework.zip, *.xcframework.zip,
  *.resources.zip) to disk.
* Resolve the resulting native references.

This doesn't work very well on Windows (in non-connected/Hot Restart mode),
because some compressed files may contain symlinks (in particular compressed
xcframeworks). If those symlinks are for any other platform than the one we're
building for, they shouldn't matter, but if we extract the entire compressed
xcframework before figuring out what we need from it, we'd run into symlinks
and not knowing whether they should be ignored or not.

So rework the process to:

* Collect all possible native references.
* Resolve the resulting native references, peeking into zip files if need be.
* Extract any compressed native references, but only the parts of the zip we need.

This way we won't run into any symlinks unless we really need them, and it
should also improve build performance slightly, even on macOS, since we're not
extracting files we won't need (which can be significant for xcframeworks).

Additionally:

* Add support for unzipping on Windows by using System.IO.Compression.
* Show an error if attempting to extract a symlink in the last step in the
  reworked process on Windows.
* Some tests had to be updated (since they poked into internals of the
  ResolveNativeReferences task, and those internals have changed).
2023-04-10 11:27:41 +02:00
Alex Soto df5c2e2862 Merge remote-tracking branch 'xamarin/main' into net8.0-main-merge 2023-04-06 20:12:48 -04:00
Emanuel Fernandez Dell'Oca b7a486a887
[msbuild] Get RecursiveDir directory name only if it isn't empty (#17988)
If the `RecursiveDir` metadata is empty, the GetDirectoryName method
throws an error because it isn't a valid path. This can happen on VS
design time builds.
2023-04-06 17:21:26 -04:00
Alex Soto db0b1ff52f Merge remote-tracking branch 'xamarin/main' into net8.0-main-merge 2023-04-05 15:25:09 -04:00
Milos Kotlar 6d6cee815e
Enable deduplication of generics in Xamarin.iOS build (#17766)
This PR contributes to https://github.com/dotnet/runtime/issues/83193. It
creates a new target `_CreateAOTDedupAssembly`, and makes the `_AOTCompile`
depend on it. Also, it changes the `AOTCompile` task to pass `dedup-skip` and
`dedup-include` to the Mono AOT compiler.

The change was tested on `MySingleView` app and `Monotouch` tests. Both apps
are working, but some monotouch tests are failing due to
`Arg_NotlmplementedException`. Assumption is that calls between Obj-C and C#
could be problematic, as with the dedup improvement enabled, extra methods got
moved from origin assemblies to the dedup assembly, so native to managed
mapping could be corrupted.

Here are preliminary results comparing size on disk and build time between the
baseline (`net8.0` branch) and the target (this branch). Binlog details are
[attached](https://github.com/xamarin/xamarin-macios/files/10942772/binlog.zip).

| App                                      | Baseline size on disk .ipa (MB) | Target size on disk .ipa (MB) | Baseline size on disk .app (MB) | Target size on disk .app (MB) | Baseline build time (s) | Target build time (s) | .app diff (%) |
| ---------------------------------------- | ------------------------------- | ----------------------------- | ------------------------------- | ----------------------------- | ----------------------- | --------------------- | ------------- |
| MySingleView Release iOS                 | 5,40                            | 5,40                          | 29,2                            | 15,20                         | 29,18                   | 16,77                 | 47,94         |
| MySingleView Release  iOSSimulator-arm64 | N/A                             | N/A                           | 469,5                           | 341,80                        | 468,00                  | 330,00                | 27,20         |
| Monotouch Release llvm iOS               | 49,00                           | 38,80                         | 209,60                          | 157,40                        | 115,00                  | 130,00                | 24,90         |

Draft PR should get a full test run on the changes. The following tasks should
be resolved before making this PR ready for review.
2023-03-30 17:27:56 +02:00
Rolf Bjarne Kvinge 335f8c9d90
[dotnet/msbuild] Don't bundle *.xml files that match any assemblies. Fixes #14939 and fixes #15897. (#17908)
This fixes a warning when documentation is enabled for a project:

> The file '~/.nuget/packages/fsharp.core/6.0.0/contentFiles/any/netstandard2.1/FSharp.Core.xml' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle.

This doesn't change any behavior (as the warning says, the file wasn't copied
to the app bundle before either), but it makes the behavior explicitly
documented and silences the warning.

Fixes https://github.com/xamarin/xamarin-macios/issues/14939.
Fixes https://github.com/xamarin/xamarin-macios/issues/15897.
2023-03-30 07:24:00 +02:00
Rolf Bjarne Kvinge 8deec35a20
[net8.0] Remove support for .NET 6. (#17901)
Context: https://dotnet.microsoft.com/platform/support/policy/maui

> A major version of .NET MAUI receives support for a minimum of 6
> months after a successor (the next major release) ships. For
> example, .NET MAUI 6.0 will be supported for 6 months after .NET
> MAUI 7.0 ships. Similarly, .NET MAUI 7.0 will receive support for 6
> months after .NET MAUI 8.0 ships.

By the time .NET 8 GA ships, .NET 6 MAUI projects will not be supported.

Remove .NET 6 support from our .NET 8 workloads.
2023-03-29 10:25:25 +02:00
Rolf Bjarne Kvinge 226a5f198f Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-27 19:53:33 +02:00
dustin-wojciechowski 60b0724b4d
[Templates] Add comments to help developers publish MacCatalyst apps on App Store (#17830)
Added some information to the MacCatalyst templates based on comments from the community
on how to publish MacCatalyst apps on the App Store.

Fixes #17591
2023-03-23 20:21:08 -07:00
Haritha Mohan 3dff232920
[dotnet] Enable generation of runtime configuration file (#17840)
Set the GenerateRuntimeConfigurationFiles (GRCF) property to true 
to avoid warnings at build time + add test for change.

Diving deeper into the fix...
- This warning only occurs with .NET apps which is why GRCF
is only updated in the dotnet directory and not msbuild (legacy)
- After examining the binlog (see issue), it was found that the GRCF 
was contingent upon the HasRuntimeOutput property, which is only 
defined for executable projects. And in this case, the user's project
output type is library thus both the RuntimeOutput and consequently 
GRCF properties were not enabled.
- By setting the GRCF to true we can address the original warning of 
concern while ensuring the rest of the projects's behavior is not
altered
in mysterious ways (i.e. by touching the RuntimeOutput property or the 
project output type instead, these changes could have extraneous
effects).

Fixes #17543

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-23 08:10:04 -07:00
Rolf Bjarne Kvinge cfa2734a3a Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-23 15:33:43 +01:00
Rolf Bjarne Kvinge 4131267879 Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-23 08:36:21 +01:00
Peter Collins 432d27b171
[vs-workload] Update VS Component versions (#17883)
Context: https://github.com/xamarin/sdk-insertions/issues/56

Updates the VS component version for all workloads to use the NuGet
versions commit distance as the third version part.
2023-03-23 08:22:42 +01:00
Rolf Bjarne Kvinge 8ac36f126e
[dotnet] Add support for setting an MSBuild property to pass additional mlaunch arguments. (#17866)
This is helpful when doing a command-line -t:Run build, because it's not
possible to set an item group from the command line.
2023-03-22 16:19:49 +01:00
Rolf Bjarne Kvinge 7ea0044224
[dotnet/msbuild] Copy binding resource packages to output directories together with CopyLocal assemblies. Fixes #13910. (#17806)
With a project structure like this:

* Executable project references a library project.
* The library project references a binding project (or assembly).

The binding project's assembly will be copied to the library project's
output directory during the build. Unless we also make sure any binding
resource packages are copied as well, the executable project won't find those,
and the final app won't contain any native bits from the binding project.

The solution is to add any binding resource packages to the list of
files to be copied to the library's output directory.

Fixes https://github.com/xamarin/xamarin-macios/issues/13910.
2023-03-22 10:49:26 +01:00
Peter Collins 289ded90fe
[vs-workload] Remove @(MultiTargetPackNames) (#17838)
Context: https://github.com/xamarin/yaml-templates/pull/251

The VS manifest files generated during MSI conversion will now be split
up using the workload pack type rather than a substring match.
2023-03-20 15:36:44 -04:00
Rolf Bjarne Kvinge 69f5c42db4 [net8.0] Merge main into net8.0. 2023-03-08 23:48:50 +01:00
Rolf Bjarne Kvinge 256ef1ccd9
[dotnet] Change _IntermediateDecompressionDir to always have a trailing directory separator. (#17728)
Also don't hardcode the trailing directory separator as a forward slash,
because we might be executing on Windows (which is the real purpose behind
this change).
2023-03-07 18:58:25 +01:00
Rolf Bjarne Kvinge 07afcf9e97 [net8.0] Merge main into net8.0. 2023-03-07 18:12:02 +01:00
Rolf Bjarne Kvinge 765139e720
[dotnet] Add support for passing environment variables and custom arguments when launching apps with mlaunch. (#17730)
Environment variables can be specified using the MlaunchEnvironmentVariables
item group, and any other mlaunch argument can be specified using the
MlaunchAdditionalArguments item group.

Also add support for the XamarinDebugPort and XamarinDebugHosts properties to
make it easy to set the corresponding environment variable using the command
line (since setting item groups using the command line isn't trivial).

Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1755574.
2023-03-07 18:11:45 +01:00
Rolf Bjarne Kvinge be031736be
[net8.0] [tests] Add a .NET 7 test app. (#17385) 2023-03-07 07:58:54 +01:00
Rolf Bjarne Kvinge 0c4be6ec9c Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-03 2023-03-03 13:20:17 +01:00
Rolf Bjarne Kvinge e170ba56d8
[dotnet] Rework how we handle manifest version bands. (#17670)
* Use a separate variable for Mono's and Emscripten's manifest version band,
  so that they can diverge (this is a decision from the corresponding teams,
  we don't control it).
* Have a separate variable for our own manifest version band, so that it's
  easier to hard code it if we want to.
* Rename a few variables to make them clearer.
* Remove hardcoded rc.2 logic, we're not using any rc.2 versions right now, so
  that's dead code.
* A few other minor changes.
2023-03-03 13:17:55 +01:00
Rolf Bjarne Kvinge 7a866a5cc6 [net8.0] Merge main into net8.0. 2023-03-02 15:49:52 +01:00
Mauro Agnoletti 2178951527
[main] Updated Xamarin.Messaging to 1.9.59 (#17646)
Includes latest fixes like support for retry and reconnect, new telemetry, bug fixing, etc.

Also added Merq.Core.dll to dotnet/Workloads/SignList.xml because now it comes as part of Xamarin.Messaging
2023-03-01 08:20:59 +01:00
Rolf Bjarne Kvinge e0c92a03ce
[dotnet] Include the marshal-ilgen component. Fixes #16836. (#17606)
Fixes https://github.com/xamarin/xamarin-macios/issues/16836.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1751368.
2023-02-24 20:01:43 +01:00
Rolf Bjarne Kvinge fec1e8a946 [net8.0] Merge main into net8.0. 2023-02-22 07:05:49 +01:00
Rolf Bjarne Kvinge ad4af52393
[dotnet] Improve error message when someone tries to disable trimming by setting PublishTrimmed=false. (#17568)
Make it more actionable, by telling users what they can do instead.
2023-02-21 14:54:44 +01:00
Rolf Bjarne Kvinge 7e05ea54bb Merge main into net8.0. 2023-02-17 14:58:12 +01:00
dotnet-maestro[bot] 6eb501be2b
[net8.0] Update dependencies from dotnet/installer (#17444)
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.NET.ILLink.Tasks**: from 8.0.100-1.23067.1 to 8.0.0-preview.2.23101.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-alpha.1.23076.8 to 8.0.0-preview.2.23101.7 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: from 8.0.0-alpha.1.23073.2 to 8.0.0-alpha.1.23066.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-alpha.1.23076.9 to 8.0.0-preview.2.23101.2 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230202.11
- **Date Produced**: February 2, 2023 10:28:14 PM UTC
- **Commit**: 5c7737d740c861fe7cda4822a7137c22368000dc
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-alpha.1.23077.6 to 8.0.100-preview.2.23102.11][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.100-1.23067.1 to 8.0.0-preview.2.23101.2][2]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-alpha.1.23076.8 to 8.0.0-preview.2.23101.7][3]
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: [from 8.0.0-alpha.1.23073.2 to 8.0.0-alpha.1.23066.1][4]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-alpha.1.23076.9 to 8.0.0-preview.2.23101.2][5]

[1]: 1d88a6b...5c7737d
[2]: c790896...842ec4a
[3]: 4d75ee9...56cb24c
[4]: ff23620...5b46122
[5]: 007df05...842ec4a
2023-02-13 07:34:42 +01:00
Rolf Bjarne Kvinge bef4867281
[dotnet] Only include the Xamarin.Shared.Sdk.MultiTarget.targets file if it exists. Fixes #16400. (#17498)
Hopefully fixes https://github.com/xamarin/xamarin-macios/issues/16400.
2023-02-13 07:20:05 +01:00
Mauro Agnoletti 7f7942eae0
Imports the .user.env file if exists and the build is from VS (#17466)
This will allow the latest runtime identifier values to be evaluated in time during the MSBuild property evaluation phase.

Related and dependent of this PR: https://github.com/xamarin/XamarinVS/pull/13606
2023-02-08 09:37:39 +01:00
Rolf Bjarne Kvinge 735454f901 Bump min OS platform in template. 2023-02-07 11:47:48 +01:00
Rolf Bjarne Kvinge 9f55faeee0 Merge remote-tracking branch 'origin/net8.0' into bump-main-in-net8.0-2023-02-06 2023-02-07 07:18:23 +01:00
Rolf Bjarne Kvinge 003c656fea Bump new templates to .NET 8. 2023-02-06 14:59:58 +01:00
Rolf Bjarne Kvinge 61dd7b188b Merge main into net8.0. 2023-02-06 08:49:13 +01:00
Andoni Morales Alastruey 97ab14801f
[dotnet] Add support for .so files (#16887)
Autotools-based project using libtool's -module flag generate plugins
with the .so extension that needs to be treated like DynamicLibraries in
terms of deployment location and relocation, except they are not linked
to the app.

This PR adds support for such .so files: they're treated as .dylib files, except
that they're not linked to the app.
2023-02-03 09:16:40 +01:00
Rolf Bjarne Kvinge e6ef460f77 [dotnet] Bump min macOS version in XIB to 10.15. 2023-02-02 16:30:30 +01:00
Rolf Bjarne Kvinge d43c76363f [dotnet] Bump the default SupportedOSPlatformVersion in templates to a version we actually support. 2023-02-02 16:30:29 +01:00
Rolf Bjarne Kvinge 47a387f670
Add support for Visual Basic projects. (#17409)
* Add props and targets files for Visual Basic.
* Add templates for Visual Basic projects.
* Misc other related changes.

This contributes towards https://github.com/xamarin/xamarin-macios/issues/17321.
2023-02-01 21:20:14 +01:00
Rolf Bjarne Kvinge 7b352f5f26 [net8.0] Merge main into net8.0. 2023-01-31 14:52:18 +01:00
Rolf Bjarne Kvinge e0d64e8f61 [msbuild] Add props and targets files for Visual Basic.
These are just the C# versions changed just enough to use Visual Basic instead of C#.
2023-01-31 13:20:19 +01:00
Rolf Bjarne Kvinge bd74a1c266 [dotnet] Copy localizations from C# templates to the Visual Basic templates. 2023-01-31 13:04:41 +01:00
Rolf Bjarne Kvinge 52850559fb [dotnet] Add templates for Visual Basic projects.
Add a Visual Basic templates for:

* All our platforms (iOS, tvOS, macOS and Mac Catalyst).
* A simple project (the ios, tvos, macos and maccatalyst templates).
* A class library property (the ioslib, tvoslib, macoslib and maccatalystlib templates).
2023-01-31 13:12:48 +01:00
TJ Lambert ef8bdf2470
[Localization] Change the Line Endings (#17403)
Created a ticket asking the Localization team if they can control the
line endings before checking-in the code so that we will not have to
continue doing this:
https://ceapex.visualstudio.com/CEINTL/_workitems/edit/773212

---------

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2023-01-30 16:37:17 -05:00
VS MobileTools Engineering Service 2 9e4b699705
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7255787 (#17392)
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.
2023-01-30 10:34:09 -06:00
Rolf Bjarne Kvinge 1130e1c472 [dotnet] Move templates around a bit to make room for more language-specific project templates. 2023-01-30 17:21:22 +01:00
Rolf Bjarne Kvinge d27667f48a
[dotnet] Change the order of the linker steps. Fixes #17347. (#17360)
The bug manifests like this:

> Could not create an native instance of the type WindowsAzure.Messaging.SBNotificationHub: the native class hasn't been loaded.

which happens because the SBNotificationHub doesn't exist in the final
executable. We asked the linker to link with the static library containing
this type, but the linker didn't link with the library because it didn't need
any of the symbols in it.

We should have collected all the exported Objective-C types from this library
and asked the native linker to keep them, but that didn't happen because:

1. We collect bound Objective-C classes from binding libraries here (the
   ListExportedSymbolsStep): 608765e2c9/tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs (L148-L157)

2. That only happens for attributes with a LinkWith attribute.
	* We compute if an assembly has a LinkWith attribute here:
	  608765e2c9/tools/common/Assembly.cs (L266)
	* Which is called from here:
	  608765e2c9/tools/common/Assembly.cs (L198)
	* Which is called from here (the ExtractBindingLibrariesStep):
	  608765e2c9/tools/dotnet-linker/Steps/ExtractBindingLibrariesStep.cs (L18)

Now, we must obviously compute if an assembly has a LinkWith attribute before
doing anything that depends on that value, but we weren't doing things in that
order.

Changing the custom linker steps to run the ListExportedSymbols step *after*
the ExtractBindingLibrariesStep fixes this logic problem.

Fixes https://github.com/xamarin/xamarin-macios/issues/17347.
2023-01-25 08:59:56 +01:00
Rolf Bjarne Kvinge 50b6eda7c1 Merge main into net8.0. 2023-01-24 15:03:03 +01:00
Rolf Bjarne Kvinge 10accc2cd7
[dotnet/msbuild] Only compile entitlements once for universal builds. Fixes #15632. (#17096)
Fixes https://github.com/xamarin/xamarin-macios/issues/15632.
2023-01-19 16:01:34 +01:00
Rolf Bjarne Kvinge 7d02fa6f4f
[dotnet] Ensure any trimmer components are restored properly. (#17227)
.NET 8 will load the ILLink component based on the target framework of the
project file - so if .NET 8 is building a net7.0-ios app, the build will
restore and use the ILLink component from .NET 7.

There is a problem however:

* The inclusion of the ILLink component is dpendent on the PublishTrimmed
  property - if PublishTrimmed is true, then the ILLink component is restored
  (which makes sense, why restore it if it's not going to be used?).
* We always PublishTrimmed, because the linker must always be executed for our
  projects. So far so good - we can just always enable PublishTrimmed, right?
* Nope, when building on Windows, we only enable PublishTrimmed when connected
  to a Mac, because that's where the ILLink target must be executed (and if
  we're not connected to a Mac, we can't run the ILLink target, and things
  fall apart - so just disable PublishTrimmed in that, since it won't work
  anyway).
* Early on in the build we have no idea if we're connected to a Mac or not,
  which means we can only enable PublishTrimmed in a target, and not as an
  early-on default value. This is *way* to late for the ILLink component,
  which needs PublishTrimmed set quite early in the build process.
* Fortunately, the ILLink inclusion is actually gated on a different variable
  (_IsTrimmingEnabled) - which is initialized from PublishTrimmed if it's not
  set. So the way out here is to set _IsTrimmingEnabled early enough, and now
  the ILLink component is included and restored.
* The additional hurdle is that we need to set _IsTrimmingEnabled in our .NET
  6 and .NET 7 workloads as well, it's not enough to set it in our .NET 8
  workload (which isn't even loaded when building an earlier TFM).
2023-01-16 08:21:09 +01:00
dotnet-maestro[bot] a361cc946a
[net8.0] Update dependencies from dotnet/installer (#16993)
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.NET.ILLink.Tasks**: from 7.0.100-1.22564.1 to 8.0.100-1.23055.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-alpha.1.22558.5 to 8.0.0-alpha.1.23058.7 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-alpha.1.22559.2 to 8.0.0-alpha.1.23058.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: from 8.0.0-alpha.1.22554.1 to 8.0.0-alpha.1.22620.1 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230113.2
- **Date Produced**: January 13, 2023 12:09:55 PM UTC
- **Commit**: e0284b3f3c72d8f21e4825ed1ac723d2e829d0a5
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-alpha.1.22605.6 to 8.0.100-alpha.1.23063.2][191]
  - **Microsoft.NET.ILLink.Tasks**: [from 7.0.100-1.22564.1 to 8.0.100-1.23055.2][192]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-alpha.1.22558.5 to 8.0.0-alpha.1.23058.7][193]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-alpha.1.22559.2 to 8.0.0-alpha.1.23058.2][194]
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: [from 8.0.0-alpha.1.22554.1 to 8.0.0-alpha.1.22620.1][195]

[191]: cbc7313...e0284b3
[192]: 13b8d6d...4b3f78c
[193]: 1bee0af...cefc6cc
[194]: dd7fdb7...5da4a9e
[195]: b6656f5...66b9845

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-01-13 22:53:10 +01:00
Rolf Bjarne Kvinge a0c532afce Merge main into net8.0. 2023-01-10 21:19:12 +01:00
Rolf Bjarne Kvinge 74d7337dcc
[dotnet] Create an MSBuild property for the current min OS version. (#17034)
Create an MSBuild property for the minimum OS version
(`SupportedOSPlatformVersion`) we support for a given platform (named
`[platform]MinSupportedOSPlatformVersion`), and use it in most tests instead
of hardcoding the min OS version (which would otherwise have to be updated
every time we bump the min OS version).
2023-01-10 21:18:39 +01:00
TJ Lambert eae0930fcb
[Localization] Change the line endings to use LF instead of CRLF (#17155)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2023-01-09 10:28:08 +01:00
VS MobileTools Engineering Service 2 a6c71fec74
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7141571 (#17131)
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.
2023-01-05 10:11:06 -06:00
Rolf Bjarne Kvinge 995ceaabc4 Merge main into net8.0. 2022-12-23 10:21:29 +01:00
Timothé Larivière 3b73bb658b
Add an additional F# template for Microsoft.iOS.iOSApp (#16823)
Closes #16822 

This PR adds an F# template to the basic Microsoft.iOS.iOSApp template.
This should allow being able to do either:

```
dotnet new ios -lang C# -n MyApp
dotnet new ios -lang F# -n MyApp
```

I had to move the C# template into a `csharp` folder.
Also added the `groupIdentity` `Microsoft.iOS.iOSApp` and set the identity for both C# and F# respectively to `Microsoft.iOS.iOSApp.CSharp` and `Microsoft.iOS.iOSApp.FSharp`

Co-authored-by: Timothé LARIVIERE <timothe.lariviere@fundourselves.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-12-22 12:04:36 +01:00
Andoni Morales Alastruey efad190de9
[msbuild] Validate OutputType property (#16871)
Fixes #16865

```
➜  test dotnet build  -bl:msbuild.binlog
MSBuild version 17.3.2+561848881 for .NET
/usr/local/share/dotnet/sdk/6.0.403/MSBuild.dll -bl:msbuild.binlog -consoleloggerparameters:Summary -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/local/share/dotnet/sdk/6.0.403/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/local/share/dotnet/sdk/6.0.403/dotnet.dll -maxcpucount -restore -verbosity:m ./test.csproj
  Determining projects to restore...
  All projects are up-to-date for restore.
/usr/local/share/dotnet/packs/Microsoft.macOS.Sdk/12.3.471/targets/Xamarin.Shared.Sdk.targets(284,3): error : WinExe is not a valid output type for macOS [/Users/andoni/Downloads/test/test.csproj]

Build FAILED.

/usr/local/share/dotnet/packs/Microsoft.macOS.Sdk/12.3.471/targets/Xamarin.Shared.Sdk.targets(284,3): error : WinExe is not a valid output type for macOS [/Users/andoni/Downloads/test/test.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.14
```

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-12-22 07:36:04 +01:00
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
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
Rolf Bjarne Kvinge 2ddb7a6d68
[dotnet] Make relase builds for desktop universal by default. Fixes #15620. (#15769) 2022-08-31 16:45:10 +02:00
Rolf Bjarne Kvinge 4922bf4570 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-08-31 2022-08-31 13:45:17 +02:00
Peter Collins ed9aae49da
[workloads] Fix iOS.Windows.Sdk.Aliased.net6 pack name (#15820)
Commit 246aa834 missed a manifest pack entry when renaming packs to
include a `.net6` suffix, producing an invalid manifest and causing MSI
conversion to fail.  Fix this by making sure to use  the `.net6` suffix
everywhere.

Failing build context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6627063&view=logs&j=b4ea4e02-2fcb-5a4a-1d1d-96cc58456a90&t=1ef5c69d-aeda-5369-a23d-e57771ac0882&l=119
2022-08-31 11:18:30 +02:00
Peter Collins e9e037f70c [workloads] Fix manifest.json platform replacement (#15822)
Fixes a string replacement related typo in the generated pack name for
`Microsoft.@PLATFORM@.Windows.Sdk.Aliased.net7`.
2022-08-31 10:21:59 +02:00
Rolf Bjarne Kvinge ff3aeb5073 Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14-2022-08-30 2022-08-30 11:14:47 +02:00
Mauro Agnoletti 6a40697836
Add 'None' build action to ObjC binding items (#15797)
Besides excluding the API definition and core source files from the compilation list, we also need to re-add them as 'None' items so they're still shown in the IDE

Fix related to: https://github.com/xamarin/xamarin-macios/issues/15690
2022-08-30 10:01:23 +02:00
VS MobileTools Engineering Service 2 246aa83443
[main] [ci] Add support to main for multi-targeting in VS (#15786)
Context: https://github.com/xamarin/yaml-templates/pull/180
Context: https://github.com/xamarin/yaml-templates/pull/195
Context: https://github.com/xamarin/yaml-templates/pull/199
Context: https://github.com/xamarin/xamarin-macios/pull/15761

Updates the build to use the latest MSI generation template. The v3
template uses the latest changes from arcade which include a large
refactoring, support for multi-targeting, and support for workload pack
group MSIs.

The build will now produce two different VS Drop artifacts.  The MSI and
VSMAN files generated for SDK packs have been split out into a new
`vsdrop-multitarget-signed` artifact, allowing us to include multiple
versions of the SDK packs in VS.

All of the SDK packs have been renamed to include a `.net6` suffix to
match the pack aliases that will be referenced in the .NET 7 manifests.


Backport of #15776

Co-authored-by: Peter Collins <pecolli@microsoft.com>
2022-08-29 12:08:39 +02:00
Rolf Bjarne Kvinge 38bd8191eb Merge remote-tracking branch 'origin/net7.0' into backport-pr-15761-to-net7.0 2022-08-29 11:55:45 +02:00
Peter Collins 934f677c47 Add MSI and VS Drop changes needed for multitargeting 2022-08-26 11:28:56 -04:00
Rolf Bjarne Kvinge be73bfadae [dotnet] Remove any global usings added by the .NET 6 SDK pack. 2022-08-26 13:36:35 +00:00
Rolf Bjarne Kvinge 61823e4182 [dotnet] Generate the WorkloadManifest.json files and add .net6/.net7 variants in there.
This way a workload restore will get the .NET 7 runtime packs.
2022-08-26 13:36:35 +00:00
Rolf Bjarne Kvinge ba64775ba7 [dotnet] Rework KnownFrameworkReference so that 'net6.0-*' TargetFrameworks work when building with .NET 7. Fixes #15375.
The KnownFrameworkReference now references the exact versions of the ref and runtime
packs we're shipping with the sdk pack, instead of telling the build to use whatever
version is defined in the workload.

Then in the workload we specify the latest released version of the .NET 6 for the
ref and runtime packs.

Finally we add an aliased sdk pack, which points to the .NET 6 sdk pack, and
when we're building a .NET 6 TargetFramework we load this aliased sdk pack
instead of the one we're shipping with this workload.

Putting this together means that:

* When we're building a .NET 7 TargetFramework, we load the sdk pack shipped
  with the workload, which adds a KnownFrameworkReference which references the
  ref and runtime packs with the same version as the sdk pack.
* When we're building a .NET 6 TargetFramework, we load the (aliased) sdk pack
  which points to the latest stable .NET 6 sdk pack. That sdk pack will add a
  KnownFrameworkReference that tells the build to use the ref and runtime pack
  versions specified in the workload - which are now pointing to the .NET 6
  ref and runtime pack versions.

Thus we use the .NET 6 sdk, ref and runtime packs when building a .NET 6
TargetFramework, and we use the .NET 7 sdk, ref and runtime packs when
building a .NET 7 TargetFramework.

According to the workload design spec [1], this is supposed to be implemented
by using aliased ref and runtime packs, but that doesn't work due to
https://github.com/dotnet/sdk/issues/26384.

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

[1]: https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-manifest.md?rgh-link-date=2022-06-30T08%3A25%3A10Z#side-by-side-workload-pattern
2022-08-26 13:36:35 +00:00
Rolf Bjarne Kvinge 4289148b28 Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14-2022-08-26 2022-08-26 13:24:27 +02:00
Rolf Bjarne Kvinge a932ca2d7c Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-08-26 2022-08-26 13:22:24 +02:00
Rolf Bjarne Kvinge a09c1e976c
[dotnet] Honor existing values for BuildIpa and CreatePackage. Fixes #15696. (#15697)
Don't blindly set the BuildIpa and CreatePackage values, but instead only set
them (when publishing) if they're not already set.

This makes it possible to publish and not create a package.

Fixes https://github.com/xamarin/xamarin-macios/issues/15696.
2022-08-25 11:05:09 +02:00
Rolf Bjarne Kvinge 437e0f9fe4 [dotnet] Remove debug code. 2022-08-24 18:00:26 +02:00
Rolf Bjarne Kvinge 105a12d637 Merge remote-tracking branch 'origin/main' into net7.0-merge-main-2022-08-23 2022-08-23 11:08:56 +02:00
Rolf Bjarne Kvinge d66c4da1af Merge remote-tracking branch 'origin/main' into xcode14-merge-main-2022-08-22 2022-08-22 18:38:32 +02:00
dotnet-maestro[bot] 62055c56fb
[net7.0] Update dependencies from dotnet/installer (#15657)
* Update dependencies from https://github.com/dotnet/installer build 20220807.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22407.1

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220808.5

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22408.5

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220809.23

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22409.23

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220810.15

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22410.15

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220812.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22412.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22411.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220813.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22413.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22412.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220814.7

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22414.7

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22412.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220816.2

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22416.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22415.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220817.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.2.22417.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22415.4 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* [dotnet] Include the 'marshal-ilgen' component. Fixes #15668.

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

* [dotnet] Enable serialization discovery in the linker. Fixes #15676.

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

* [tests] Make the dont link tests actually not link for macOS.

* [tests] The 'trimmode copy' test needs an adjustment after recent linker changes.

* [dotnet] Don't set a default 'TrimMode' value.

We already compute a TrimMode value depending on other properties
(MtouchLink/LinkMode - or a default value if those aren't set), and the logic
to compute the default value is not executed if we set a TrimMode default (because
TrimMode overrides any MtouchLink/LinkMode values).

* [tests] Workaround a bug in 'dotnet build'.

Workaround a bug in 'dotnet build' where escaping semicolons interferes with
our ability to pass RuntimeIdentifiers to the build on the command line.

* [dotnet] Update expected bundle contents according to updated runtime.

* [tests] Update expected error message texts.

* Bump to RC 2.

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-08-19 12:53:56 +02:00
Rolf Bjarne Kvinge e54019a336
[dotnet] Make it possible to specify the registrar using a 'Registrar' property in MSBuild. (#15483)
Co-authored-by: Marius Ungureanu <therzok@gmail.com>
2022-08-18 17:21:48 +02:00
Jimmy Reichley b1cb5f62b7
Remove duplicated SceneKitAsset declarations (#15665)
Just happened to come across this when reading through the targets. Been duplicated for 2 years it looks like so 🤷
2022-08-17 14:52:18 +02:00
Jonathan Peppers eba061c862 Add a mkdir to create $(DOTNET_MANIFESTS_PATH) 2022-08-05 18:04:31 -04:00
Jonathan Peppers a135c7e02c Copy 7.0.100 sdk-manifest files
The build was failing with errors like:

    Could not find workload 'microsoft-net-runtime-tvos' extended by workload 'tvos' in manifest 'microsoft.net.sdk.tvos'

I found I could copy the mono/emscripten workloads from 7.0.100 to
7.0.100-rc.1 to get past this.

I looked at the xamarin-android build tree, and we were doing this...

But I don't exactly remember why -- or if it was Peter or I that did it.
2022-08-05 18:04:05 -04:00
Alex Soto 028b85da07 Merge remote-tracking branch 'agocke/set-trimmode-partial' into net7.0-a-new-hope 2022-08-05 17:59:04 -04:00
Alex Soto 1434ede326 Merge remote-tracking branch 'xamarin/main' into net7.0-a-new-hope 2022-08-05 17:58:58 -04:00
Manuel de la Pena 4c4b906bc4 [Xcode14] Merge main into xcode14. 2022-07-26 11:15:34 -04:00
Rolf Bjarne Kvinge 621fc546a9 Fix linking nothing. 2022-07-15 19:12:24 +02:00
Rolf Bjarne Kvinge 9fdae5443d
[dotnet] Use the correct manifest version band. (#15499)
We must use the sdk manifest band when computing the path into sdk-manifests
to install workloads, otherwise they won't be found after installation.

This is a problem when building with .NET 6.0.301, because we want to install
into the sdk-manifests/6.0.300 directory, not sdk-manifests/6.0.301 directory.
2022-07-15 10:26:38 +02:00
Rolf Bjarne Kvinge 786303bb29
[dotnet] Add support for 'make dotnet-install-system'. (#15498) 2022-07-15 09:58:03 +02:00
Rolf Bjarne Kvinge f8ff530796 Merge remote-tracking branch 'origin/main' into xcode14-merge-main-2022-07-12 2022-07-12 14:52:32 +02:00
Rolf Bjarne Kvinge 4c6a35be13 Merge remote-tracking branch 'origin/net7.0' into set-trimmode-partial 2022-07-12 11:48:30 +02:00
Rolf Bjarne Kvinge 5e993ebe49 Merge remote-tracking branch 'origin/main' into net7.0 2022-07-12 11:18:39 +02:00
Rolf Bjarne Kvinge 381ca5e2bc Simplify a bit. 2022-07-12 11:10:17 +02:00
Rolf Bjarne Kvinge 4c3cb2ed51 Fix whitespace 2022-07-12 11:09:25 +02:00
Rolf Bjarne Kvinge 77a16fcc58
[dotnet] Stop hardcoding the TargetFrameworkVersion in the default items template. (#15386)
This prepares us for net7.0 and beyond; no need to update any of this code anymore.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-12 10:34:15 +02:00
Rolf Bjarne Kvinge 3c7c4e7130
[dotnet] Generate the AutoImport.props file for each platform. (#15387)
This reduces some code duplication.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-12 10:00:35 +02:00
Rolf Bjarne Kvinge f7772d4705
[dotnet] Accept invalid runtime identifiers for Restore. (#15357) 2022-07-12 09:37:01 +02:00
Rolf Bjarne Kvinge 620a4ebbd9
[dotnet] Generate Microsoft.<platform>.Sdk.ImplicitNamespaceImports.props. (#15385)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-12 09:34:55 +02:00
Rolf Bjarne Kvinge 4b9d8aef5b Merge remote-tracking branch 'origin/main' into net7.0 2022-07-11 10:51:01 +02:00
Rolf Bjarne Kvinge abbd6ef466
[msbuild/tools] Fix path issues in the FilterStaticFrameworks task and ExtractBindingLibraries step. Fixes #15289. (#15321)
In the FilterStaticFrameworks task:

* Convert Windows-style paths to Mac-style paths.
* Give a better error if a framework can't be found.
* Don't try to copy frameworks that don't exist on Windows to the Mac.

In the ExtractBindingLibrariesStep:

* Return a relative path to frameworks we've extracted to make things easier for
  remote builds.

* In the _ComputeFrameworkFilesToPublish target, don't compute the source
  directory for frameworks using RootDir + Directory, because some frameworks
  may only exist on the mac, and RootDir + Directory will be a Windows path
  when building remotely. Instead use 'Identity', which is a relative path and
  will work on both Windows and Mac.

Fixes https://github.com/xamarin/xamarin-macios/issues/15289.
2022-07-11 10:39:54 +02:00
Andy Gocke b8af230eaa
Update Xamarin.Shared.Sdk.targets 2022-07-10 19:46:37 -07:00
Andy Gocke c558df7524
Merge branch 'main' into set-trimmode-partial 2022-07-10 19:45:16 -07:00
Rolf Bjarne Kvinge ba3223a3f3 Merge remote-tracking branch 'origin/main' into net7.0 2022-07-08 17:03:31 +02:00
Rolf Bjarne Kvinge 1ecd84353f
[dotnet] Fix hang after packing .NET NuGets. Fixes #13355. (#15407)
This has been bothering me for a while... the symptom is that the build just
hangs at the end. Curiously it's never happend on the bots, only locally.

1. It only happens when using parallel make. When using parallel make, make is
   in a jobserver mode, where sub-makes are controlled using a pair of file
   descriptors inherited by the sub-makes. A consequence of this algorithm is
   that the controlling make process will wait until all inherited file
   descriptors have been closed before it will realize that all its sub-makes
   have finished.
2. 'dotnet pack' will build the corresponding project, and that might start a
   background compiler server.
3. This background compiler server does not seem to close any file descriptors
   it inherits.
4. The background compiler server does not necessarily exit by the time `make`
   is done.
5. The result is that `make` things there are still sub-makes doing stuff,
   because there are inherited file descriptors still open.
6. Killing the compiler server (in another terminal for instance) will make
   make realize it's done (and the hang is resolved).

So I'm applying the last point: shutting down the compiler server after
packing all the .NET NuGets.

Fixes https://github.com/xamarin/xamarin-macios/issues/13355.
2022-07-08 16:50:20 +02:00
Rolf Bjarne Kvinge 352a7cb104 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-30 23:54:10 +02:00
Rolf Bjarne Kvinge a9bee06e72
[xcode14] Initial bump. (#15212)
* Use Xcode 14 beta 1
* Bump versions
* Fix numerous issues.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-06-30 17:29:04 +02:00
Manuel de la Pena 9a8d74b880
[Build] Allow to skip the build of Hotrestart. (#15380) 2022-06-30 09:18:42 -04:00
Andy Gocke a14002ad53 Missed a few more places where _LinkMode was used 2022-06-28 12:10:01 -07:00
Andy Gocke d67523d437 Set TrimMode to partial if not set
Companion to https://github.com/dotnet/linker/pull/2856
2022-06-28 11:47:44 -07:00
Manuel de la Pena 8bf0ed7bd1
Merge branch 'xcode14' into xcode14-initial-pr 2022-06-24 12:53:29 -04:00
Peter Collins e39e8e3655
[post-build] Fix Maestro asset publishing (#15339)
Attempts to push build asset information to Maestro started failing
recently:

    D:\a\1\s\xamarin-macios\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21212.6\tools\SdkTasks\PublishBuildAssets.proj(43,5): error MSB4062: The "PushMetadataToBuildAssetRegistry" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\microsoft.dotnet.maestro.tasks\1.1.0-beta.20570.1\tools\netcoreapp3.1\Microsoft.DotNet.Maestro.Tasks.dll. Could not load file or assembly 'C:\Users\VssAdministrator\.nuget\packages\microsoft.dotnet.maestro.tasks\1.1.0-beta.20570.1\tools\netcoreapp3.1\Microsoft.DotNet.Maestro.Tasks.dll'. The system cannot find the path specified.

Commit a1d0b6eb looks like it may have broken this, as it changed the
`globalPackagesFolder` used for NuGet packages across the repo.

Looking at [PublishBuildAssets.proj][0] we should be able to set the
`$(NuGetPackageRoot)` property to the new `globalPackagesFolder` value,
fixing attempts to load `Microsoft.DotNet.Maestro.Tasks.dll`.

[0]: b8007eed82/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishBuildAssets.proj (L32)
2022-06-23 16:31:17 -04:00
Rolf Bjarne Kvinge baf9f82c9e Merge remote-tracking branch 'origin/xcode14' into xcode14-initial-pr 2022-06-22 23:51:52 +02:00
Rolf Bjarne Kvinge 3be1d9d760
Use unix-style line endings in project files. (#15303)
This also removes the BOM in a few project files.

This is a whitespace-only change, as can be seen here: https://github.com/xamarin/xamarin-macios/pull/15303/files?w=1
2022-06-21 17:22:58 +02:00
Rolf Bjarne Kvinge 3e10f01a8d [dotnet] Adjust condition for _ComputeLinkNativeExecutableInputs to ignore the entire target unless connected to a Mac.
Fixes:

> Xamarin.Shared.Sdk.targets(1151,14): error MSB4184: The expression "[MSBuild]::VersionGreaterThanOrEquals('', 14.0)" cannot be evaluated. Version string was not in a correct format.
2022-06-15 16:20:09 +02:00
Rolf Bjarne Kvinge 22f7ad1deb Fix typo. 2022-06-13 12:20:48 +02:00
Rolf Bjarne Kvinge c05e774612 [dotnet/tools] Disable compact unwind on Xcode 14 to fix linker warnings.
Ref: https://codereview.chromium.org/2784253003
Ref: https://github.com/grain-lang/binaryen.ml/pull/136
Ref: https://github.com/ocaml/ocaml/issues/9026
Ref: https://gitlab.haskell.org/ghc/ghc/-/issues/11829
2022-06-13 10:56:02 +02:00
Rolf Bjarne Kvinge be0f63615e Merge remote-tracking branch 'origin/main' into net7.0 2022-06-13 10:12:57 +02:00
David Ortinau 5532f148d8
[Templates] Updated app icons for net6 templates (#15237)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-06-10 22:39:56 +02:00
Rolf Bjarne Kvinge 737717eabc Bump to 7.0. 2022-06-07 17:50:49 +02:00
Rolf Bjarne Kvinge db91c70f41 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-07 11:10:24 +02:00
Rolf Bjarne Kvinge a1d0b6eba9
Make our local .NET the default .NET for the build. (#15086)
Make our local .NET the default .NET (in the root's global.json), and then if
a directory wants to use the system .NET, then that directory would have to
opt-in (using its own global.json).

This way we don't have to copy global.json/NuGet.config files around to run
tests with the correct .NET setup.
2022-06-07 10:11:02 +02:00
Rolf Bjarne Kvinge 5039634a5c
[dotnet] Condition default inclusion on the target framework version. (#15196) 2022-06-07 09:45:16 +02:00
Rolf Bjarne Kvinge d167ae86b8 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-03 13:39:55 +02:00