@@ -1657,41 +1657,27 @@ module internal VsActual =
16571657
16581658 let CreateEditorCatalog () =
16591659 let thisAssembly = Assembly.GetExecutingAssembly() .Location
1660- let editorAssemblyDir = Path.Combine( vsInstallDir, @" IDE\CommonExtensions\Microsoft\Editor" )
1661- let privateAssemblyDir = Path.Combine( vsInstallDir, @" IDE\PrivateAssemblies" )
1662- let publicAssemblyDir = Path.Combine( vsInstallDir, @" IDE\PublicAssemblies" )
1663-
1664- let CreateAssemblyCatalog ( path , file ) =
1665- let fullPath = Path.GetFullPath( Path.Combine( path, file))
1666- if File.Exists( fullPath) then
1667- new AssemblyCatalog( fullPath)
1668- else
1669- failwith( " could not find " + fullPath)
1670-
1660+ let thisAssemblyDir = Path.GetDirectoryName( thisAssembly)
16711661 let list = new ResizeArray< ComposablePartCatalog>()
1672-
1673- let addMovedFile originalDir alternateDir file =
1674- let path = Path.Combine( originalDir, file)
1675- if File.Exists( path) then
1676- list.Add( CreateAssemblyCatalog( originalDir, file))
1662+ let add p =
1663+ let fullPath = Path.GetFullPath( Path.Combine( thisAssemblyDir, p))
1664+ if File.Exists( fullPath) then
1665+ list.Add( new AssemblyCatalog( fullPath))
16771666 else
1678- list.Add ( CreateAssemblyCatalog ( alternateDir , file ))
1667+ failwith <| sprintf " unable to find assembly %s " p
16791668
16801669 list.Add( new AssemblyCatalog( thisAssembly))
1681- list.Add( CreateAssemblyCatalog( editorAssemblyDir, " Microsoft.VisualStudio.Text.Data.dll" ))
1682- list.Add( CreateAssemblyCatalog( editorAssemblyDir, " Microsoft.VisualStudio.Text.Logic.dll" ))
1683-
1684- // "Microsoft.VisualStudio.Text.Internal.dll" moved locations between dev15 and 16
1685- // This ensures we can run in both Devs 15 and 16
1686- addMovedFile privateAssemblyDir editorAssemblyDir " Microsoft.VisualStudio.Text.Internal.dll"
1687-
1688- list.Add( CreateAssemblyCatalog( editorAssemblyDir, " Microsoft.VisualStudio.Text.UI.dll" ))
1689- list.Add( CreateAssemblyCatalog( editorAssemblyDir, " Microsoft.VisualStudio.Text.UI.Wpf.dll" ))
1690- list.Add( CreateAssemblyCatalog( privateAssemblyDir, " Microsoft.VisualStudio.Threading.dll" ))
1691- list.Add( CreateAssemblyCatalog( editorAssemblyDir, " Microsoft.VisualStudio.Platform.VSEditor.dll" ))
1692- list.Add( CreateAssemblyCatalog( editorAssemblyDir, " Microsoft.VisualStudio.Editor.Implementation.dll" ))
1693- list.Add( CreateAssemblyCatalog( publicAssemblyDir, " Microsoft.VisualStudio.ComponentModelHost.dll" ))
1694- list.Add( CreateAssemblyCatalog( publicAssemblyDir, " Microsoft.VisualStudio.Shell.15.0.dll" ))
1670+ [ " Microsoft.VisualStudio.Text.Data.dll"
1671+ " Microsoft.VisualStudio.Text.Logic.dll"
1672+ " Microsoft.VisualStudio.Text.Internal.dll"
1673+ " Microsoft.VisualStudio.Text.UI.dll"
1674+ " Microsoft.VisualStudio.Text.UI.Wpf.dll"
1675+ " Microsoft.VisualStudio.Threading.dll"
1676+ " Microsoft.VisualStudio.Platform.VSEditor.dll"
1677+ " Microsoft.VisualStudio.Editor.Implementation.dll"
1678+ " Microsoft.VisualStudio.ComponentModelHost.dll"
1679+ " Microsoft.VisualStudio.Shell.15.0.dll" ]
1680+ |> List.iter add
16951681 new AggregateCatalog( list)
16961682
16971683 let exportProvider = new CompositionContainer( new AggregateCatalog( CreateEditorCatalog()), true , null )
0 commit comments