Web developer from Sydney Australia. Currently using asp.net, mvc where possible.

Sunday, September 25, 2011

Project to File Reference Switcher for Visual Studio

Switching from project to file references in visual studio has always been a pain. Once you add a project to the solution you have to go find all the locations the assembly is referenced by file path and remove and update to a project reference.

On top of playing hide and seek with references, the actual act of changing references is a slow and painful experience.

So I decided to experiment and write my first visual studio extension, "Reference Switcher"

Once installed it will sit patiently in the background and only activate when you add or remove a project from the solution.

When you add a project, it gets the assembly name defined by the project and then checks to see if other projects in the solution are referencing that assembly name. If they do, it will open a alert box (sorry, send a push request) and ask if you would like to switch the file reference to a project reference. Just hit OK and it will go ahead and switch all the references for you.

When you remove a project, it all happens in reverse. So any project references that it changed are restored back to the original file based reference.

Here are some screen shots of the extension in action:

1) Adding a existing project (existing projects have a file references to this one)


2) Shows projects that can be updated to use a project reference


3) Now the references have changed to Project References



4) When the project is removed, Reference Switcher confirms before changing the references back to there original location


5)Now the reference has changed back to a file reference


That's all there is to it. Small & simply but very handy.

The extension source can be found on git hub here:
Extension can be found in the gallery here:

Shout it

kick it on DotNetKicks.com

30 comments:

Jason said...

Very neat - looking forward to giving this a shot!

Gatesben said...

well said...pointable...
Hire iPhone Developers

Michael Reichenauer said...

Very nice. Have been locking for something like this for years. It will really make developing much easier when including external modules.
Found minor problem: The extension seems to have problem detecting references in projects located within solution folders (i.e. not file folders). Moving the projects out of the folders makes the extension work as expected.

Inheritx Solutions said...

interesting article and impressive point of view, thanks

Ruby on Rails Development | Asp.net Development

Unknown said...

I have known many information from this. i like this post.

Thanks for sharing.

Mechanical Seals

Unknown said...

Nice program!!! Used it a lot!

Any plans on upgrading it to vs 2012?

hellanadam said...

I wondered 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.
ios App Development Company
Android App Development

Company

Mobile App Development

Company

Sandeep SEO said...

This is both interesting and relevant. We see this sort of thing regularly. You are doing a great job................Visit our Training Institute website for Oracle Fusion Courses.

Rajesh said...

you are providing such a valuable information about studying..and also have some good key points for every student.
Oracle Financials Training in Hyderabad

Anonymous said...

nice article! very useful information. Keep sharing this kind of valuable blogs regularly. to hire web development team- click here

Unknown said...

Thanks for posting the article on oracle apps. I am new for this website I feel happy reading this post. Keep posting more blogs on Oracle. For more details about Oracle R12 Financials, please Click Here

Master Blogers said...

jackpot win18bola
win18bola
judi cmd368

shakunthala said...

thanks for sharing this post with us.
Dot Net Training Institutes in Bangalore
full stack training in bangalore
best angular js training in bangalore

venkateshj said...

We provide best Selenium training in Bangalore, automation testing with live projects. Cucumber, Java Selenium and Software Testing Training in Bangalore.
Online selenium training in India - KRN Informatix is a leading Selenium Training Institute in Bangalore offering extensive Selenium Training
Online selenium training in India
Weekdays selenium training in bangalore
Weekend selenium training in bangalore
Weekend online selenium training
Java Selenium Automation Training in Bangalore
Online selenium training in India

Jones Brianna said...

Guide Good! Thank you for detailing each step of this Application. This post is very beneficial and relevant for me. Keep Sharing

Dating App Development Services

Unknown said...

no togel gendong bayi 4d

Unknown said...

Mimpi ini melambangkan bahwa sang pemimpi akan memperoleh kemuliaan dan penghormatan dalam waktu dekat. tafsir mimpi kebakaran togel Perlu bersyukur bagi kamu yang mendapati mimpi ini

Unknown said...

mimpi ular hijau togel Arti mimpi melihat ular dipercaya memberikan pertanda positif bahwa kamu akan mendapatkan rezeki. Namun menurut tafsir yang lain, melihat ular juga bisa mendatangkan bencana

Unknown said...


situs poker online asia Bonus besar selalu dinantikan oleh situs poker online Asia. Untuk anggota yang ingin mengejar jumlah bonus tertinggi, mereka diberikan ruang tak terbatas di mana masing-masing dapat mengumpulkan peluang terbesar. Situs Poker Online Asia Ingatlah Saat Mengejar Bonus Poker hanya ada di sini situs poker online asia

kumpulan games online said...

situs slot online terbesar di indonesia no.1 : slotvip

Unknown said...

Download apkp oker permainan kartu secara online dengan bermodalkan pulsa saja sudah bisa bermain dengan minimal deposit hanya 15 ribu.

Unknown said...

data toto macau 2020 data togel macau terlengkap dewa prediksi togel macau

Unknown said...


Rental Motor Bali
Rental dan Sewa Motor Traveloka. Aplikasi rental Motor lepas kunci

Unknown said...

Mainkan game demo Pragmatic Play secara gratis, termasuk video slot online populernya, Wolf Gold, Starz Megaways, dan Mustang Gold. Practical Play Slots adalah situs judi online yang menawarkan berbagai macam permainan judi slot dan permainan casino online live.slot online pragmatic demo

Unknown said...

Mainkan game demo Pragmatic Play secara gratis, termasuk video slot online populernya, Wolf Gold, Starz Megaways, dan Mustang Gold. Practical Play Slots adalah situs judi online yang menawarkan berbagai macam permainan judi slot dan permainan casino online live.slot bonus new member 100 di awal

Unknown said...

nice content

ONLEI Technologies Internship
Python Internship
Data Science Internship
Machine Learning Internship
Digital Marketing Internship

TerryAchie90 said...

DAFTARAHLIBET88 sekarang juga dan dapatkan bonus kemenangan ratusan juta rupiah setiap hari

ravi said...

thanks for sharing a nice blog if like more visit it https://snowflakemasters.in/

bhanu said...

thanks for your sharing
Salesforce CPQ Training
Salesforce CPQ Online Training Hyderabad

Aarya Sharma said...

Very good content. I learn new information from your article, the way you have clearly explained is really fantastic. Thanks a lot for this blog.

Cryptocurrency Development Company