Reporter |
|
---|---|
Created | Jul 10, 2010 1:14:08 PM |
Updated | Apr 7, 2018 11:25:24 AM |
Subsystem | Refactorings |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Critical |
State | Open |
Type | Bug |
Fix version | 2018.2 |
Affected versions | 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Creating a class inside an ASP.NET codebehind file and trying to move it to another file using the helper puts it in the wrong file.
For example, if you create class Foo in Bar.ascx.cs, the helper will extract it to Foo.ascx.cs.
It should go to Foo.cs.
I imagine the helper is using Path.GetFilenameWithoutExtension which returns "Bar.ascx". This is technically accurate, because ".ascx" is part of the filename where as ".cs" is the actual extension. Considering the usage scenario for this feature though (.NET devs), either the pseudo extensions should be trimmed or there should be explicit support for .aspx.cs, .ascx.cs and .ashx.cs.
For example, if you create class Foo in Bar.ascx.cs, the helper will extract it to Foo.ascx.cs.
It should go to Foo.cs.
I imagine the helper is using Path.GetFilenameWithoutExtension which returns "Bar.ascx". This is technically accurate, because ".ascx" is part of the filename where as ".cs" is the actual extension. Considering the usage scenario for this feature though (.NET devs), either the pseudo extensions should be trimmed or there should be explicit support for .aspx.cs, .ascx.cs and .ashx.cs.