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

57 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 9d306f3862 Merge main into net7.0. 2022-10-10 13:01:32 +02:00
Mauro Agnoletti cc8c336a2e
[illink] Ensure we replace the dotnet SDK path in the _ExtraTrimmerArgs for remote builds (#16294)
From net7, the original ILLInk targets are adding a new link attribute pointing to a supressions file inside the ILLink tasks folder, e.g: '--link-attributes "C:\Program Files\dotnet\sdk\7.0.100-rc.2.22477.23\Sdks\Microsoft.NET.ILLink.Tasks\build\6.0_suppressions.xml"'.

For remote builds, we need to replace the original dotnet folder with the XMA dotnet folder in the Mac, so in our override targets we replace this value before passing it to the ILLink task
2022-10-08 22:40:21 +02:00
Rolf Bjarne Kvinge ed612dcd6e Merge main into net7.0. 2022-09-28 17:17:10 +02:00
Rolf Bjarne Kvinge 9e0fecc4ff
Autoformat msbuild projects. (#16132)
All other changes should be blank space only: https://github.com/xamarin/xamarin-macios/pull/16132/files?w=1

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-09-28 16:25:35 +02:00
VS MobileTools Engineering Service 2 823c5ba8ec
[main] [6.0.4xx] [msbuild] Use _TrimmerDefaultAction if TrimmerDefaultAction isn't set. (#16130)
The .NET 7 linker targets will set _TrimmerDefaultAction instead of
TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it
will be
for .NET 6), then use _TrimmerDefaultAction (which should be set for
.NET 7).

Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so
we'll
have to wait a bit to see what happens then.

Ref: https://github.com/xamarin/xamarin-macios/issues/16125.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047.


Backport of #16126

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-26 19:49:48 -04: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
Emanuel Fernandez Dell'Oca 4b49ddda8f
[msbuild] Hot Restart fixes (#15979)
Adds missing css files needed on Maui Blazor apps and avoids copying unnecessary files into the bundle (overdue task since the .NET migration).

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-16 17:31:04 +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 7e20a09b28
[msbuild] Ignore MSB3246 in Xamarin.iOS.Tasks.Windows to avoid a warning about a dll which isn't an assembly. (#15887) 2022-09-09 17:10:41 +02:00
Rolf Bjarne Kvinge 9f0b794d28 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-09 2022-09-09 16:55:20 +02:00
Rolf Bjarne Kvinge 316d371d83
[msbuild] Use 'netstandard2.0' as the target framework in every project. (#15796)
Fixes this compiler warning:

    /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1733,5): warning : ProjectReference 'xamarin-macios/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj' was resolved using '.NETFramework,Version=v4.7.2' instead of the project target framework '.NETStandard,Version=v2.0'. This project may not be fully compatible with your project. [xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj]
2022-09-09 13:22:16 +02:00
Rolf Bjarne Kvinge 2558c98c7c
[msbuild] Take the .NET version into account when computing the illink.dll location. (#15876)
We use illink.dll from the executing .NET version: if we're building with .NET
7, then we're using illink from .NET 7. This means we can't hard-code 'net6.0'
when computing the path to illink.dll for remote builds.

Fixes https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1611403.
2022-09-07 21:10:25 +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 40298d2cf5
[msbuild] Ignore NU1701 in Xamarin.iOS.Tasks.Windows to avoid a BouncyCastle warning. (#15864) 2022-09-07 10:39:24 +02:00
Rolf Bjarne Kvinge 94db59d841
[msbuild] Ignore NU1603 for XVS package references. (#15805)
Fixes these NuGet warnings:

    xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj : warning NU1603: Xamarin.iOS.HotRestart.Client 1.0.93 depends on Merq (>= 1.1.1) but Merq 1.1.1 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
2022-08-31 18:26:46 +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
Mauro Agnoletti 6617121585
Fixed remote archiving with iOS app extensions (#15726)
- Fix AppExtensionReferences ItemSpec in Archive:
 when the build is a remote build, we need to fix the ItemSpec of the AppExtensionReferences items so it uses the build server path correctly

- Shorten temp directory for remote zip extractions to avoid long path potential conflicts

Fixes Feedbak Ticket issue: https://developercommunity.visualstudio.com/t/Xamarin-iOS-project-wont-archive-anymor/1587820
2022-08-23 12:21:17 +02:00
Alex Soto 0e53b999d2
[net7.0] Updates the path to illink when building from Windows (#15667)
The directory that contains illink.dll is now net7.0
2022-08-10 16:39:45 -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
Rolf Bjarne Kvinge 78020cbaba
[msbuild] Remove dead code from the Codesign task. (#15519)
Fixes this warning:

    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Tasks/Codesign.cs(12,27): warning CS0649: Field 'Codesign.cancellationSource' is never assigned to, and will always have its default value null [xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj]
2022-07-27 10:21:45 -04:00
Emanuel Fernandez Dell'Oca c957b0402a
Ensure the Hot Restart bundle does not have any entitlements set (#15558)
Hot Restart expects the archived-expanded-entitlements.xcent to be empty. If any entitlements are added to that file, the new app signature will be invalid.

These changes ensure that file will be an empty plist when extracting the PreBuilt app.

Partial fix for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1550700
2022-07-21 16:17:20 -04:00
Andy Gocke c558df7524
Merge branch 'main' into set-trimmode-partial 2022-07-10 19:45:16 -07:00
Andy Gocke 6854d31701 Update DefaultAction call 2022-06-30 22:44:10 -07:00
Emanuel Fernandez Dell'Oca 7ad9f88939
[msbuild] Fixes Hot Restart compiled Entitlements output path (#15125)
The compiled entitlements should be placed in the intermediate Hot Restart app bundle so those can be picked up by the HotRestart Codesign task. Prior to this change, entitlements set in the project wouldn't be included in the app, making things like Keychain Access fail, even though it was configured.

Fixes https://developercommunity.visualstudio.com/t/Unable-to-use-MSAL-with-locally-connecte/1573064
2022-05-30 12:34:20 +02:00
Mauro Agnoletti 31c54460d5
Avoid executing _VerifyXcodeVersion when there's no connection to a Mac (#15026)
This should fix an annoying warning where the user builds an iOS project offline and get a message about that target couldn't be executed
2022-05-16 12:30:49 +02:00
Rolf Bjarne Kvinge a9a638553f
[msbuild/dotnet] Fix building binding projects on Windows in .NET (#14704)
When building a binding project, we need to execute bgen (and csc) on the mac. Figuring
out where these files are on the Mac is rather complicated from a remotely executed
task, so instead we execute a sub-build that computes these properties.

In legacy Xamarin this was accomplished by building the 'Xamarin.iOS.ObjCBinding.Common.props'
file using msbuild, and invoking a custom target that prints the property we're looking
for (the 'targetGetPropertyValue_*' targets).

For multiple reasons this approach doesn't work in .NET anymore (in particular it
seems that the 'Xamarin.iOS.ObjCBinding.Common.After.targets' file with the custom
'targetGetPropertyValue_*' targets is nowhere to be found, but logic has also moved
around in the .targets/.props files which makes just building the 'Xamarin.iOS.ObjCBinding.Common.props'
not work correctly since the properties we need wouldn't be set).

So I'm adding a new task that does a sub-build, using either msbuild or dotnet as
appropriate, to compute the properties we need. Instead of building the 'Xamarin.iOS.ObjCBinding.Common.props'
file, the task creates an actual binding project (an empty one), and executes the
new '_WriteRemoteGeneratorProperties' target in this binding project.

An additional advantage in this new task is that it will only execute one sub-build
where all the properties are computed (the previous approach executed one sub-msbuild
per property).

In order to keep code as similar as possible between legacy Xamarin and .NET, the
new task is being used for legacy Xamarin as well (and the old approach deleted).

This fixes building binding projects on Windows in .NET.
2022-04-22 16:17:03 +02:00
Rolf Bjarne Kvinge 690f18385d
[msbuild] Enable nullability for the CompileAppManifest task. (#14670)
This also meant:

* Using 'latest' as the C# language version for all msbuild/ project files.
* Enabling warnaserror for nullability warnings.
* Fix any nullability warnings in the CompileAppManifest files.
* Fix a nullability warning in the Ditto task.
* Fix any '== null' or '!= null' to use 'is null' and 'is not null'.
2022-04-06 22:57:10 +02:00
Mauro Agnoletti 4cee76e0e1
Improvements on Xamarin.iOS.Tasks.Windows (#13862)
* Changes covered by this PR:

   - Removed unused references
   - Removed Xamarin.PreBuilt.iOS.app.zip since it's now built and included automatically as part of the CI build
   - Added missing signing and versioning
   - Replaced DotNetZip with System.IO.Compression.ZipFile: now that .net provides its own zip implementation we no longer require DotNetZip reference for unzipping purposes
   - Fixes the Tasks missing CodePages reference: we no longer need to replace the CodePages reference assembly by its implementation, since this project already specifies the `win` RID. The replacement was failing because `RuntimeTargetsCopyLocalItems` is empty now that the RID is set, so we ended up removing the reference.

Co-authored-by: Emanuel Fernandez Dell'Oca <ema@xamarin.com>
2022-02-10 14:20:33 +01:00
Mauro Agnoletti 165924f83a
Ensure we remotely copy all project pdbs and not only the main app one (#13650) 2022-01-06 08:00:15 -05:00
Mauro Agnoletti 9e4eaf1f1c
[hotrestart] Fixed MSBuild outputs when using $(AppBundleManifest) (#13629)
We only want the file name of the app manifest path to define the outputs because the app manifest will be always located at the app bundle root level.
For MAUI, the app manifest source file could be located on a sub-folder (like \Platforms\iOS\Info.plist) so if we take the full value of the property we will end up looking the manifest in the wrong place inside the app bundle, causing the inputs/outputs checks to fail and forcing many tasks to always run (like code sign), also causing unwanted behaviors like breaking incremental builds and incremental deployments

Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-01-04 07:10:40 -05:00
Rolf Bjarne Kvinge 342b312a73
Our current behavior is to detect any None, BundleResource or Content item that's (#13550)
named 'Info.plist', and assume that's the app manifest.

That doesn't quite work when we end up with multiple 'Info.plist' entries in any
of those item groups (one example being a framework as a BundleResource - all frameworks
have an Info.plist, and there's no good way to distinguish what the developer's intention
was).

So:

1. Implement a 'AppManifestDetectionEnabled' property to disable automatic app manifest
   detection.

2. Add a public 'AppBundleManifest' property that specifies the app manifest
   (this is just a renamed version of our previously private '_AppManifest' property).

This makes it possible for app developers to:

* Disable automatic app manifest detection.
* Still have an app manifest by specifying it manually.
* Disable automatic app manifest detection, but also not specify an app manifest
  manually (so no custom app manifest at all).

Also:

* Rename '_AppBundleManifest' to '_AppBundleManifestPath' to make it less confusing
  with the new 'AppBundleManifest' property.
2021-12-14 20:56:52 +01:00
Mauro Agnoletti b2678a413c
Updated Hot Restart client package (#13029) 2021-10-20 07:45:34 +02:00
Rolf Bjarne Kvinge f12d09f405
[msbuild] Share the CompileEntitlements task implementation between iOS and macOS. (#12946) 2021-10-07 08:17:50 +02:00
Mauro Agnoletti ac3325f518
Fix CopyDSYMFromMac target to copy *.DSYM to the right path in Windows (#12811)
The working directory on the Zip task was causing relative paths to be used and the resulting zip file to have unnecessary sub folders
2021-09-23 07:59:12 +02:00
Peter Collins 56dd828392
[build] Add missing Hot Restart symbol files. (#12587)
Commit 91c6517f missed a few symbol files because it was tested against
a version of Hot Restart assemblies that had already been inserted into
VS.  The Hot Restart package version bump in commit fbbaa7fc triggered
a couple of new SymbolCheck issues that can be fixed by bringing in the
previously missed pdbs.
2021-09-06 17:14:18 +02:00
Peter Collins 91c6517f28
[ci] Opt in to symbol archiving during VS insertion (#12547)
Context: https://github.com/xamarin/yaml-templates/pull/131

Enables conversion and archiving of symbol files during the VS insertion
stage.  Symbol archiving steps will only run if both the
`symbolArtifactName` parameter is provided, and `archiveSymbols` is set
to true.  The `symbolConversionFilters` parameter can be used to filter
out paths of symbol files that should not be converted/archived.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-27 12:32:46 +02:00
Emanuel Fernandez Dell'Oca fbbaa7fca3
Fixes Hot Restart build issues (#12500)
* [net6] Bumps Xamarin Hot Restart to 1.0.70

This version contains fixes for building Maui projects with Hot Restart

* [msbuild] Fixes Hot Restart Entitlements.plist compilation

The build was failing if `CodesignEntitlements` was not set, even though the CompileEntitlements task has a default value. That default value is not compatible with Hot Restart because it is a template file that exists on the Mac (and Hot Restart is an offline build from Windows).

So if that property is not set we get the xcent file from the Hot Restart PreBuilt app bundle, which is essentially an empty plist.

* [net6] Makes Hot Restart consider Single Project app title

On a Maui Single Project the app title can be set on the project file using the `ApplicationTitle` property. If that's set Hot Restart should include that value in the compiled app manifest, so the app name is shown on the device when the app is deployed.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-24 08:13:27 +02:00
Emanuel Fernandez Dell'Oca 643a924f09
[dotnet] Updates the path to illink when building from Windows (#12501)
The directory that contains illink.dll was renamed to net6.0
2021-08-23 11:10:11 +02:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Emanuel Fernandez Dell'Oca ff56f32c77
[net6] Stops replacing custom linker steps on Windows (#12362)
The `_AdditionalTaskAssembly` prop was already fixed by 7c66aa3829, so we don't need to do this anymore. This breaks building from Windows because we're missing custom steps.

I missed adding this file to that commit.
2021-08-06 10:25:33 +02:00
Mauro Agnoletti 9dbf451d39
Added Hot Restart support into the SDK (#12293)
- Added Hot Restart support for net6
- Added Hot Restart content into the Windows iOS pack

Co-authored-by: emaf <ema@xamarin.com>
2021-08-05 09:19:51 +02:00
Rolf Bjarne Kvinge 7ac5b95bd7
[dotnet] Remove workaround for dotnet/runtime issue with incorrect dylibs. (#11815)
The runtime issue has been fixed for a while now, so we don't need the
workaround anymore.

Ref: https://github.com/dotnet/runtime/issues/34637
2021-06-07 08:35:17 +02:00
Emanuel Fernandez Dell'Oca 2df2665e4c
[msbuild] Fixes build errors from Windows (#11619)
* [msbuild] Fixes watchOS builds from Windows

We need to make sure the MSBuild is connected to XMA before generating the Bundle name (mostly for watchOS and app extension), so the `BuildServerPath` is correctly generated. `_GenerateAppBundleName` and `_GenerateAppExBundleName` do not exist anymore, so instead we should be running `_SayHello` before `_GenerateBundleName`.

* [msbuild] Fixes building binding libraries from Windows

If there's no SessionId we just need to execute the base class and return, because that means we only want to run the task locally.

Besides this was wrong, there was not side effects for builds from macOS because it was running the task locally and then trying to run it remotely, since there is not connection from macOS the whole process was skipped. When building from Windows this fails to run from the XMA Build agent on the Mac because it uses a custom BuildEngine that's not compatible with re-executing tasks remotely (remotely from the agent on the Mac).
2021-05-20 10:56:23 -04:00
Emanuel Fernandez Dell'Oca 2aa6c5aa6b
[dotnet] Fixes _RunILLink from Windows for Preview 4 (#11390)
There were some changes on the original target.
2021-04-30 08:46:51 +02:00
Peter Collins b88c3bb031
[build] Create Microsoft.iOS.Windows.Sdk workload pack (#11251)
Converts the Microsoft.iOS.Windows.Sdk NuGet package into a proper
[workload SDK pack][0].  The entry point for this pack has been changed,
and it is now imported through the `WorkloadManifest.targets` file
included in `Microsoft.NET.Workload.iOS`, rather than being imported
directly from `Microsoft.iOS.Sdk`.

Import ordering has otherwise changed slightly.  The following files are
now imported before the majority of the `Microsoft.iOS.Sdk` (and the 
majority of the .NET SDK targets):

 * Xamarin.iOS.Common.Before.props
 * Xamarin.iOS.Common.Before.targets

After this the majority of the .NET SDK targets will load, followed by
the `Microsoft.iOS.Sdk` targets. Finally, everything declared in the
`<AfterMicrosoftNETSdkTargets/>` hook loads, which consists of:

 * Microsoft.iOS.Windows.Sdk.targets
 * tools/msbuild/*

[0]: https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-manifest.md#sdk-packs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-04-27 07:44:51 +02:00
Emanuel Fernandez Dell'Oca 7415b898f8
[dotnet] Sets missing ILLink parameter from Windows (#11319)
This was making the linker to not behave correctly, and apps were crashing on the simulator.
2021-04-26 10:06:34 +02:00
Emanuel Fernandez Dell'Oca 9afd2aa300
[msbuild] Fixes DebugType for VS (#11297)
We stopped converting full pdbs to mdbs on Windows, so we need to override the `DebugType` property to `portable` if it's `full`, otherwise the debugger won't work from Visual Studio.
2021-04-23 15:55:05 +02:00
Emanuel Fernandez Dell'Oca 965ab98b84
[msbuild] Fixes archiving and copying files to Windows (#11277)
* [msbuild] Fixes Windows task namespace

* [msbuild] Fixes unzipping files from Windows

This is the same approach we're using on the Xamarin.iOS.Tasks project, we need to replace the System.Text.Encoding.CodePages reference assembly by it's runtime implementation before ilmerging it, otherwise when trying to unzip files from Windows we'll get a null ref exception because that's what the ref assembly implemented.

* [msbuild] Try to copy output to Windows before ending the XMA connection

When relying on BuildDependsOn we can end up running the targets after _SayGoodBye, which ends the XMA connection. `CopyDSYMFromMac` and `CopyAppBundleFromMac` need an active connection, since both copy files from the Mac to Windows.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-22 12:02:38 +02:00
Emanuel Fernandez Dell'Oca 6dfb470e74
Reenable HotRestart targets for the legacy Sdk (#11169)
There's no Hot Restart support for net6 yet, but we should still import those targets if the file exist, because are needed on the legacy iOS Sdk on Windows.
2021-04-09 11:20:05 -04:00
Mauro Agnoletti c9d1760cfc Fixing CoreiOSSdkDirectory definition for legacy project system
The way that CoreiOSSdkDirectory was definded ($(MSBuildThisFileDirectory.Replace('...', '...'))) was returning an encoded string value that caused issues in legacy project systems. The reason of the issues is that the CoreiOSSdkDirectory value for legacy project systems is `Program Files (x86)`, and the "Replace'" function was encoding the '(' and ')' causing the "UsingTask" for fail because the Assembly File path was wrong (because it contains those encoding values).

The fix consist of applying the "Replace" function only when the path of the targets belongs to a .net SDK path, in which case it won't fail because it's under "Program Files".

We need to discuss with the MSBuild team to show this issue and know if it's a bug or how we can avoid the failure
2021-03-18 18:20:24 -03:00