Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 46c2174

Browse files
jcansdaleStanleyGoldman
authored andcommitted
Avoid putting GitHub.Resources.dll on BindingPath
This would causes issues when the full extension is also installed. It wouldn't know which version of GitHub.Resources.dl to use.
1 parent e4355cd commit 46c2174

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

src/GitHub.VisualStudio.16/CompositionServices.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ static CompositionContainer CreateCompositionContainer(ExportProvider defaultExp
123123
// HACK: Stop ViewLocator from attempting to fetch a global service
124124
var viewViewModelFactory = compositionContainer.GetExportedValue<IViewViewModelFactory>();
125125
InitializeViewLocator(viewViewModelFactory);
126+
127+
// Ensure GitHub.Resources.dll has been loaded and it visible to XAML
128+
EnsureLoaded(typeof(GitHub.Resources));
126129

127130
return compositionContainer;
128131
}
@@ -133,6 +136,11 @@ static void InitializeViewLocator(IViewViewModelFactory viewViewModelFactory)
133136
factoryProviderFiled.SetValue(null, viewViewModelFactory);
134137
}
135138

139+
static void EnsureLoaded(Type type)
140+
{
141+
// Ensure the containing assembly has been loaded
142+
}
143+
136144
static LoginManager CreateLoginManager(CompositionContainer compositionContainer)
137145
{
138146
var keychain = compositionContainer.GetExportedValue<IKeychain>();

src/GitHub.VisualStudio.16/GitHub.VisualStudio.16.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@
9292
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
9393
<IncludeInVSIX>true</IncludeInVSIX>
9494
</Content>
95-
<Content Include="UI\GitHub.Resources.dll">
96-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
97-
<IncludeInVSIX>true</IncludeInVSIX>
98-
</Content>
9995
<None Include="source.extension.vsixmanifest">
10096
<SubType>Designer</SubType>
10197
</None>
@@ -137,7 +133,7 @@
137133
<SpecificVersion>False</SpecificVersion>
138134
<HintPath>..\..\build\Content\GitHub.Logging.dll</HintPath>
139135
</Reference>
140-
<Reference Include="GitHub.Resources, Version=2.9.0.0, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e, processorArchitecture=MSIL">
136+
<Reference Include="GitHub.Resources, Version=2.10.2.0, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e, processorArchitecture=MSIL">
141137
<SpecificVersion>False</SpecificVersion>
142138
<HintPath>..\..\build\Content\GitHub.Resources.dll</HintPath>
143139
</Reference>
-59.5 KB
Binary file not shown.
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3-
<Metadata>
4-
<Identity Id="f4fbb70d-dee2-4dee-b322-bd74e3010e8f" Version="2.10.2.0" Language="en-US" Publisher="GitHub, Inc" />
5-
<DisplayName>Clone from GitHub</DisplayName>
6-
<Description>Clone or checkout code from GitHub</Description>
7-
<PackageId>GitHub.VisualStudio.16</PackageId>
8-
</Metadata>
9-
<Installation AllUsers="true">
10-
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0, 17.0)" />
11-
</Installation>
12-
<Dependencies>
13-
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
14-
</Dependencies>
15-
<Prerequisites>
16-
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[16.0,17.0)" DisplayName="Visual Studio core editor" />
17-
</Prerequisites>
18-
<Assets>
19-
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
20-
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="GitHub.VisualStudio.UI.16" d:VsixSubPath="UI" Path="|GitHub.VisualStudio.UI.16|" AssemblyName="|GitHub.VisualStudio.UI.16;AssemblyName|" />
21-
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
22-
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="File" Path="UI\GitHub.Resources.dll" AssemblyName="GitHub.Resources, Version=2.10.2.0, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e" d:VsixSubPath="UI" />
23-
</Assets>
3+
<Metadata>
4+
<Identity Id="f4fbb70d-dee2-4dee-b322-bd74e3010e8f" Version="2.10.2.0" Language="en-US" Publisher="GitHub, Inc" />
5+
<DisplayName>Clone from GitHub</DisplayName>
6+
<Description>Clone or checkout code from GitHub</Description>
7+
<PackageId>GitHub.VisualStudio.16</PackageId>
8+
</Metadata>
9+
<Installation AllUsers="true">
10+
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0, 17.0)" />
11+
</Installation>
12+
<Dependencies>
13+
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
14+
</Dependencies>
15+
<Prerequisites>
16+
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[16.0,17.0)" DisplayName="Visual Studio core editor" />
17+
</Prerequisites>
18+
<Assets>
19+
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
20+
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="GitHub.VisualStudio.UI.16" d:VsixSubPath="UI" Path="|GitHub.VisualStudio.UI.16|" AssemblyName="|GitHub.VisualStudio.UI.16;AssemblyName|" />
21+
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
22+
</Assets>
2423
</PackageManifest>

0 commit comments

Comments
 (0)