Home >

Resharper and Using Directive clean up

3. March 2010

I have come across something in the project that I am working on that is weird. Resharper marks a using directive as unused because we use it through reflection. When we do a clean up it is removed. So I went hunting and found that you can tell Resharper to never removed certain namespaces. You can also tell it to add certain namespaces by default.

Open your Resharper Options Menu.

image

Then go to language ?> Namespace Import

image

Just click add on the should not be removed for the ones you don?t want deleted and add on the right for the ones that you want to add by default.

 

Enjoy.

Comments

3/24/2010 3:48:08 AM #
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.
3/26/2010 9:38:19 AM #
Amazing post, nice work. It Couldn't be published any greater. Reading this post reminds me of my old boss! He constantly kept speaking about this. I will forward this article to him. Pretty sure he will have a gratifying read. Thanks for posting!
3/27/2010 10:40:17 AM #
I thought it was going to be some boring old post, but it really compensated for my time.
3/29/2010 7:12:56 PM #
Well done, you have gained a new fan, resources like the one you mentioned here are very useful to me. I will post a link to this page on my blog. I am sure my visitors will find that very useful, please check out my site sometime and leave me a comment to let me know what you think. Regards, Marie
4/3/2010 9:59:00 AM #
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.
4/8/2010 12:07:49 AM #
Comfortably, the blogpost is honestly the greatest on this useful topic area. I concur with all your ideas and will eagerly expect your upcoming up-dates. Just saying thanks will not just be adequate, for the excellent clarity in your article. I will immediately look for your rss to keep informed of any updates. Admirable work and much success in your business endeavors! May god bless you, ...
4/8/2010 4:41:26 AM #
Extraordinary solution and well written post. I comprehended it right away!
4/22/2010 9:04:21 PM #
All I want to say is, yes!  Yes!  Yes!  Youre so right.  I want to get behind this so much.  You speak with so much authority, so much spirit, I feel as though youve definitely hit the nail on the head.  Good job with this.  Please keep brining us more because we need more of your type of blogger.
4/23/2010 5:56:42 AM #
How is it that just anybody can write a blog and get as popular as this?  Its not like youve said anything incredibly impressive --more like youve painted a pretty picture over an issue that you know nothing about!  I dont want to sound mean, here.  But do you really think that you can get away with adding some pretty pictures and not really say anything?
4/23/2010 10:26:02 PM #
You make a great point.  Got some great information here.  I think that if more people thought about it that way, theyd have a better time understanding the issue.  Your view is definitely something Id like to see more of.  Thanks for this blog.  Its fantastic and so is what youve got to say.
4/24/2010 2:06:11 PM #
I am really searching for such kind of information. I take web developing as my profession. It helps me to set a image.
4/24/2010 2:12:07 PM #
Best new Massage!!! - w4m (dubuque area)

4/24/2010 4:21:26 PM #
Hey - nice blog, just looking around some blogs, seems a pretty nice platform you are using. I'm currently using Wordpress
4/24/2010 5:04:20 PM #
Have you ever thought about adding a little bit more than just your thoughts?  I mean, what you say is important and everything.  But its got no punch, no pop!  Maybe if you added a pic or two, a video?  You could have such a more powerful blog if you let people SEE what youre talking about instead of just reading it.
4/25/2010 2:49:24 AM #
This is the perfect blog for anyone who wants to know about this topic.  You know so much its almost hard to argue with you (not that I really would want...HaHa).  You definitely put a new spin on a subject thats been written about for years.  Great stuff, just great!
4/26/2010 7:04:51 PM #
I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.
4/28/2010 1:53:33 AM #
Excellent article. Merci et bravo pour votre blog
4/28/2010 2:57:25 AM #
I think youve made some truly interesting points.  Not too many people would actually think about this the way you just did.  Im really impressed that theres so much about this subject thats been uncovered and you did it so well, with so much class.  Good one you, man!  Really great stuff here.
4/29/2010 2:46:17 AM #
Thank you for this helpfull review. It really was helpfull. Keep up the good work.
4/30/2010 12:01:11 AM #
The next time I read a blog, I hope that it doesnt disappoint me as much as this one.  I mean, I know it was my choice to read, but I actually thought youd have something interesting to say.  All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.