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

132 Коммитов

Автор SHA1 Сообщение Дата
Emanuel Fernandez Dell'Oca 616d6544ad [msbuild] Improve altool task by logging execution errors (#6815)
* [msbuild] Improve altool task by logging execution errors
The altool task was just logging the XML output produced by the tool execution but was not logging any build error neither failing in that case.

* [msbuild] Log the altool output when failing to parse it
2019-08-23 08:38:08 -07:00
Oleg Demchenko 3b293f5afe [vsts-938452] Add ALToolTaskBase.cs to Xamarin.MacDev.Tasks.Core.csproj 2019-08-07 16:10:32 -04:00
Oleg Demchenko 0fa3511948 [vsts-938452] Revert changes in Xamarin.MacDev.Tasks.Core.csproj 2019-08-07 16:10:21 -04:00
Oleg Demchenko 0b3ab2b777 [vsts-938452] Apply suggestion from Rolf 2019-08-07 16:10:09 -04:00
Oleg Demchenko be654adc70 [vsts-938452] Clean up file names and indentations 2019-08-07 16:09:58 -04:00
Oleg Demchenko b5ea7813a0 [vsts-938452] Add SesssionId to ALToolTaskBase 2019-08-07 16:09:32 -04:00
Oleg Demchenko 46dfc93ed9 [vsts-938452] Refactor altool upload and verify tasks to actually work 2019-08-07 16:08:39 -04:00
Oleg Demchenko a610df25ab [vsts-938452] Output altool logs in xml format 2019-08-07 16:08:25 -04:00
Oleg Demchenko 751f171c2c [vsts-938452] Add altool upload and verify draft implementations 2019-08-07 16:08:12 -04:00
Rolf Bjarne Kvinge 626a859a46
[xcode11] Fix several issues to make the mtouch tests pass. Fixes #6259. (#6332)
* [tests] Minor refactor to get better Xcode version parsing.

* Rename Configuration.XcodeVersion to XcodeVersionString.
* Add Configuration.XcodeVersion a parsed Version instane of XcodeString.

* [tests] Ignore all 'MT0099: Not linking with WatchKit because Xcode 11 beta 1' warnings in tests.

* [tests] Adjust min OS version tests for Xcode 11b1.

* [tests] Adjust tests for changes in 'nm' output.

* [tests] Adjust tests for name changes in Clang.

* [tests] Adjust tests for changes in ld warning format.

* [msbuild] 'metal' and 'metallib' aren't in PATH anymore, so use xcrun to execute them.

* [msbuild] Fix DevicePlatformBinDir for the Metal and MetalLib targets on iOS.

Also set the SDKROOT variable, otherwise metal and metallib don't work
properly, and revert the previous attempt at a fix (use xcrun).

* [tests] Simplify version parsing code to not version parse anymore.

