When working in enterprise development there are occasions when you have a solution file with 10 or more projects in it all using private assemblies. When a low level assembly's location changes you end up with a solution file with 10 or more broken references. The macro listed below is designed to save you from the pain staking task of fixing each reference one by one. When the macro listed below is run it will display a window file dialog at which point you will point to the new location of the assembly. Next the macro will walk through each project file and update the reference to the assembly you choose if there is one.In order to run the macro you need to navigate to the "TOOLS" menu and choose macro IDE. Next choose File --> Add New Item. From the dialog screen choose a new module. Finally cut and paste the entire code listed below inside the code window overwriting the default module framework that is listed.Imports EnvDTEImports System.DiagnosticsImports Microsoft.VisualBasicImports Microsoft.VisualBasic.ControlCharsImports System.WindowsImports System.Windows.FormsImports SystemPublic Module Module1Public Class WinWrapperImplements System.Windows.Forms.IWin32WindowOverridable ReadOnly Property Handle() As System.IntPtr ImplementsSystem.Windows.Forms.IWin32Window.HandleGetDim iptr As New System.IntPtr(DTE.MainWindow.HWnd)Return iptrEnd GetEnd PropertyEnd ClassPublic Sub UpdateReference()Dim startDirDim newAssembLocationDim outdirectory As StringDim stemp, Macroprojname As StringDim prjSolution As EnvDTE.ProjectDim openfile As Forms.FileDialogDim result As Forms.DialogResultDim tlbimppath As Microsoft.Win32.RegistryKeyDim winptr As WinWrapperwinptr = New WinWrapperopenfile = New Forms.OpenFileDialog'set the initial directory to SystemDrivestartDir = System.Environment.SystemDirectory()startDir = Left(startDir, InStr(startDir, "\", CompareMethod.Text))openfile.InitialDirectory = startDirIf openfile.ShowDialog(winptr) = result.OK ThennewAssembLocation = Right(openfile.FileName,Len(openfile.FileName) - Len(System.Environment.CurrentDirectory) - 1)End IfDim myProj As IntegerDim prjVSProject As VSLangProj.VSProjectTryFor myProj = 1 To DTE.Solution.Projects.CountprjVSProject = DTE.Solution.Projects.Item(myProj).ObjectIf prjVSProject Is Nothing ThenMsgBox("Unable to get reference to solution file")Exit SubEnd IfDim myRef As VSLangProj.Reference' Strip off the .dll ext so we can use the find commandnewAssembLocation = newAssembLocation.Replace(".dll", "")myRef = prjVSProject.References.Find(newAssembLocation)If Not myRef Is Nothing Then' remove the old referencemyRef.Remove()' add the new oneprjVSProject.References.Add(openfile.FileName)Else' We did not find a reference to this assembly hereEnd IfNextCatch err As System.ExceptionEnd TryEnd SubEnd Module