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

Commit 2b4cd59

Browse files
committed
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 7f3236f commit 2b4cd59

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
@@ -119,9 +119,17 @@ static CompositionContainer CreateCompositionContainer(ExportProvider defaultExp
119119
var loginManager = CreateLoginManager(compositionContainer);
120120
compositionContainer.ComposeExportedValue<ILoginManager>(loginManager);
121121

122+
// Ensure GitHub.Resources.dll has been loaded and it visible to XAML
123+
EnsureLoaded(typeof(GitHub.Resources));
124+
122125
return compositionContainer;
123126
}
124127

128+
static void EnsureLoaded(Type type)
129+
{
130+
// Ensure the containing assembly has been loaded
131+
}
132+
125133
static LoginManager CreateLoginManager(CompositionContainer compositionContainer)
126134
{
127135
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
@@ -91,10 +91,6 @@
9191
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
9292
<IncludeInVSIX>true</IncludeInVSIX>
9393
</Content>
94-
<Content Include="UI\GitHub.Resources.dll">
95-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
96-
<IncludeInVSIX>true</IncludeInVSIX>
97-
</Content>
9894
<None Include="source.extension.vsixmanifest">
9995
<SubType>Designer</SubType>
10096
</None>
@@ -136,7 +132,7 @@
136132
<SpecificVersion>False</SpecificVersion>
137133
<HintPath>..\..\build\Content\GitHub.Logging.dll</HintPath>
138134
</Reference>
139-
<Reference Include="GitHub.Resources, Version=2.9.0.0, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e, processorArchitecture=MSIL">
135+
<Reference Include="GitHub.Resources, Version=2.10.2.0, Culture=neutral, PublicKeyToken=bc1bd09f2901c82e, processorArchitecture=MSIL">
140136
<SpecificVersion>False</SpecificVersion>
141137
<HintPath>..\..\build\Content\GitHub.Resources.dll</HintPath>
142138
</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)