* [tests] Add FIXME for once Apple fixes the WatchKit disappearance.
2019-06-19 07:20:02 +02:00
monojenkins 3cd018b55c [msbuild] Lock variables accessed in a Parallel.ForEach callback. (#6189)
Lock variables accessed in a Parallel.ForEach callback, since the callback
must be thread-safe because it's executed in parallel using multiple threads.
2019-06-03 12:59:59 +02:00
monojenkins 5f6c7bb05e Add more details to MSBuild errors for provisioning profiles (#5987) 2019-05-06 07:28:54 +02:00
William Kent dc8e07f678 Add macOS Xcode archive support (#5862)
* Initial commit of ArchiveTaskBase for macOS

* Fix namespace

* Add concrete Archive task

* Add Archive target to Xamarin.Mac.Common.targets

* Remove TODOs for non-applicable items

* Add more properties to archive Info.plist

* Add more parameters to Archive task

* Set the ArchiveDir output parameter

* Move ITunesSourceFiles parameter

* Add test

* Fix msbuild mistakes preventing archive from working

* Reorder ApplicationProperties to be at top like iOS

* Add note

* Improve error handling

* Fix archive to be loadable in Xcode

* 4 spaces to tabs

* More space -> tab
2019-04-15 15:20:18 -05:00
Chris Hamons b777aba9f6
[msbuild] Xamarin.Mac Notary Support (#5754)
* Add --timestamp to hardened XM builds and --timestamp=none to rest
2019-03-13 10:54:01 -05:00
Chris Hamons 5680a39c77
[xm] Support UseHardenendRuntime in code signing (#5536)
- Solves SDK portion of https://github.com/xamarin/xamarin-macios/issues/4288
2019-02-22 09:06:58 -06:00
Rolf Bjarne Kvinge fa09467f8a
[msbuild] Add space to arguments when adding a newline at the end as well. (#5533)
Example (previous behavior):

    args.Add ("-a");
    args.AddLine ("-b")
    args.Add ("-c");

would result in:

    -a-b
    -c

which is obviously not correct.

New result:

    -a -b
    -c

which is much better.
2019-02-01 20:31:13 +01:00
Emanuel Fernandez Dell'Oca 7e41ef7d3e Fixes spacing issues in MSBuild tasks (#5338) 2019-01-03 14:03:08 -05:00
Emanuel Fernandez Dell'Oca 2cc7fb1987 [msbuild] Fixes incremental build issues with frameworks from VS (#5249)
* [msbuild] Adds output property for unpacked resources

This output property will be used by VS to create/touch output files on Windows only for the unpacked resources and not for all the resources found.

Partial fix for bug 662636 - *.dylib libraries are signed during full rebuild, but not the second time
https://devdiv.visualstudio.com/DevDiv/_queries/edit/662636

* [msbuild] Adds output property with copied frameworks to MTouchTaskBase

This property is needed from VS to know Frameworks where changed as a result of the mtouch execution. The lack of this information was causing MSBuild to skip the CodesignFrameworks target (from Windows) on incremental builds if the frameworks were copied to the app bundle by mtouch.

Partial fix for bug 662636 - *.dylib libraries are signed during full rebuild, but not the second time
https://devdiv.visualstudio.com/DevDiv/_queries/edit/662636
2018-12-19 07:55:01 +01:00
Chris Hamons d7c2a45ca9
Add 'NoBindingEmbedding' style binding project support (#5167)
- Existing binding projects embed the native libraries within the assembly as managed resource
- This does not scale well and has performance implications
- This PR creates a new property, NoBindingEmbedding which when true processes the building and consumption of binding projects differently.
- Existing binding projects are not affected, they will continue as is
- I've written a full XM test suite and ported a subset to iOS. Since iOS only supports checked in projects, and I didn't want to make the existing situation worse by adding more, I only wrote tests that could use the existing test projects.
    -When we complete some form of msbuild testing reform, we'll revisit these tests.
- Remove two files in MyiOSFrameworkBinding that are not used (we use copies elsewhere)
- Remove unnecessary sleep and fix broken touch command
- Output failing test log to console instead of test output
    - VSfM does not handle thousands of lines of test failure message well
- Add ability to generate binding projects with LinkWith
2018-12-12 09:55:57 -05:00
Jeffrey Stedfast 530f848ac9 [msbuild] Fixed compilation of SceneKit assets in library projects (#5130)
The problem is that AppBundleDir never gets defined for library projects.

Luckily, _AppBundleName and AppBundleExtension are always defined and
all we need is the directory name (i.e. MyApp.app), so this will work
just fine.

Fixes issue #5129
2018-11-18 16:35:02 -05:00
Jeffrey Stedfast 6ebf136073
[msbuild] Pass ProjectGuid and ProjectTypeGuids to Archive task (#5118)
This is part of https://devdiv.visualstudio.com/DevDiv/_workitems/edit/705977
2018-11-15 17:13:27 -05:00
Vincent Dondain f389c03970 [msbuild] Don't log notices as errors (#5067)
- Fixes #5065: [Xcode10.1]Could not get traitsetID for iPhone11,6 error while building with Xcode10.1 and new iOS device
  (https://github.com/xamarin/xamarin-macios/issues/5065).
- `actool` in Xcode 10.1 now outputs some `com.apple.actool.notices` (we might not have hit that before) and those make the task fail because we log them as errors (we shouldn't).

* Lower notice to LogMessage

Update other LogMessage to output "tool notice :"
2018-11-01 14:08:31 -04:00
Emanuel Fernandez Dell'Oca 2922becfd2 [msbuild] VS Incremental build fixes (#5054)
Most of these changes are needed from VS to make incremental builds work.

The problem here is VS runs MSBuild on Windows and remotes (most of) the task executions to the Mac. Since MSBuild is running on Windows the inputs and outputs are checked there, but the output files won't be created on Windows unless those are explicitly declared as output ITaskItems of a task. VS don't copy every file created on the Mac back to Windows because that will increase the build time unnecessarily.

For instance, the _GenerateFrameworkDebugSymbols target was using the Info.plist file created by the dsymutil tool as output, but that file was not declared as ITaskItem output of the DsymUtil task so VS didn't know that file should be created on Windows.

This doesn't mean every task should have an output property declaring ITaskItems, but if you're writing a target that will use certain files as output those files should be output of one of the tasks that target is running.

Partial fix for https://dev.azure.com/devdiv/DevDiv/_workitems/edit/710309.
2018-10-31 15:05:07 -04:00
Sebastien Pouliot eaa6435e89
[msbuild] Avoid an NRE in BtouchTask when an invalid extra argument is provided (#5041)
The task itself should not throw. An invalid argument is an error that
should (and is) reported by `btouch` itself (and the task picks it up).
This makes the error reporting much more useful and the way an exception
is reported, from Windows, is also confusing
```
MessagingRemoteException: An error occured on client Build4110732 while executing a reply for topic xvs/Build/4.11.0.732/execute-task/ClassLibrary1/6e85b94002fBTouch ArgumentNullException: Value cannot be null.
```

Unit tests added.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/656983
2018-10-26 13:18:05 -04:00
Sebastien Pouliot 99641c7fcd
[msbuild] Avoid possible NullReferenceException in ScnToolTaskBase. Fixes #4039 (#5006)
`EnvironmentVariables` can be null (not empty) and cause the NRE in the
attached test case.

It's not clear that the extra logic is needed if we were using `xcrun`.
There's an enhancement for this https://github.com/xamarin/xamarin-macios/issues/4634

reference: https://github.com/xamarin/xamarin-macios/issues/4039
2018-10-18 14:03:17 -04:00
Rolf Bjarne Kvinge 745c18cc73 Merge remote-tracking branch 'origin/master' into msbuild-port 2018-10-11 07:31:58 +02:00
Jo Shields 6f2ebedb74 Bump to mono:2018-06 (#4277)
* Bump to mono:2018-06

* Bump mono

* Updates compression to work with the public span

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Bump Mono

* [runtime] always use `mono_jit_set_aot_mode` (#4491)

`mono_jit_set_aot_only` is deprecated and accidentally broke with
https://github.com/mono/mono/pull/7887

This should fix device tests with `mono-2018-06`

* Testing with Zoltan's patch

* Include libmono-system-native on Xamarin.Mac

* Bump Mono

Commit list for mono/mono:

* mono/mono@7bcda192a0 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804)
* mono/mono@23e95ec7ad Apply F# portable pdb debug fix for pinvokes & bump (#9797)
* mono/mono@295f6d32af [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696)

Diff: 7d5f4b6136...7bcda192a0

* Revert 4bacab3d5c, it doesn't fix the ios aot problems.

* Bump mono

* [tests] Adjust the MT0137 test for mcs change in behavior.

Starting with mono 5.16 mcs will now add assembly references when the assembly
is only used in attributes (this was already the case for csc in both 5.14 and
5.16, so it seems to be a compatibility change).

Adjust the MT0137 test accordingly.

* [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message.

Fixes this test:

    1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException
         ColumnNumber
      Expected: 2
      But was:  0

* Bump mono

* [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that.

* Bump mono

* Bump mono

* [jenkins] Don't give VSTS a fake branch. (#4667)

Something in VSTS changed, and now fake branch names don't work anymore.

So instead use real branch names (and for pull requests I've created a
'pull-request' branch we can use).

* Assembly.LoadFile accepts only absolute path

* [linker] Add new Facade (System.Threading.Tasks.Extensions).

Fixes these MTouch test failures:

    1. Xamarin.Linker.SdkTest.iOS_Unified :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

    2. Xamarin.Linker.SdkTest.tvOS :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

    3. Xamarin.Linker.SdkTest.watchOS :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

* [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732)

* Bump Mono

* [mtouch] add mixed-mode support (#4751)

* [mtouch] add --interp-mixed option

When enabling this option, mtouch will AOT compile `mscorlib.dll`.  At
runtime that means every method that wasn't AOT'd will be executed by
the runtime interpreter.

* [mtouch] Add support to --interpreter to list the assemblies to (not) interpret.

* [msbuild] Simplify interpreter code to use a single variable.

* Fix whitespace.

* [mtouch] Move mtouch-specific code to mtouch-specific file.

* [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property.

* [mtouch] Add sanity check for aot-compiling interpreted assemblies.

* Bump Mono

* [linker] Updates SDKs facades list

* Bump mono

* [msbuild] Adds facades which might override default nuget version to framework list

The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs

* Bump to a VSfM version that can build XM Classic projects.
2018-10-10 11:02:28 -04:00
Rolf Bjarne Kvinge 0d65ed9357
[msbuild] Fix SceneKit asset compilation. Fixes #3766. (#4851)
* [msbuild] Fix SceneKit asset compilation. Fixes #3766.

It seems SceneKit assets must be compiled into a directory whose parent
directory is named like the app.

In addition the `--resource-folder-path` argument is required.

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

* [msbuild] Use AppBundlePath to get correct .app[ex] variant.

* [msbuild] Fix XM builds.

* [msbuild] Use AppBundleDir instead of AppBundlePath.
2018-09-24 18:42:04 +02:00
Jeffrey Stedfast 2d25af6412 [msbuild] pass --target-platform=<platform> to copySceneKitAssets (#4630)
The copySceneKitAssets program has a poor command-line options
parser that cannot handle --target-platform and its argument
being 2 separate arguments, they have to be combined with an '='.

Fixes https://github.com/xamarin/xamarin-macios/issues/4467
2018-08-20 08:40:11 -04:00
Jeffrey Stedfast 415d55dd2d [msbuild] Make PropertyListEditor.Value a property like it should be (#4522) 2018-07-30 19:35:42 -04:00
Rolf Bjarne Kvinge 516aab9143 Merge remote-tracking branch 'origin/master' into msbuild-port 2018-07-27 09:43:14 +02:00
Jeffrey Stedfast 21936948bb [msbuild] Xcode10 changed the copySceneKitAssets command-line arguments (#4469)
Fixes https://github.com/xamarin/xamarin-macios/issues/4467
2018-07-24 14:05:07 -04:00
Jeffrey Stedfast 6a3481db52 [msbuild] Log the name of the ibtool/actool log file if we cannot parse it (#4115)
Improves diagnostics for https://github.com/xamarin/xamarin-macios/issues/4096
2018-05-23 17:45:57 -04:00
Ankit 16e512af5d Revert "[msbuild] Add forward compatibility with symlinks support (#648)"
This can be reverted as we have now moved to msbuild assemblies, and
they already have this property.

This reverts commit d45f52f1c1.
2018-05-22 14:19:39 -04:00
Ankit 256035e11d [msbuild] Update xbuild assembly references to msbuild ones
.. and switch from v4.0 to the new .Core assemblies.
2018-05-22 13:26:55 -04:00
Jeffrey Stedfast c00654af82 [msbuild] Updated MetalTaskBase to use the new -m{os}-version-min argument (#4049)
Fixes issue #4019
2018-05-10 08:57:33 -04:00
Jeffrey Stedfast bb89506eb1
[msbuild] Catch ArgumentException if IBToolTask fails to load plist o… (#3905)
* [msbuild] Catch ArgumentException if IBToolTask fails to load plist output

Fixes the stack trace spew in https://devdiv.visualstudio.com/DevDiv/_workitems/edit/595179

* [msbuild] Catch all exceptions in XcodeCompilerToolTask's manifest loader
2018-04-11 10:28:09 -04:00
Chris Hamons 1d72f45dfd
Binding project must use csc not mcs (#3795)
- Fix XM and XI binding projects to use csc instead of mcs
- Add BindingProjectTest to verify csc not mcs for XM
- In non-msbuild use cases, removing -sdk params requires adding System/mscorlib so btouch now knows to add those references.
- Obsolete a few arguments to btouch
2018-03-27 14:31:27 -05:00
Vincent Dondain 97ef51bf8b
[msbuild] Use a response file in 'MTouchTaskBase' (#3635)
The main cause of the warning: "warning MSB6002: The command-line for the 'MTouch' task is too long" was the number of references that can be passed to `mtouch`.
Now all the arguments are written in a response file which in turn is passed to `mtouch`.

- Fixes bug #56501: MSB6002 command-line for MTouch task is too long, > 32000 characters
(https://bugzilla.xamarin.com/show_bug.cgi?id=56501)
- The response file is created in the device specific folder, as `response-file.rsp`. It is re-created every time.
- Added an msbuild test to ensure the response file is created by `GenerateCommandLineCommands` and that it includes all the references.
- Introduce `AddLine` and `AddQuotedLine` which we use to populate the response file (and go to the next line).
- Move to C# 7 syntax for string replacement.
- Update all tests in `MTouchTaskTests` to use the response file since the arguments are no longer passed directly to `mtouch`.
- Update MT0018's documentation for response files.
2018-03-05 11:59:53 -05:00
Jeffrey Stedfast a61c7dc2ca
[msbuild] Use the proper MM vs MT error code prefix (#3360)
* [msbuild] Use the proper MM vs MT error code prefix

* Removed unused variable (artifact of debugging)
2018-01-31 09:56:45 -05:00
Jeffrey Stedfast cb51d9364d
[msbuild] Removed old logging conven ience method (#3352) 2018-01-30 13:51:01 -05:00
Vincent Dondain e6ee7c5e2f
[msbuild] Add missing {1} in LogMessage (#3262) 2018-01-19 10:27:14 -05:00
Jeffrey Stedfast 7b663d11f1
[msbuild] Resolve a Provisioning Profile if needed for iOS Sim builds (#3244) 2018-01-18 16:29:14 -05:00
Jeffrey Stedfast bb2a0faca4 [msbuild] Fixed provisioning profile lookups for tvOS (#3216) 2018-01-17 15:18:34 -05:00
Jeffrey Stedfast c22d033e1a
[msbuild] DetectSigningIdentity fix for Mac when RequireProvisioningP… (#3212)
* [msbuild] DetectSigningIdentity fix for Mac when RequireProvisioningProfile is false

Fixes https://github.com/xamarin/maccore/issues/612

* Disable some tests since they don't make correct assumptions anymore

* Added comment to explain why tests are disabled
2018-01-12 14:21:52 -05:00
Jeffrey Stedfast cfdf59dce4 [msbuild] Tweak the codesign logic for iOS Simulator builds (#3114)
Don't *always* codesign, especially for iOS8 which seems to break.

iOS Simulator builds should only be codesigned if they require
Entitlements (signified by RequireProvisionProfile).
2018-01-08 14:32:00 -05:00
Jeffrey Stedfast 316948e5d0 [msbuild] Repack all iOS Task assemblies into Xamarin.iOS.Tasks.dll (#3168) 2018-01-08 14:29:52 -05:00
Emanuel c84f0dac3d [msbuild] Fixes MoveTaskBase inclusion
MoveTaskBase inherits from Microsoft.Build.Tasks.Move, and Mono has a different implementation of it, so when building from a Mac we need to include XBuildMoveTaskBase.cs instead. The previous condition does no apply any more, because we're now using MSBuild to build, but the Move task implementation didn't change so it doesn't matter if we're using Xbuild or MSBuild.

This issue is preventing us (XVS) from merging features to our master branch
2017-12-14 19:37:15 -03:00
Vincent Dondain 808c67017d
[msbuild] Add support for optionally explaining why inapplicable certificates are not applicable (#3085)
Help fix #58251: When looking for valid signing certificates, print out each invalid certificate and state why it's not valid
(https://bugzilla.xamarin.com/show_bug.cgi?id=58251)
2017-12-12 14:25:04 -05:00
Jeffrey Stedfast b52a38bd33
[msbuild] Catch json parser exceptions to provide better error reporting (#2992)
* [msbuild] Catch json parser exceptions to provide better error reporting

This is in response to https://bugzilla.xamarin.com/show_bug.cgi?id=60536

* Added unit test
2017-12-12 13:54:09 -05:00