CopyAndConvertResources task failed in Xamarin 3.7.201

softlionsoftlion FRBeta ✭✭✭

My Android projects won't compile anymore using this version.
I'm using TFS2010, it should not to be an issue.

The file which access is denied is changing at each compilation.

3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018: The "CopyAndConvertResources" task failed unexpectedly.
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018: System.UnauthorizedAccessException: Access to the path 'C:\DiskJ\Projets\EXT\Catenum\Intouch\Com.Catenum.Intouch.Droid\obj\Debug\res\layout\about.xml' is denied.
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at Xamarin.Android.Tasks.CopyAndConvertResources.Execute()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(658,2): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
3>Done executing task "CopyAndConvertResources" -- FAILED.

Any workaround ?

Posts

  • MargieRoginskiMargieRoginski USMember, University

    I am seeing this same problem using Xamarin Studio on the Mac. I posted it here:

    http://forums.xamarin.com/discussion/25422/error-executing-task-copyandconvertresources-access-to-the-path-is-denied#latest

  • softlionsoftlion FRBeta ✭✭✭

    It is the version for the Evolve conference starting on monday. That's why the time to market of this version has been a bit quick on testing (let's guess, 10mn ?). Marketing don't wait, testing can. They will have hard time getting their demo to work, i guess some developers will work this week end and we'll get a fix on the stable channel tomorrow morning ;-)

  • Is there a way to rollback, I have same issue and need to deliver something on Monday.

  • softlionsoftlion FRBeta ✭✭✭

    There is a new version on beta channel. Don't work better for this problem though.

    Go to C:\Users\(your user)\AppData
    Search *.msi
    Sort by size, find the ones around 250MB
    Look at the properties on each file, it gives your the version of xamarin the installer installs
    Install version V-1
    

    Hope it helps.

  • CarelLotzCarelLotz ZAMember ✭✭

    Same issue here? Any news?

  • StefanHuberStefanHuber USMember

    Same issue! Any updates?

  • Woody712Woody712 GBMember ✭✭

    I have the same thing. I should of learnt my lesson by now. Do not upgrade as all they seem to work on is IOS and each release breaks something on Android. Love the product but this happens far too often for an expensive product.

    I need a fix now.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited October 2014

    I'm writing up a more detailed post about this with some other workarounds, but it looks like one quick way to work around the problem is to build the project twice in a row. For example:

    1. Click the "Start debugging" button in Visual Studio.

    2. The build fails.

    3. Click the "Start debugging" button again.

    4. The build succeeds, and Visual Studio starts debugging the app on the device.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited October 2014

    Thanks for the reports!

    I've posted an announcement in the Android forums about this problem with 4 possible workarounds (including downgrade links):
    http://forums.xamarin.com/discussion/25489/copyandconvertresources-task-failed-unexpectedly-read-only-resources

    I'm closing this thread for now to consolidate any follow-up discussion about the issue onto that new thread.

This discussion has been closed.