Skip to content

Commit fc01986

Browse files
committed
#154 Enhance build settings and NuGet packaging metadata
Updated project files to improve NuGet packaging and SourceLink integration: - Added `<IsPackable>false</IsPackable>` to prevent standalone NuGet packaging. - Included repository metadata (`<RepositoryUrl>` and `<PublishRepositoryUrl>`). - Enabled SourceLink and deterministic build settings with `<EmbedUntrackedSources>` and `<ContinuousIntegrationBuild>`. Refined dependencies: - Added `Microsoft.SourceLink.GitHub` (v8.0.0) for GitHub SourceLink support. - Retained `Microsoft.CodeAnalysis.NetAnalyzers` (v9.0.0) for static analysis. Removed obsolete properties and comments: - Removed `_SkipUpgradeNetAnalyzersNuGetWarning` and outdated comments. Updated `run_nuget_validation.ps1`: - Added `dotnet clean`, `dotnet build`, and `dotnet pack` commands. - Integrated `dotnet-validate` for NuGet package validation.
1 parent f5c7d04 commit fc01986

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

CryptoNet.ExtShared/CryptoNet.ExtShared.csproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<LangVersion>10.0</LangVersion>
66
<Nullable>enable</Nullable>
7-
<!-- Prevent this project from being packed as its own NuGet package.
8-
That ensures its compiled DLL will be embedded into CryptoNet when
9-
packing the top-level project. -->
7+
108
<IsPackable>false</IsPackable>
11-
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
9+
<RepositoryUrl>https://github.com/itbackyard/CryptoNet</RepositoryUrl>
10+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1211

13-
<!-- Produce portable PDBs and deterministic outputs for symbol/SourceLink validation -->
12+
<!-- SourceLink + deterministic build settings -->
1413
<DebugType>portable</DebugType>
1514
<Deterministic>true</Deterministic>
15+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
16+
17+
<!-- Embed generated (untracked) sources so SourceLink validation passes -->
18+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1619
</PropertyGroup>
1720

1821
<ItemGroup>

CryptoNet.Models/CryptoNet.Models.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<LangVersion>10.0</LangVersion>
66
<Nullable>enable</Nullable>
7-
<!-- Prevent this project from being packed as its own NuGet package. -->
7+
88
<IsPackable>false</IsPackable>
9+
<RepositoryUrl>https://github.com/itbackyard/CryptoNet</RepositoryUrl>
10+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
911

10-
<!-- Produce portable PDBs and deterministic outputs for symbol/SourceLink validation -->
12+
<!-- SourceLink + deterministic build settings -->
1113
<DebugType>portable</DebugType>
1214
<Deterministic>true</Deterministic>
15+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
16+
17+
<!-- Embed generated (untracked) sources so SourceLink validation passes -->
18+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1319
</PropertyGroup>
1420

1521
<ItemGroup>

run_nuget_validation.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Install if not installed
22
# dotnet tool install --global dotnet-validate --prerelease
33
# from solution root run:
4+
dotnet clean -c Release
5+
dotnet build -c Release
46
dotnet pack -c Release
57
dotnet-validate package local .\CryptoNet\bin\Release\*.nupkg

0 commit comments

Comments
 (0)