thanks, got it now ! So this is what visual studio acutally does...

I found a thread where a guy was stuck because of visual studio grasping the
wrong class name for his resource !! ;) (he had defined multiple classes
within the same file, visual studio takes the first)
http://www.dotnet247.com/247reference/msgs/10/52512.aspx


I think we should still strengthen the regexp because it caught something in
one of my source files which was not a classname, resulting in an invalid
file name and an exception in path.combine. The following line in my source
file causes a bug (c#) :

string l_str_temp = "<div class=\"QuotasGauge\" style=\"WIDTH:" +
WIDTH_GAUGE.ToString() + "px;\">";


I'll give it a look and try to come back with a better regexp...


Matthew: I finally ended up in changing my email client and address ! sorry
for the inconvenienceS


-----Original Message-----
From: Erv Walter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 5:00 AM
To: Matthew Mastracci; Vincent Labatut
Cc: [EMAIL PROTECTED]
Subject: Re: [nant-dev] solution task fix

VS.NET uses the full name of the class (namespace.classnam) for the "behind
the scenes" .resx files (those resource files automatically created to hold
WinForm resources, etc.

If you create a .resx explicitly and add it to your project (for example, to
hold string resources for internationalization purposes), VS.NET will use
the filename prefixed with a namespace.  The namespace will be a combination
of your project's default namespace and the filepath to the .resx file.  So,
if you have a file called strings.resx in subdirectory 'Other' of a project
with namespace 'Stuff', the resource will be embedded as
Stuff.Other.strings.resource.

So, parsing an associated .cs file is only sometimes appropriate (for the
cases where the .resx file was automatically created behind the scenes).

-----Original Message-----
From: Matthew Mastracci [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:50 AM
To: Vincent Labatut
Cc: [EMAIL PROTECTED]
Subject: Re: [nant-dev] solution task fix

Unfortunately, VS.NET uses the name of the class as the generated resources
filename.  Changing this would break any designer-created code.

BTW, as a friendly suggestion.  :)  I can't read your mail from Sept. 9
because it appears to be encoded in something other than text/plain.  I get
nant-users in digest form, which means that I ignore any HTML/RTF mail that
gets sent to it (not fun reading through HTML tags, as you can probably
imagine).  For archival purposes, it is highly recommended to send mail to
the mailing list in text/plain format only.  If this is not possible, ensure
that your mail client is at least sending this as backup to text/html.

Matt.

Vincent Labatut wrote:

>hi,
>
>i think there's a problem in the way compiled resource filenames are
computed in the solution task. I had a collision which was failing my build
(cf my mail to the nant users list "solution task - problem with resources"
on the 9th sept).
>
>The filenames are computed by scanning the corresponding source files (cs
or vb) to each resx file, looking for a namespace and class with a regexp,
maybe to find out a unique name (namespace + classname should be unique).
The problem is that the regexp used aren't robust enough.
>
>There is also in the code an alternative way of doing so : using the path
of the file as a unique name, and this seems to work well.
>
>I can't figure out why this first manner is put forward in the code, it
sounds like making two many assumptions to me, whereas more robust
algorithms exist.
>
>may I suggest the following fix, it forces the alternative way. If adopted,
3 functions would need to be deleted as well (GetDependentResourceName and
the like), not included in this fix for clarity.
>
>
>
>--- resource.cs Wed Sep 03 11:00:01 2003
>+++ resource.cs Wed Sep 17 15:18:35 2003
>@@ -225,9 +225,9 @@
>             string inFile = _resourceSourceFile;
>             string outFile;
>
>-            if (!StringUtils.IsNullOrEmpty(_dependentFile)) {
>-                outFile = GetDependentResourceName(_dependentFile);
>-            } else {
>+            // if (!StringUtils.IsNullOrEmpty(_dependentFile)) {
>+            //    outFile = GetDependentResourceName(_dependentFile);
>+            // } else {
>                 StringBuilder sb = new StringBuilder();
>                 if
(!StringUtils.IsNullOrEmpty(Project.ProjectSettings.RootNamespace)) {
>                     sb.Append(Project.ProjectSettings.RootNamespace);
>@@ -240,7 +240,7 @@
>                 }
>                 sb.Append(".resources");
>                 outFile = sb.ToString();
>-            }
>+            //}
>             outFile =
> Project.ProjectSettings.GetTemporaryFilename(outFile);
>
>             _solutionTask.Project.Indent();
>
>
>
>It does not prevent my project to have localized resource dlls (which BTW
need dedicated tasks).
>





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to