xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks
Rolf Bjarne Kvinge e4172ec7a9
[msbuild] Don't create output files for ditto'ed directories on Windows. (#14662)
Fixes this warning from the Codesign task:

    C:\Users\rolf\...\Microsoft.iOS.Sdk\15.4.200-...\tools\msbuild\iOS\Xamarin.Shared.targets(2045,3): Cannot create 'C:\Users\rolf\source\iOSApp4\bin\Debug\net6.0-ios\ios-arm64\device-builds\iphone14.2-15.3.1\iOSApp4.app\Frameworks\ArcGIS-arm64.framework' because a file or directory with the same name already exists.
    C:\Users\rolf\...\Microsoft.iOS.Sdk\15.4.200-...\tools\msbuild\iOS\Xamarin.Shared.targets(2045,3): Cannot create 'C:\Users\rolf\source\iOSApp4\bin\Debug\net6.0-ios\ios-arm64\device-builds\iphone14.2-15.3.1\iOSApp4.app\Frameworks\Runtimecore.framework' because a file or directory with the same name already exists.

which occurs when the Codesign task asks XVS to create output files for files from
inside ditto'ed directories, and if XVS created output files for those directories
in the Ditto task, then XVS would be trying to create files inside these output files
as if they were directories. That doesn't work (thus the warning).

I've fixed this by:

* Removing the 'ShouldCreateOutputFile' implementation. The ShouldCreateOutputFile
  method is called on Windows, and we can't determine from Windows whether the destination
  is a directory or a file.
* Remove the [Output] attribute for the Destination property, this way XVS doesn't
  automatically try to create an output file for whatever the destination is.
* Add another CopiedFiles output property, which contains all the copied files
  (and only files), so that XVS mirrors this with output files on Windows.

Fixes part of https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1505990/.
2022-04-06 08:19:00 +02:00
..
ACTool.cs [msbuild] Share the ACTool task implementation between iOS and macOS. (#12425) 2021-08-13 20:15:53 +02:00
ALToolUpload.cs [msbuild] Share the ALToolUpload and ALToolValidate task implementations between iOS and macOS. (#12852) 2021-09-28 17:38:51 +02:00
ALToolValidate.cs [msbuild] Share the ALToolUpload and ALToolValidate task implementations between iOS and macOS. (#12852) 2021-09-28 17:38:51 +02:00
AOTCompile.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ArTool.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Archive.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
BTouch.cs [msbuild] Share the BTouch task implementation between iOS and macOS. (#12873) 2021-10-04 08:18:47 +02:00
Codesign.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CodesignVerify.cs [msbuild] Share the CodesignVerify task implementation between iOS and macOS. (#12918) 2021-10-06 15:51:42 +02:00
CollectBundleResources.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CompileEntitlements.cs [msbuild] Share the CompileEntitlements task implementation between iOS and macOS. (#12946) 2021-10-07 08:17:50 +02:00
CompileNativeCode.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CompileProductDefinition.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ComputeBundleLocation.cs [msbuild] Add a ComputeBundleLocation task 2021-12-22 10:17:35 +01:00
ComputeBundleResourceOutputPaths.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ComputeCodesignItems.cs [msbuild] Make the ComputeCodesignItems task not copy anything between macOS and Windows. 2022-03-17 16:19:00 +01:00
CoreMLCompiler.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CreateAssetPackManifest.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CreateBindingResourcePackage.cs [msbuild] Unify the iOS and macOS versions of the CreateBindingResourcePackage task. (#12710) 2021-09-15 15:10:35 +02:00
CreateDebugConfiguration.cs [msbuild] Move debug-related targets to shared code. (#14180) 2022-02-18 16:35:28 +01:00
CreateDebugSettings.cs [msbuild] Move debug-related targets to shared code. (#14180) 2022-02-18 16:35:28 +01:00
CreateInstallerPackage.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
CreatePkgInfo.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
DSymUtil.cs [msbuild] Improve the DSymUtil task. (#14344) 2022-03-11 07:28:25 +01:00
DetectDebugNetworkConfiguration.cs [msbuild] Move debug-related targets to shared code. (#14180) 2022-02-18 16:35:28 +01:00
Ditto.cs [msbuild] Don't create output files for ditto'ed directories on Windows. (#14662) 2022-04-06 08:19:00 +02:00
EmbedProvisionProfile.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
FilterStaticFrameworks.cs [msbuild] Copy all the files in a framework to the Mac for the FilterStaticFrameworks task. Fixes #13804. (#13805) 2022-01-21 08:57:39 +01:00
FindAotCompiler.cs [msbuild] Add a task to compute the path to the AOT compiler. (#12474) 2021-08-19 15:48:53 +02:00
FindCscCompiler.cs [msbuild/generator] Pass .NET's C# compiler to bgen to use. Fixes #12922. (#14192) 2022-02-23 09:36:43 +01:00
FindItemWithLogicalName.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
GenerateBundleName.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
GetDirectories.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
GetFileSystemEntries.cs [msbuild] Delete any Mono crash dump files in the root app bundle before codesigning. Fixes #12320. (#12332) 2021-08-10 07:39:00 +02:00
GetFiles.cs [msbuild] Move the GetFiles task to shared msbuild code (Xamarin.MacDev.Tasks). (#13800) 2022-01-20 16:22:01 +01:00
GetFullPath.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
GetNativeExecutableName.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
GetPropertyListValue.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
IBTool.cs [msbuild] Unify the iOS and macOS versions of the IBTool task. (#12424) 2021-08-16 10:54:28 +02:00
InstallNameTool.cs [dotnet/msbuild] Run install_name_tool to fix the id for dylibs. Fixes #13999. (#14147) 2022-02-16 21:13:40 +01:00
LinkNativeCode.cs [msbuild] Fix a few paths to have consistently macOS paths. (#14354) 2022-03-09 21:53:14 -05:00
MergeAppBundles.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Metal.cs [msbuild] Share the Metal[Lib] task implementations between iOS and macOS. (#12851) 2021-09-29 07:55:55 +02:00
MetalLib.cs [msbuild] Share the Metal[Lib] task implementations between iOS and macOS. (#12851) 2021-09-29 07:55:55 +02:00
OptimizeImage.cs [msbuild] Share the OptimizeImage and OptimizePropertyList tasks and targets between iOS and macOS. (#12819) 2021-09-24 16:26:28 +02:00
OptimizePropertyList.cs [msbuild] Share the OptimizeImage and OptimizePropertyList tasks and targets between iOS and macOS. (#12819) 2021-09-24 16:26:28 +02:00
PackLibraryResources.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ParseBundlerArguments.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
PrepareResourceRules.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
PropertyListEditor.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ReadAppManifest.cs [msbuild] Implement ITaskCallback in [Read|Write]AppManifest to tell the remote task execution that any files on Windows shouldn't be copied back to the mac. (#12646) 2021-09-13 16:06:06 +02:00
ReadItemsFromFile.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ResolveNativeReferences.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ScnTool.cs [msbuild] Share the ScnTool task implementation between iOS and macOS. (#12850) 2021-09-28 17:31:53 +02:00
SmartCopy.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
SpotlightIndexer.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
SymbolStrip.cs [msbuild] Improve the Strip task. (#14342) 2022-03-11 07:28:00 +01:00
TaskItemFixer.cs [msbuild] Share the BTouch task implementation between iOS and macOS. (#12873) 2021-10-04 08:18:47 +02:00
TextureAtlas.cs [msbuild] Share the TextureAtlas task implementation between iOS and macOS. (#12826) 2021-09-27 20:27:24 +02:00
UnpackLibraryResources.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
WriteAppManifest.cs [msbuild] Implement ITaskCallback in [Read|Write]AppManifest to tell the remote task execution that any files on Windows shouldn't be copied back to the mac. (#12646) 2021-09-13 16:06:06 +02:00
WriteItemsToFile.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Zip.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00