Skip to content

Commit 024d42c

Browse files
committed
Enable SourceLink and deterministic builds
These settings enable SourceLink, whereby users of published NetMQ packages can step into the source of the library itself in IDEs that support it, such as Visual Studio. Also enables deterministic builds.
1 parent 5f5eb5a commit 024d42c

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

src/Directory.Build.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<!-- Workaround for https://github.com/dotnet/sourcelink/issues/572 -->
3+
<PropertyGroup>
4+
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
8+
</ItemGroup>
9+
</Project>

src/NetMQ.sln

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26228.9
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30104.148
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Performance", "Performance", "{1D49A4C6-C03C-4F72-9A27-42C8E5219BBA}"
77
EndProject
@@ -12,13 +12,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
..\.travis.yml = ..\.travis.yml
1313
..\appveyor.yml = ..\appveyor.yml
1414
..\COPYING.LESSER = ..\COPYING.LESSER
15+
Directory.Build.targets = Directory.Build.targets
1516
..\mkdocs.yml = ..\mkdocs.yml
1617
..\README.md = ..\README.md
1718
EndProjectSection
1819
EndProject
1920
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FF13931E-D7A0-489E-9530-0F972DAE1167}"
2021
ProjectSection(SolutionItems) = preProject
2122
..\docs\actor.md = ..\docs\actor.md
23+
..\docs\async-await.md = ..\docs\async-await.md
2224
..\docs\beacon.md = ..\docs\beacon.md
2325
..\docs\cleanup.md = ..\docs\cleanup.md
2426
..\docs\devices.md = ..\docs\devices.md
@@ -39,7 +41,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FF13931E-D
3941
..\docs\timer.md = ..\docs\timer.md
4042
..\docs\transports.md = ..\docs\transports.md
4143
..\docs\xpub-xsub.md = ..\docs\xpub-xsub.md
42-
..\docs\async-await.md = ..\docs\async-await.md
4344
EndProjectSection
4445
EndProject
4546
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetMQ", "NetMQ\NetMQ.csproj", "{49C06317-631D-435F-BE51-A26618FBC2C1}"

src/NetMQ/NetMQ.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414
<PackageProjectUrl>https://github.com/zeromq/netmq</PackageProjectUrl>
1515
<PackageLicenseUrl>https://github.com/zeromq/netmq/blob/master/COPYING.LESSER</PackageLicenseUrl>
1616
<RepositoryType>git</RepositoryType>
17-
<IncludeSymbols>true</IncludeSymbols>
1817
<RepositoryUrl>https://github.com/zeromq/netmq.git</RepositoryUrl>
18+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
19+
<Deterministic>true</Deterministic>
20+
<DeterministicSourcePaths>true</DeterministicSourcePaths>
1921
<IncludeSource>true</IncludeSource>
22+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23+
<IncludeSymbols>true</IncludeSymbols>
24+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2025
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2126
</PropertyGroup>
2227

@@ -32,6 +37,7 @@
3237
<ItemGroup>
3338
<PackageReference Include="AsyncIO" Version="0.1.69" />
3439
<PackageReference Include="JetBrains.Annotations" Version="10.4.0" PrivateAssets="All" />
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
3541
<PackageReference Include="NaCl.Net" Version="0.1.6-pre" />
3642
</ItemGroup>
3743

0 commit comments

Comments
 (0)