Bug 5118 - Exception when IntermediateOutputPath is specified to an absolute path.
Summary: Exception when IntermediateOutputPath is specified to an absolute path.
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-16 07:43 UTC by Andreas
Modified: 2012-06-12 06:11 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Andreas 2012-05-16 07:43:01 UTC
You can simple reproduce the attached exception if you try to compile a M4A application (most simple create a new/empty application via Visual Studio template) and set the IntermediateOutputPath property.

e.g.: msbuild /p:IntermediateOutputPath=c:\temp\ /verbosity:detailed

The log shows:
Task "ConvertResourcesCases"
  ConvertResourcesCases Task
    ResourceDirectory: C:\temp\test\MonoAndroidApplication1\MonoAndroidApplication1\c:\temp\res\
    AcwMapFile: c:\temp\testtest\acw-map.txt

And you see that ResourceDirectory is not a valid path. The error occurred on our build server where we try to separate the source fields and the build artifacts - so we think it is necessary to set the IntermediateOutputPath. 

Thanks for your assistance and please don't hesitate to contact me if you need more information or I could be of any further assistance.

Best regards,

Andreas

MSB4018: The "ConvertResourcesCases" task failed unexpectedly.
System.NotSupportedException: The given path's format is not supported.
   at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
   at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler)
   at System.IO.Directory.EnumerateDirectories(String path, String searchPattern, SearchOption searchOption)
   at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(Dictionary`2 acwMap)
   at Xamarin.Android.Tasks.ConvertResourcesCases.Execute()
   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, Boolean& taskResult) in Novell.MonoDroid.Common.targets(450, 2)
Comment 1 Jonathan Pobst 2012-05-17 17:24:11 UTC
Fixed for 4.4.

48f85bace42584ea9b6ff176f13d77492384a4f5

Thanks for the report!
Comment 2 Andreas 2012-05-29 08:57:59 UTC
Since I wonder if I have to implement a interim solution for our build server; could you make any assumption by when v4.4 will be released?

Anyway thanks for your quick support :-)
Comment 3 Jonathan Pryor 2012-06-11 17:21:59 UTC
This fix should be present in the Mono for Android 4.2.3 beta release.
Comment 4 Andreas 2012-06-12 06:11:35 UTC
Thanks - I can confirm that it works in v4.2.3.