Bug 34336 - Xamarin clears html resource file content after build
Summary: Xamarin clears html resource file content after build
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.0.0 (C6)
Assignee: Bugzilla
Depends on:
Reported: 2015-09-28 09:35 UTC by arx iT
Modified: 2015-10-01 18:07 UTC (History)
8 users (show)

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 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:

Description arx iT 2015-09-28 09:35:45 UTC
I have a HTML file that I would like to embed in my project. Added in resources folder, set as BundleResource.

After a project build, the file content is erased, aka the file is empty. The file is correctly embedded in the IPA, but in my source file the file is cleared. File is here but 0 bytes. I tried to change the extension, name, folder, nothing works. I set the file readonly, here's the error message :

1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018: The "ComputeBundleResourceOutputPaths" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018: System.UnauthorizedAccessException: Access to the path 'C:\Code\UnineRouting\UnineRouting\UnineRouting.iOS\Resources\Index.php' is denied.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at System.IO.File.InternalDelete(String path, Boolean checkHost)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at System.IO.File.Delete(String path)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Xamarin.VisualStudio.Build.TaskRunner.WriteEmptyFile(Task task, String file) in C:\Users\builder\data\lanes\2102\9ac5fb83\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 140
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Xamarin.VisualStudio.Build.TaskRunner.CreateOutputItem(Task task, ITaskCallback taskCallback, ITaskItem item) in C:\Users\builder\data\lanes\2102\9ac5fb83\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 133
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Xamarin.VisualStudio.Build.TaskRunner.CreateOutputItems(Task task, ITaskCallback taskCallback, IEnumerable items) in C:\Users\builder\data\lanes\2102\9ac5fb83\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 124
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Xamarin.VisualStudio.Build.TaskRunner.Run(Task task) in C:\Users\builder\data\lanes\2102\9ac5fb83\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 108
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Xamarin.MacDev.Tasks.ComputeBundleResourceOutputPaths.Execute() in C:\Users\builder\data\lanes\2102\9ac5fb83\source\XamarinVS\src\MSBuild\Xamarin.MacDev.Tasks\Tasks\ComputeBundleResourceOutputPaths.cs:line 14
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(354,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
Comment 1 Jose Gallardo 2015-10-01 18:07:51 UTC
As mentioned in related bug:

This issue is a side effect of a different issue (https://bugzilla.xamarin.com/show_bug.cgi?id=34144) fixed on iOS9SR1 (currently on Beta), on master and cycle6 bits.

The patched version should become available on our Alpha channel soon (we couldn't repro the issue with XVS, a build including the patch).

Thanks for reporting the bug.