Skip to content

Commit 298cf49

Browse files
committed
Add sourcelink support
Also align project with Touki
1 parent f39a7b1 commit 298cf49

File tree

1 file changed

+52
-26
lines changed

1 file changed

+52
-26
lines changed

vsinterop/vsinterop.csproj

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@
2727
<LangVersion>latest</LangVersion>
2828
<RootNamespace />
2929

30-
<PackageId>KlutzyNinja.VisualStudioInterop</PackageId>
31-
<Description>Provides direct COM access for VS interfaces on .NET and .NET Framework.</Description>
32-
<Authors>Jeremy W. Kuhne</Authors>
33-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
34-
<PackageProjectUrl>https://github.com/JeremyKuhne/vsinterop</PackageProjectUrl>
35-
<RepositoryUrl>https://github.com/JeremyKuhne/vsinterop</RepositoryUrl>
36-
<RepositoryType>git</RepositoryType>
37-
<PackageReadmeFile>README.md</PackageReadmeFile>
38-
<Copyright>Copyright (c) Jeremy W. Kuhne. All rights reserved.</Copyright>
39-
4030
<!-- Not a security boundary, the strong name is for identity and ease of use from other signed assemblies. -->
4131
<SignAssembly>True</SignAssembly>
4232
<AssemblyOriginatorKeyFile>..\klutzyninja.snk</AssemblyOriginatorKeyFile>
@@ -54,32 +44,68 @@
5444

5545
<ItemGroup>
5646
<PackageReference Include="KlutzyNinja.Madowaku" Version="0.1.0-alpha.2" />
57-
<PackageReference Include="MinVer" Version="6.0.0">
58-
<PrivateAssets>all</PrivateAssets>
59-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
60-
</PackageReference>
6147
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
6248
<PrivateAssets>all</PrivateAssets>
6349
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6450
</PackageReference>
65-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
66-
<PrivateAssets>all</PrivateAssets>
67-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
68-
</PackageReference>
51+
</ItemGroup>
52+
53+
<ItemGroup>
54+
<Folder Include="Framework\" />
55+
</ItemGroup>
56+
57+
<!--
58+
Pack (NuGet) related
59+
-->
60+
<PropertyGroup>
61+
<PackageId>KlutzyNinja.VisualStudioInterop</PackageId>
62+
<Description>Provides direct COM access for VS interfaces on .NET and .NET Framework.</Description>
63+
<Authors>Jeremy W. Kuhne</Authors>
64+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
65+
<PackageProjectUrl>https://github.com/JeremyKuhne/vsinterop</PackageProjectUrl>
66+
<RepositoryUrl>https://github.com/JeremyKuhne/vsinterop</RepositoryUrl>
67+
<RepositoryType>git</RepositoryType>
68+
<PackageReadmeFile>README.md</PackageReadmeFile>
69+
<Copyright>Copyright (c) Jeremy W. Kuhne. All rights reserved.</Copyright>
70+
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <repository> element) -->
71+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
72+
</PropertyGroup>
73+
<ItemGroup>
6974
<None Include="../README.md" Pack="true" PackagePath="" />
7075
</ItemGroup>
7176

72-
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
73-
<!-- This gets us .NET 6 System.IO repackaged for .NET Framework. -->
74-
<PackageReference Include="Microsoft.IO.Redist" Version="6.1.3" />
75-
<!-- This gets us Span. -->
76-
<PackageReference Include="System.Memory" Version="4.6.3" />
77-
<!-- This provides Range and Index support downlevel -->
78-
<PackageReference Include="Microsoft.Bcl.Memory" Version="9.0.8" />
77+
<!--
78+
SourceLink related
79+
-->
80+
<ItemGroup>
81+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
7982
</ItemGroup>
83+
<PropertyGroup>
84+
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
85+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
86+
87+
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
88+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
89+
90+
<!-- Embed symbols containing Source Link in the dll -->
91+
<DebugType>embedded</DebugType>
8092

93+
<!-- To make source paths relative for the "official" builds -->
94+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
95+
</PropertyGroup>
96+
97+
<!--
98+
Versioning
99+
-->
100+
<PropertyGroup>
101+
<!-- Ensures that MinVer can find the tags we're using, which start with `v` -->
102+
<MinVerTagPrefix>v</MinVerTagPrefix>
103+
</PropertyGroup>
81104
<ItemGroup>
82-
<Folder Include="Framework\" />
105+
<PackageReference Include="MinVer" Version="6.0.0">
106+
<PrivateAssets>all</PrivateAssets>
107+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
108+
</PackageReference>
83109
</ItemGroup>
84110

85111
</Project>

0 commit comments

Comments
 (0)