Can't save script

Hi again everyone,

I’ve been running into a new issue since upgrading to 4.3, and didn’t know if it’s a known problem / bug / user mess up. Often, when I make an edit to a script and want to save it monodevelop will spit out an error and not let me save. If I save under a different name, all’s well, except that then I can’t delete the name of the original file and change the name of the new one to the original in Unity. Am perplexed as to what’s going on. Any help is appreciated. God bless.

System.Reflection.TargetInvocationException:
Exception has been thrown by the
target of an invocation. —>
System.IO.IOException: The process
cannot access the file because it is
being used by another process.

at
System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath)

at System.IO.__Error.WinIOError()

at System.IO.File.Move(String
sourceFileName, String destFileName)

at
Mono.TextEditor.Utils.TextFileUtility.SystemRename(String
sourceFile, String destFile) in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\Mono.Texteditor\Mono.TextEditor.Utils\TextFileUtility.cs:line
206

at
Mono.TextEditor.Utils.TextFileUtility.WriteText(String
fileName, String text, Encoding
encoding, Boolean hadBom) in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\Mono.Texteditor\Mono.TextEditor.Utils\TextFileUtility.cs:line
193

at
MonoDevelop.SourceEditor.SourceEditorView.Save(String
fileName, Encoding encoding) in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line
672

at
MonoDevelop.SourceEditor.SourceEditorView.Save(String
fileName) in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line
588

at
MonoDevelop.Ide.Gui.Document.Save() in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Document.cs:line
355

at
MonoDevelop.Ide.Gui.ViewCommandHandlers.OnSaveFile()
in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\ViewCommandHandlers.cs:line
65

— 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) in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.Commands\CommandManager.cs:line
1922

at
MonoDevelop.Components.Commands.CommandManager.<>c__DisplayClassb.b__2() in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.Commands\CommandManager.cs:line
1045

at
MonoDevelop.Components.Commands.CommandManager.DispatchCommand(Object
commandId, Object dataItem, Object
initialTarget, CommandSource source)
in
c:\BuildAgent\work\9ffd76bfa3f1a926\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.Commands\CommandManager.cs:line
1062

So, the answer is kind of silly. What happened is that MonoDevelop now allows the same script to open twice, in two tabs. Trying to save one with it open (and not changed) in another tab makes it go berzerk. There we have it. =)