Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-337505: Move Declarations to Namespace Breaks Code

$
0
0
Reporter Daniel Sheiner (dsheinermx) Daniel Sheiner (dsheinermx)
Created Jan 22, 2013 7:52:02 PM
Updated Apr 26, 2018 1:38:04 PM
Resolved Apr 26, 2018 1:38:04 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Let's say I have the following:

namespace x.y.z
{
class Foo { ... }
}

Let's say I use Foo in 50 other classes in other namespaces, and Foo is the only class defined in namespace x.y.z. Let's also say that Foo actually belongs in namespace a.b.c. So I use ReSharper's "Move Declarations to Namespace", which moves Foo to a.b.c and adds "using a.b.c;" to every cs file containing a reference to x.y.z.Foo.

Unfortunately, all 50 files still have "using x.y.z;" which doesn't exist, and now I have 50 files that don't build.

How about updating the "Move Declarations to Namespace" feature so that in any projects where the old namespace doesn't exist anymore as a result of moving the declarations, those using statements are removed? Pretty please?

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>