Bug 5845 - Tag error breaks the designer and won't let you edit/save the source axml
Summary: Tag error breaks the designer and won't let you edit/save the source axml
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2012-06-25 11:54 UTC by Dylan
Modified: 2012-11-16 12:16 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 Dylan 2012-06-25 11:54:45 UTC
I misplaced a </ScrollView> tag in the Source tab of the designer in MonoDevelop. I went back to the Content tab and it shows the error "The layout could not be loaded. Layout resource could not be found". I then closed the window and tried to open the axml by opening it with the Source Code Editor. I made the changes to fix the axml but then the Source Code Editor tab would not save. It gave me this exception:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process cannot access the file 'Z:\Dropbox\MobiCover Projects\Hollard\Hollard\Hollard\Resources\Layout\.#Disclaimer.axml' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   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)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Mono.TextEditor.Utils.TextFileUtility.WriteText(String fileName, String text, Encoding encoding, Boolean hadBom)
   at MonoDevelop.SourceEditor.SourceEditorView.Save(String fileName, Encoding encoding)
   at MonoDevelop.SourceEditor.SourceEditorView.Save(String fileName)
   at MonoDevelop.Ide.Gui.Document.Save()
   at MonoDevelop.Ide.Gui.ViewCommandHandlers.OnSaveFile()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at MonoDevelop.Components.Commands.CommandHandlerInfo.Run(Object cmdTarget, Command cmd)
   at MonoDevelop.Components.Commands.CommandManager.<>c__DisplayClassb.<DispatchCommand>b__2()
   at MonoDevelop.Components.Commands.CommandManager.DispatchCommand(Object commandId, Object dataItem, Object initialTarget, CommandSource source)



So basically I then have to close and open MonoDevelop, make a change, hope it works, if it doesn't I have to close the designer, close MD, reopen MD, edit in Source Code Editor and try the designer. If it breaks the cycle starts from scratch.
Comment 1 Dylan 2012-06-25 11:55:26 UTC
Using MD 3.0.3.2 and MfA 4.2.3
Comment 2 Yuri 2012-07-18 04:52:28 UTC
I have the same Problem with MD 3.3.3.4 and MfA 4.2.4
Comment 3 Jeremy Kolb 2012-09-26 13:20:25 UTC
This looks like it may be the same issue that I reported as bug: 7395.  It's incredibly frustrating.  I have to use the normal text editor.
Comment 4 Lluis Sanchez 2012-11-16 12:16:37 UTC
Already fixed.