diff --git a/msbuild/Makefile b/msbuild/Makefile index 93c16b11bc44..e380ca9457d4 100644 --- a/msbuild/Makefile +++ b/msbuild/Makefile @@ -19,7 +19,6 @@ MSBUILD_PRODUCTS = MSBUILD_DIRECTORIES = MSBUILD_SYMLINKS = MSBUILD_TASK_ASSEMBLIES = -MSBUILD_REFERENCE_ASSEMBLIES = ALL_SOURCES = $(wildcard $(TOP)/msbuild/*/*.cs) $(wildcard $(TOP)/msbuild/*/*/*.cs) $(wildcard $(TOP)/msbuild/*/*/*/*.cs) *.sln $(wildcard */*.csproj) $(wildcard */packages.config) CONFIG = Debug @@ -35,14 +34,7 @@ IOS_TARGETS = \ IOS_BINDING_TARGETS = $(wildcard Xamarin.ObjcBinding.Tasks/*.targets) -IOS_TASK_ASSEMBLIES = \ - Xamarin.iOS.Tasks \ - Xamarin.iOS.Tasks.Core \ - Xamarin.MacDev.Tasks \ - Xamarin.MacDev.Tasks.Core \ - -IOS_TASK_REFERENCE_ASSEMBLIES = \ - Xamarin.MacDev +IOS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks IOS_DIRECTORIES = \ $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS \ @@ -65,7 +57,6 @@ IOS_PRODUCTS = $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/FrameworkList.xml \ $(foreach target,$(IOS_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(notdir $(target))) \ $(foreach target,$(IOS_BINDING_TARGETS) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(notdir $(target))) \ - $(foreach dll,$(IOS_TASK_REFERENCE_ASSEMBLIES),$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).dll) \ $(foreach dll,$(IOS_TASK_ASSEMBLIES) ,$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/iOS/$(dll).dll) \ $(IOS_SYMLINKS) @@ -77,7 +68,6 @@ MSBUILD_PRODUCTS += all-ios MSBUILD_DIRECTORIES += $(IOS_DIRECTORIES) MSBUILD_SYMLINKS += symlinks-ios MSBUILD_TASK_ASSEMBLIES += $(IOS_TASK_ASSEMBLIES) -MSBUILD_REFERENCE_ASSEMBLIES += $(IOS_TASK_REFERENCE_ASSEMBLIES) endif ## @@ -156,17 +146,10 @@ endif MAC_TARGETS = $(wildcard Xamarin.Mac.Tasks/*.props) $(wildcard Xamarin.Mac.Tasks/*.targets) MAC_BINDING_TARGETS = -MAC_TASK_ASSEMBLIES = \ - Xamarin.Mac.Tasks \ - Xamarin.Mac.Tasks.Core \ - Xamarin.MacDev.Tasks \ - Xamarin.MacDev.Tasks.Core \ +MAC_TASK_ASSEMBLIES = Xamarin.Mac.Tasks MAC_BINDING_TASK_ASSEMBLIES = -MAC_TASK_REFERENCE_ASSEMBLIES = \ - Xamarin.MacDev - MAC_DIRECTORIES = \ $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac \ $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList \ @@ -178,7 +161,6 @@ MAC_SYMLINKS = $(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.Mac/v2.0/RedistList/FrameworkList.xml \ $(foreach target,$(MAC_TARGETS) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(notdir $(target))) \ $(foreach target,$(MAC_BINDING_TARGETS) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(notdir $(target))) \ - $(foreach dll,$(MAC_TASK_REFERENCE_ASSEMBLIES),$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(dll).dll) \ $(foreach dll,$(MAC_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(dll).dll) \ $(foreach dll,$(MAC_BINDING_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/$(dll).dll) \ @@ -188,7 +170,6 @@ MAC_PRODUCTS = $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/etc/mono/4.5/machine.config \ $(foreach target,$(MAC_TARGETS) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(notdir $(target))) \ $(foreach target,$(MAC_BINDING_TARGETS) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(notdir $(target))) \ - $(foreach dll,$(MAC_TASK_REFERENCE_ASSEMBLIES),$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \ $(foreach dll,$(MAC_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \ $(foreach dll,$(MAC_BINDING_TASK_ASSEMBLIES) ,$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/msbuild/$(dll).dll) \ $(MAC_SYMLINKS) \ @@ -201,7 +182,6 @@ MSBUILD_PRODUCTS += all-mac MSBUILD_DIRECTORIES += $(MAC_DIRECTORIES) MSBUILD_SYMLINKS += symlinks-mac MSBUILD_TASK_ASSEMBLIES += $(MAC_TASK_ASSEMBLIES) $(MAC_BINDING_TASK_ASSEMBLIES) -MSBUILD_REFERENCE_ASSEMBLIES += $(MAC_TASK_REFERENCE_ASSEMBLIES) endif ## @@ -316,7 +296,7 @@ all-local:: $(MSBUILD_PRODUCTS) .stamp-test-xml .build-stamp: $(ALL_SOURCES) $(Q) $(SYSTEM_MONO) /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore - $(Q) $(SYSTEM_XBUILD) $(XBUILD_VERBOSITY) + $(Q) $(SYSTEM_MSBUILD) $(XBUILD_VERBOSITY) $(Q) touch $@ # make all the target assemblies build when any of the sources have changed @@ -325,11 +305,6 @@ $(foreach dll,$(MSBUILD_TASK_ASSEMBLIES),$(dll)/bin/$(CONFIG)/$(dll).dll): .buil # Always remake the symlinks .PHONY: $(MSBUILD_SYMLINKS) -# Xamarin.MacDev.dll comes from the Xamarin.MacDev repository -# Newtonsoft.Json.dll comes from a NuGet -$(foreach dll,$(sort $(MSBUILD_REFERENCE_ASSEMBLIES)),build/$(notdir $(dll)).dll): .build-stamp | build - $(Q) cp Xamarin.MacDev.Tasks.Core/bin/$(CONFIG)/$(notdir $@) $@ - define copyToBuild build/$(1).dll: $(1)/bin/$(CONFIG)/$(1).dll | build $$(Q) cp $$< $$@ @@ -353,4 +328,4 @@ install-local:: $(MSBUILD_PRODUCTS) # make will automatically consider files created in chained implicit rules as temporary files, and delete them afterwards # marking those files as .SECONDARY will prevent that deletion. -.SECONDARY: $(foreach file,$(MSBUILD_TASK_ASSEMBLIES) $(MSBUILD_REFERENCE_ASSEMBLIES),unbuild/$(file).dll) $(foreach file,$(MSBUILD_TASK_ASSEMBLIES) $(MSBUILD_REFERENCE_ASSEMBLIES),build/$(file).dll) +.SECONDARY: $(foreach file,$(MSBUILD_TASK_ASSEMBLIES),unbuild/$(file).dll) $(foreach file,$(MSBUILD_TASK_ASSEMBLIES),build/$(file).dll) diff --git a/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs b/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs index 340890d68690..c0854551bcf1 100644 --- a/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs +++ b/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs @@ -1,4 +1,4 @@ -// +// // MmpTask.cs // // Author: @@ -98,7 +98,7 @@ protected override bool ValidateParameters () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); bool msym; args.Add ("/verbose"); @@ -224,7 +224,7 @@ protected override string GenerateCommandLineCommands () string GetMonoBundleDirName () { if (!string.IsNullOrEmpty (ExtraArguments)) { - var args = ProcessArgumentBuilder.Parse (ExtraArguments); + var args = CommandLineArgumentBuilder.Parse (ExtraArguments); for (int i = 0; i < args.Length; i++) { string arg; diff --git a/msbuild/Xamarin.Mac.Tasks/Tasks/CodesignVerify.cs b/msbuild/Xamarin.Mac.Tasks/Tasks/CodesignVerify.cs index 51ac16a08f8a..1e50733d05be 100644 --- a/msbuild/Xamarin.Mac.Tasks/Tasks/CodesignVerify.cs +++ b/msbuild/Xamarin.Mac.Tasks/Tasks/CodesignVerify.cs @@ -7,7 +7,7 @@ public class CodesignVerify : CodesignVerifyTaskBase { protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("--verify"); args.Add ("-vvvv"); diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets index ae8aa147a240..c539cfada96c 100644 --- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets +++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets @@ -15,17 +15,17 @@ Copyright (C) 2014 Xamarin. All rights reserved. --> - - - - - - - - - - - + + + + + + + + + + + @@ -40,19 +40,19 @@ Copyright (C) 2014 Xamarin. All rights reserved. - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.CSharp.targets b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.CSharp.targets index 7e4496c86420..cc41cb8061ca 100644 --- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.CSharp.targets @@ -16,10 +16,10 @@ Copyright (C) 2014 Xamarin Inc. All rights reserved. - + - + diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.Common.targets b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.Common.targets index e0a728597ead..371f1d147cb8 100644 --- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.Common.targets +++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.ObjCBinding.Common.targets @@ -15,9 +15,9 @@ Copyright (C) 2014 Xamarin Inc. All rights reserved. --> - + - + diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj index 68dafd8b9359..8aa5e85b832a 100644 --- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj +++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj @@ -1,4 +1,4 @@ - + Debug @@ -29,7 +29,6 @@ - @@ -111,5 +110,39 @@ PreserveNewest + + + + + + + + + + + + + + + + + /keyfile:"$(AssemblyOriginatorKeyFile)" + + + + + + + + + + + diff --git a/msbuild/Xamarin.Mac.Tasks/packages.config b/msbuild/Xamarin.Mac.Tasks/packages.config new file mode 100644 index 000000000000..049ad7d76ed1 --- /dev/null +++ b/msbuild/Xamarin.Mac.Tasks/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/ProcessArgumentBuilder.cs b/msbuild/Xamarin.MacDev.Tasks.Core/CommandLineArgumentBuilder.cs similarity index 97% rename from msbuild/Xamarin.MacDev.Tasks.Core/ProcessArgumentBuilder.cs rename to msbuild/Xamarin.MacDev.Tasks.Core/CommandLineArgumentBuilder.cs index 5473aa1621ab..432816f7d688 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/ProcessArgumentBuilder.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/CommandLineArgumentBuilder.cs @@ -7,7 +7,7 @@ namespace Xamarin.MacDev /// /// Builds a process argument string. /// - public class ProcessArgumentBuilder + public class CommandLineArgumentBuilder { static readonly char[] QuoteSpecials = new char[] { ' ', '\\', '\'', '"', ',', ';' }; @@ -18,11 +18,11 @@ public string ProcessPath { get; private set; } - public ProcessArgumentBuilder () + public CommandLineArgumentBuilder () { } - public ProcessArgumentBuilder (string processPath) + public CommandLineArgumentBuilder (string processPath) { ProcessPath = processPath; } diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs index 3edbc37aaae1..c2f2dc5786b8 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs @@ -83,7 +83,7 @@ static bool IsMessagesExtension (PDictionary plist) return id.Value == "com.apple.message-payload-provider"; } - protected override void AppendCommandLineArguments (IDictionary environment, ProcessArgumentBuilder args, ITaskItem[] items) + protected override void AppendCommandLineArguments (IDictionary environment, CommandLineArgumentBuilder args, ITaskItem[] items) { string minimumDeploymentTarget; diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArToolTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArToolTaskBase.cs index 6f02ec99f3bb..5ce74dd9f53a 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArToolTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArToolTaskBase.cs @@ -38,7 +38,7 @@ protected override string GenerateFullPathToTool () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-r"); args.AddQuoted (Archive.ItemSpec); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArchiveTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArchiveTaskBase.cs index f78ea3d5011a..37463db829c4 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArchiveTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ArchiveTaskBase.cs @@ -86,7 +86,7 @@ protected string CreateArchiveDirectory () protected static int Ditto (string source, string destination) { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-rsrc"); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs index 1a5058bd56d9..9f92a833e585 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs @@ -194,7 +194,7 @@ protected override string GenerateCommandLineCommands () cmd.AppendSwitch (GetTargetFrameworkArgument ()); if (!string.IsNullOrEmpty (ExtraArgs)) { - var extraArgs = ProcessArgumentBuilder.Parse (ExtraArgs); + var extraArgs = CommandLineArgumentBuilder.Parse (ExtraArgs); var target = OutputAssembly; string projectDir; diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignTaskBase.cs index c7accd24ff5f..24966fe5e86a 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignTaskBase.cs @@ -74,7 +74,7 @@ ProcessStartInfo GetProcessStartInfo (string tool, string args) string GenerateCommandLineArguments (ITaskItem item) { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-v"); args.Add ("--force"); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs index 493a90f0e429..22cb6358bad9 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs @@ -40,7 +40,7 @@ protected override string GenerateFullPathToTool () // Note: Xamarin.Mac and Xamarin.iOS should both override this method to do pass platform-specific verify rules protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("--verify"); args.Add ("-vvvv"); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CompileSceneKitAssetsTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CompileSceneKitAssetsTaskBase.cs index e6ebc9902620..f0d99d650f69 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CompileSceneKitAssetsTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CompileSceneKitAssetsTaskBase.cs @@ -96,7 +96,7 @@ static ProcessStartInfo GetProcessStartInfo (IDictionary environ int CopySceneKitAssets (string scnassets, string output, string intermediate) { var environment = new Dictionary (); - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); environment.Add ("PATH", DeveloperRootBinDir); environment.Add ("DEVELOPER_DIR", SdkDevPath); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CoreMLCompilerTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CoreMLCompilerTaskBase.cs index ea9f5b0010b7..dcda26650502 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CoreMLCompilerTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CoreMLCompilerTaskBase.cs @@ -90,7 +90,7 @@ static ProcessStartInfo GetProcessStartInfo (IDictionary environ int Compile (ITaskItem item, string outputDir, string log, string partialPlist) { var environment = new Dictionary (); - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("compile"); args.AddQuoted (item.ItemSpec); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CreateInstallerPackageTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CreateInstallerPackageTaskBase.cs index 16735482a0ad..8573e9477313 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CreateInstallerPackageTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/CreateInstallerPackageTaskBase.cs @@ -85,7 +85,7 @@ protected override string GenerateCommandLineCommands () { Log.LogMessage ("Creating installer package"); - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); if (!string.IsNullOrEmpty(ProductDefinition)) { args.Add ("--product"); @@ -116,11 +116,11 @@ protected override string GenerateCommandLineCommands () return args.ToString (); } - void AppendExtraArgs (ProcessArgumentBuilder args, string extraArgs) + void AppendExtraArgs (CommandLineArgumentBuilder args, string extraArgs) { var target = this.MainAssembly.ItemSpec; - string[] argv = ProcessArgumentBuilder.Parse (extraArgs); + string[] argv = CommandLineArgumentBuilder.Parse (extraArgs); var customTags = new Dictionary (StringComparer.OrdinalIgnoreCase) { { "projectdir", Path.GetDirectoryName (this.ProjectPath) }, // Apparently msbuild doesn't propagate the solution path, so we can't get it. - MTouchTaskBase.cs diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/DittoTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/DittoTaskBase.cs index ba316e7b3009..6f5137148f73 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/DittoTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/DittoTaskBase.cs @@ -37,7 +37,7 @@ protected override string GenerateFullPathToTool () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-rsrc"); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/IBToolTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/IBToolTaskBase.cs index 131a3189fab0..07fed915a513 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/IBToolTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/IBToolTaskBase.cs @@ -49,7 +49,7 @@ protected bool CanLinkStoryboards { get { return AppleSdkSettings.XcodeVersion.Major > 7 || (AppleSdkSettings.XcodeVersion.Major == 7 && AppleSdkSettings.XcodeVersion.Minor >= 2); } } - protected override void AppendCommandLineArguments (IDictionary environment, ProcessArgumentBuilder args, ITaskItem[] items) + protected override void AppendCommandLineArguments (IDictionary environment, CommandLineArgumentBuilder args, ITaskItem[] items) { environment.Add ("IBSC_MINIMUM_COMPATIBILITY_VERSION", minimumDeploymentTarget); environment.Add ("IBC_MINIMUM_COMPATIBILITY_VERSION", minimumDeploymentTarget); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalLibTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalLibTaskBase.cs index fbce3a0fad1a..07f98949a8ca 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalLibTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalLibTaskBase.cs @@ -45,7 +45,7 @@ protected override string GenerateFullPathToTool () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-o"); args.AddQuoted (OutputLibrary); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalTaskBase.cs index 8114941abcfb..407667cdab83 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/MetalTaskBase.cs @@ -63,7 +63,7 @@ protected override string GenerateCommandLineCommands () var intermediate = Path.Combine (IntermediateOutputPath, ToolName); var logicalName = BundleResource.GetLogicalName (ProjectDir, prefixes, SourceFile, !string.IsNullOrEmpty(SessionId)); var path = Path.Combine (intermediate, logicalName); - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); var dir = Path.GetDirectoryName (path); if (!Directory.Exists (dir)) diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ScnToolTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ScnToolTaskBase.cs index 396ac0fe30dd..b99e198c017a 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ScnToolTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ScnToolTaskBase.cs @@ -87,7 +87,7 @@ protected override string GenerateFullPathToTool () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("--compress"); args.AddQuoted (InputScene); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs index 93197cdb25c5..06857d54e57e 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs @@ -98,7 +98,7 @@ protected virtual IEnumerable GetTargetDevices (PDictionary plist) yield break; } - protected abstract void AppendCommandLineArguments (IDictionary environment, ProcessArgumentBuilder args, ITaskItem[] items); + protected abstract void AppendCommandLineArguments (IDictionary environment, CommandLineArgumentBuilder args, ITaskItem[] items); string GetFullPathToTool () { @@ -127,7 +127,7 @@ static ProcessStartInfo GetProcessStartInfo (IDictionary environ protected int Compile (ITaskItem[] items, string output, ITaskItem manifest) { var environment = new Dictionary (); - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); if (!string.IsNullOrEmpty (SdkBinPath)) environment.Add ("PATH", SdkBinPath); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ZipTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ZipTaskBase.cs index 8ba71cdf4d0b..6e5caae9a989 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ZipTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ZipTaskBase.cs @@ -49,7 +49,7 @@ protected override string GetWorkingDirectory () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); if (Recursive) args.Add ("-r"); diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Xamarin.MacDev.Tasks.Core.csproj b/msbuild/Xamarin.MacDev.Tasks.Core/Xamarin.MacDev.Tasks.Core.csproj index e68b4761d883..632c63ccce99 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Xamarin.MacDev.Tasks.Core.csproj +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Xamarin.MacDev.Tasks.Core.csproj @@ -107,13 +107,13 @@ + - diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Properties/AssemblyInfo.cs b/msbuild/Xamarin.iOS.Tasks.Core/Properties/AssemblyInfo.cs deleted file mode 100644 index be8c4bd2f8bd..000000000000 --- a/msbuild/Xamarin.iOS.Tasks.Core/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Xamarin.iOS.Tasks.Tests")] \ No newline at end of file diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignNativeLibrariesTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignNativeLibrariesTaskBase.cs index 78e3a921540f..4791cd794948 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignNativeLibrariesTaskBase.cs +++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignNativeLibrariesTaskBase.cs @@ -75,7 +75,7 @@ ProcessStartInfo GetProcessStartInfo (string tool, string args) string GenerateCommandLineArguments (string dylib) { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-v"); args.Add ("--force"); diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs index 3ad69fbd8584..0a2948a4db25 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs +++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CodesignVerifyTaskBase.cs @@ -6,7 +6,7 @@ public abstract class CodesignVerifyTaskBase : Xamarin.MacDev.Tasks.CodesignVeri { protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("--verify"); args.Add ("-vvvv"); diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CreateAssetPackTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CreateAssetPackTaskBase.cs index a88fb7d995a8..5a40df836c93 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CreateAssetPackTaskBase.cs +++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CreateAssetPackTaskBase.cs @@ -42,7 +42,7 @@ protected override string GetWorkingDirectory () protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("-r", "-y"); args.AddQuoted (OutputFile.GetMetadata ("FullPath")); diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs index 9f9aa2404901..29175508bf62 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs +++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs @@ -40,14 +40,14 @@ public abstract class MTouchTaskBase : ToolTask { class GccOptions { - public ProcessArgumentBuilder Arguments { get; private set; } + public CommandLineArgumentBuilder Arguments { get; private set; } public HashSet WeakFrameworks { get; private set; } public HashSet Frameworks { get; private set; } public bool Cxx { get; set; } public GccOptions () { - Arguments = new ProcessArgumentBuilder (); + Arguments = new CommandLineArgumentBuilder (); WeakFrameworks = new HashSet (); Frameworks = new HashSet (); } @@ -282,7 +282,7 @@ void BuildNativeReferenceFlags (GccOptions gcc) // Note: these get merged into gccArgs by our caller value = item.GetMetadata ("LinkerFlags"); if (!string.IsNullOrEmpty (value)) { - var linkerFlags = ProcessArgumentBuilder.Parse (value); + var linkerFlags = CommandLineArgumentBuilder.Parse (value); foreach (var flag in linkerFlags) gcc.Arguments.AddQuoted (flag); @@ -353,7 +353,7 @@ static string Unquote (string text, int startIndex) protected override string GenerateCommandLineCommands () { - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); TargetArchitecture architectures; bool msym; @@ -495,7 +495,7 @@ protected override string GenerateCommandLineCommands () var gcc = new GccOptions (); if (!string.IsNullOrEmpty (ExtraArgs)) { - var extraArgs = ProcessArgumentBuilder.Parse (ExtraArgs); + var extraArgs = CommandLineArgumentBuilder.Parse (ExtraArgs); var target = MainAssembly.ItemSpec; string projectDir; @@ -544,7 +544,7 @@ protected override string GenerateCommandLineCommands () } if (!string.IsNullOrEmpty (flags)) { - var gccArgs = ProcessArgumentBuilder.Parse (flags); + var gccArgs = CommandLineArgumentBuilder.Parse (flags); for (int j = 0; j < gccArgs.Length; j++) gcc.Arguments.Add (StringParserService.Parse (gccArgs[j], customTags)); diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/ParseExtraMtouchArgsTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/ParseExtraMtouchArgsTaskBase.cs index 9f57eda19106..c4fbdeda16bd 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/ParseExtraMtouchArgsTaskBase.cs +++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/ParseExtraMtouchArgsTaskBase.cs @@ -29,7 +29,7 @@ public override bool Execute () NoDSymUtil = "false"; if (!string.IsNullOrEmpty (ExtraArgs)) { - var args = ProcessArgumentBuilder.Parse (ExtraArgs); + var args = CommandLineArgumentBuilder.Parse (ExtraArgs); for (int i = 0; i < args.Length; i++) { string arg; diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.TVOS.ObjCBinding.CSharp.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.TVOS.ObjCBinding.CSharp.targets index e0ac6d7f8a7e..67364c4cce22 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.TVOS.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.TVOS.ObjCBinding.CSharp.targets @@ -16,7 +16,7 @@ Copyright (C) 2015-2016 Xamarin Inc. All rights reserved. - + diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.ObjCBinding.CSharp.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.ObjCBinding.CSharp.targets index 50881969e6ca..a1a8777122cd 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.ObjCBinding.CSharp.targets @@ -16,7 +16,7 @@ Copyright (C) 2014 Xamarin Inc. All rights reserved. - + diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets index dbe38e9f069d..08f790b7b8c6 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets @@ -15,28 +15,28 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved. --> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -76,13 +76,13 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved. - - - - - - - + + + + + + + diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.CSharp.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.CSharp.targets index 34ce0c5c912b..f91f5263bce9 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.CSharp.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.CSharp.targets @@ -17,9 +17,9 @@ Copyright (C) 2013-2016 Xamarin Inc. All rights reserved. - + - + diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.Common.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.Common.targets index b621f01abe3a..3584789e7b46 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.Common.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.ObjCBinding.Common.targets @@ -15,9 +15,9 @@ Copyright (C) 2013-2016 Xamarin Inc. All rights reserved. --> - + - + diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Tasks.Core.csproj b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Tasks.Core.csproj index 99f393a485f6..91f579db7c49 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Tasks.Core.csproj +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Tasks.Core.csproj @@ -54,7 +54,6 @@ - diff --git a/msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs b/msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..adc7d63c7b2a --- /dev/null +++ b/msbuild/Xamarin.iOS.Tasks/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo ("Xamarin.iOS.Tasks.Tests")] diff --git a/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj b/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj index 57484f43085d..d56450e318ef 100644 --- a/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj +++ b/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj @@ -74,6 +74,7 @@ + @@ -98,7 +99,11 @@ + + + + + + + + + + + + + + + + + /keyfile:"$(AssemblyOriginatorKeyFile)" + + + + + + + + + + + diff --git a/msbuild/Xamarin.iOS.Tasks/packages.config b/msbuild/Xamarin.iOS.Tasks/packages.config new file mode 100644 index 000000000000..049ad7d76ed1 --- /dev/null +++ b/msbuild/Xamarin.iOS.Tasks/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CodesignAppBundle.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CodesignAppBundle.cs index f83a713f7488..d941fa916526 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CodesignAppBundle.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CodesignAppBundle.cs @@ -27,7 +27,7 @@ public CodesignAppBundle (string platform, string configuration) : base (platfor static bool IsCodesigned (string path) { var psi = new ProcessStartInfo ("/usr/bin/codesign"); - var args = new ProcessArgumentBuilder (); + var args = new CommandLineArgumentBuilder (); args.Add ("--verify"); args.AddQuoted (path); diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj index 7a01ed547efd..c6a821ea8f99 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj @@ -36,33 +36,16 @@ - ..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - {CC3D9353-20C4-467A-8522-A9DED6F0C753} - Xamarin.MacDev - - - {534D7C5A-0E1C-4C58-9E48-21B1A98919EB} - Xamarin.MacDev.Tasks - - - {93E12FA0-089C-4BC8-840F-43CFBC7927C7} - Xamarin.iOS.Tasks.Core - {44605724-8002-48E1-895F-7CB068099B6A} Xamarin.iOS.Tasks - - {7B095849-6FDB-4BD2-9B59-569D81A1A809} - Xamarin.MacDev.Tasks.Core - diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index eee7e4c65665..22050d944491 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -504,6 +504,7 @@ async Task PopulateTasksAsync () SpecifyPlatform = false, SpecifyConfiguration = false, Platform = TestPlatform.iOS, + UseMSBuild = true, }; var nunitExecutioniOSMSBuild = new NUnitExecuteTask (buildiOSMSBuild) { @@ -2444,6 +2445,8 @@ protected override async Task ExecuteAsync () class XBuildTask : BuildProjectTask { + public bool UseMSBuild; + protected override async Task ExecuteAsync () { using (var resource = await NotifyAndAcquireDesktopResourceAsync ()) { @@ -2452,7 +2455,7 @@ protected override async Task ExecuteAsync () await RestoreNugetsAsync (log, resource); using (var xbuild = new Process ()) { - xbuild.StartInfo.FileName = "xbuild"; + xbuild.StartInfo.FileName = UseMSBuild ? "msbuild" : "xbuild"; var args = new StringBuilder (); args.Append ("/verbosity:diagnostic "); if (SpecifyPlatform) @@ -2462,6 +2465,8 @@ protected override async Task ExecuteAsync () args.Append (StringUtils.Quote (ProjectFile)); xbuild.StartInfo.Arguments = args.ToString (); SetEnvironmentVariables (xbuild); + if (UseMSBuild) + xbuild.StartInfo.EnvironmentVariables ["MSBuildExtensionsPath"] = null; LogProcessExecution (log, xbuild, "Building {0} ({1})", TestName, Mode); if (!Harness.DryRun) { var timeout = TimeSpan.FromMinutes (15);