Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2015-05-21 03:27:55 +0300
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2015-05-21 03:27:55 +0300
commita5503f9221a4104efb9ff2dfdb2bf59f9f9946be (patch)
tree8cb02c7da6d932f36c66206576aa3744bc8b20f6 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools
parent375db76ea4d11eaadb46dd5e8d17119de41f65c9 (diff)
[Ide] Make sure resx designer namespaces match VS
This means that the code generated will be correct even if the project policy does not have VS-style resource IDs and directory namespaces.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
index eb091e0788..057f2196e5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
@@ -73,9 +73,14 @@ namespace MonoDevelop.Ide.CustomTools
}
var outputfile = file.FilePath.ChangeExtension (".Designer." + provider.FileExtension);
- var codeNamespace = CustomToolService.GetFileNamespace (file, outputfile);
- var name = provider.CreateValidIdentifier (file.FilePath.FileNameWithoutExtension);
- var resourcesNamespace = dnp.GetDefaultNamespace (outputfile);
+
+ //use the Visual Studio naming polict, so it matches code generated by VS
+ var codeNamespace = CustomToolService.GetFileNamespace (file, outputfile, true);
+
+ //no need to escape/cleanup, StronglyTypedResourceBuilder does that
+ var name = file.FilePath.FileNameWithoutExtension;
+
+ var resourcesNamespace = dnp.GetDefaultNamespace (outputfile, true);
var rd = new Dictionary<object, object> ();
var filePath = file.FilePath;