Hello all,
I've now come across an issue where resgen2 could not convert a *.resx
file to a *.resources file.
The problem is that the file has been originally written in windows and
uses an external file reference like "..\somedir\somefile", which causes
a FileNotFoundException in ResXFileRef.cs on line 81 because the given
path is directly used in that filestream.
Attached is a short hack which fixes this error but I'm not familiar
with how these *.resx paths should be handled in general, so please feel
free to comment on it.
Kind Regards,
Valentin S.
Index: ResXFileRef.cs
===================================================================
--- ResXFileRef.cs (revision 84487)
+++ ResXFileRef.cs (working copy)
@@ -77,7 +77,7 @@
}
}
#endif
-
+ parts [0] = parts [0].Replace('\\', '/');
using (FileStream file = new FileStream (parts [0], FileMode.Open, FileAccess.Read, FileShare.Read)) {
buffer = new byte [file.Length];
file.Read(buffer, 0, (int) file.Length);
_______________________________________________
Mono-winforms-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list