Me and my colleagues have a problem with Visual Studio crashing every time we change an EPiServer language file. This only happens on one specific project and every developer on the team has the same problem. The EPiServer version is 5.1 SP1 and we're not in a position to upgrade.
I want to clearify that Visual Studio crashes when I save the file, and I have not even executed the project yet. No instances of Cassini seems to be running on the machine.
One even more strange thing is that the change is saved, and Visual Studio seems to be crashing after the Save, and on the notification event that the file has been updated. There's no doubt that the EPiServer instance is somehow responsible for this when reading the error message.
An unhandled exception occurred and the process was terminated. Application ID: 21efe14e Process ID: 12816
Exception: System.IO.IOException Message: The process cannot access the file 'F:\Projekt\trunk\Web\lang\lang_se.xml' because it is being used by another process.
StackTrace: 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) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.FileInfo.Open(FileMode mode, FileAccess access, FileShare share) at EPiServer.Core.LanguageManager.ReadLanguageFiles(DirectoryInfo dir, String ignoreFile) at EPiServer.Core.LanguageManager.Reload(String ignoreFile) at EPiServer.Core.LanguageManager.LanguageFiles_GenericUpdate(Object source, FileSystemEventArgs e) at System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e) at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name) at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
If anyone have a clue what I can do to prevent this error, it will be much appretiated. Edit the language files in an external editor does not help, since it is the FileSystemWatcher that crashes.
Best regardsMikael Lundin
I haven't seen this before. But what could recommend is to use Process Monitor to see what processes are using the lang files. That way you should be able to see what other process is blocking as the error says.