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

Commit 1e789ed

Browse files
authored
Merge branch 'master' into fixes/1729-warn-when-no-origin
2 parents f755319 + e5709af commit 1e789ed

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/GitHub.VisualStudio.UI/GitHub.VisualStudio.UI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<ItemGroup>
2626
<PackageReference Include="Markdig.Signed" version="0.13.0" />
2727
<PackageReference Include="Markdig.Wpf.Signed" version="0.2.1" />
28+
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.27" />
2829
</ItemGroup>
2930

3031
<ItemGroup>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.IO;
2+
using System.Reflection;
3+
using NUnit.Framework;
4+
5+
public class GitHubAssemblyTests
6+
{
7+
[Theory]
8+
public void GitHub_Assembly_Should_Not_Reference_DesignTime_Assembly(string assemblyFile)
9+
{
10+
var asm = Assembly.LoadFrom(assemblyFile);
11+
foreach (var referencedAssembly in asm.GetReferencedAssemblies())
12+
{
13+
Assert.That(referencedAssembly.Name, Does.Not.EndWith(".DesignTime"),
14+
"DesignTime assemblies should be embedded not referenced");
15+
}
16+
}
17+
18+
[DatapointSource]
19+
string[] GitHubAssemblies => Directory.GetFiles(AssemblyDirectory, "GitHub.*.dll");
20+
21+
string AssemblyDirectory => Path.GetDirectoryName(GetType().Assembly.Location);
22+
}

0 commit comments

Comments
 (0)