Create a web service.
Add a new resource file called Resources.resx - this will be created in the App_GlobalResources folder.
Add a string called 'Test'.
In the dummy HelloWorld method change to:
[WebMethod]
public string HelloWorld()
{
return Resources.Resources.Test;
}
This compiles fine.
Now use the reformat command. The code is changed to:
using Resources=Resources.Resources;
...
[WebMethod]
public string HelloWorld()
{
return Resources.Test;
}
Which won't compile.
Note that if we call the resource file something else then there is no problem.
I'm not completely sure if this is an R# or VS 2005 bug.
Issue was closed
namespace Resources
{
class Resources
{
public static string Foo {
get { return "fwefnklwe"; }
}
}
}
using System;
using Resources=Resources.Resources;
namespace testAliaces
{
class Program
{
static void Main(string[] args)
{
Console.Out.WriteLine(Resources.Foo);
}
}
}