Project
ReSharper
Priority
Normal
Type
Bug
Fix versions
2.5
State
Fixed
Assignee
Dmitry Lomov
Subsystem
Language - ASP.NET
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Philip Lee
    5 years ago (06 Aug 2006 02:28)
  • Updated by   Philip Lee
    5 years ago (27 Nov 2006 13:05)
  • Jira: RSRP-19181
    (history, comments)
 
RSRP-19181 Adding global resources called Resources.resx confuses R# on reformat.
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
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
Comments (1)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Sergey Coox
  Sergey Coox
09 Aug 2006 04:43
5 years ago
Re: #19181- Adding global resources called Resources.resx confuses R# on reformat.
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);
}
}
}