From e99a0271777a146b7040174b9bd1a2a9bb6ea9a0 Mon Sep 17 00:00:00 2001 From: Matt Kotsenas Date: Fri, 12 Sep 2025 16:49:26 -0700 Subject: [PATCH 1/4] Add codes to existing warnings --- README.md | 4 ++-- {Documentation => docs}/README.md | 0 .../Reproducible-MSBuild/Organization.md | 0 .../Reproducible-MSBuild/README.md | 0 .../Reproducible-MSBuild/References.md | 0 .../Techniques/AssemblySearchPaths.md | 0 .../Techniques/DOTNET_MULTILEVEL_LOOKUP.md | 0 .../DisableImplicitLibraryPacksFolder.md | 0 .../DisableImplicitNuGetFallbackFolder.md | 0 .../Techniques/NUGET_XMLDOC_MODE.md | 0 .../Techniques/NetCoreTargetingPackRoot.md | 0 .../Techniques/TargetFrameworkRootPath.md | 0 .../Reproducible-MSBuild/Techniques/toc.md | 0 docs/diagnostics/RPB0001.md | 20 ++++++++++++++++ docs/diagnostics/RPB0002.md | 24 +++++++++++++++++++ .../Sdk/Sdk.props | 6 +++-- .../DotNet.ReproducibleBuilds.targets | 5 +++- 17 files changed, 54 insertions(+), 5 deletions(-) rename {Documentation => docs}/README.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Organization.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/README.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/References.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/AssemblySearchPaths.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md (100%) rename {Documentation => docs}/Reproducible-MSBuild/Techniques/toc.md (100%) create mode 100644 docs/diagnostics/RPB0001.md create mode 100644 docs/diagnostics/RPB0002.md diff --git a/README.md b/README.md index 2761d81..ad95148 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,13 @@ if you're using a lower version. Prerelease packages are available on the following [NuGet feed](https://dev.azure.com/dotnet/Projects/_packaging?_a=feed&feed=ReproducibleBuilds): `https://pkgs.dev.azure.com/dotnet/Projects/_packaging/ReproducibleBuilds/nuget/v3/index.json` -## DotNet.ReproducibleBuilds.Isolated Documentation and nuget package +## DotNet.ReproducibleBuilds.Isolated documentation and nuget package [![NuGet Version](https://img.shields.io/nuget/v/DotNet.ReproducibleBuilds.Isolated?style=flat&label=DotNet.ReproducibleBuilds.Isolated)](https://www.nuget.org/packages/DotNet.ReproducibleBuilds.Isolated) [![NuGet Downloads](https://img.shields.io/nuget/dt/DotNet.ReproducibleBuilds.Isolated?style=flat)](https://www.nuget.org/packages/DotNet.ReproducibleBuilds.Isolated) It's highly recommended that all projects enable these settings, either via -adding this package or manually, as described in [Documentation/Reproducible-MSBuild](Documentation/Reproducible-MSBuild/README.md). +adding this package or manually, as described in [docs/Reproducible-MSBuild](docs/Reproducible-MSBuild/README.md). This package configures a variety of properties and item groups to prevent your build from unintentionally depending on other installed software that's not described by your repo. All build dependencies should come diff --git a/Documentation/README.md b/docs/README.md similarity index 100% rename from Documentation/README.md rename to docs/README.md diff --git a/Documentation/Reproducible-MSBuild/Organization.md b/docs/Reproducible-MSBuild/Organization.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Organization.md rename to docs/Reproducible-MSBuild/Organization.md diff --git a/Documentation/Reproducible-MSBuild/README.md b/docs/Reproducible-MSBuild/README.md similarity index 100% rename from Documentation/Reproducible-MSBuild/README.md rename to docs/Reproducible-MSBuild/README.md diff --git a/Documentation/Reproducible-MSBuild/References.md b/docs/Reproducible-MSBuild/References.md similarity index 100% rename from Documentation/Reproducible-MSBuild/References.md rename to docs/Reproducible-MSBuild/References.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/AssemblySearchPaths.md b/docs/Reproducible-MSBuild/Techniques/AssemblySearchPaths.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/AssemblySearchPaths.md rename to docs/Reproducible-MSBuild/Techniques/AssemblySearchPaths.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md b/docs/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md rename to docs/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md b/docs/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md rename to docs/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md b/docs/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md rename to docs/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md b/docs/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md rename to docs/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md b/docs/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md rename to docs/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md b/docs/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md rename to docs/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md diff --git a/Documentation/Reproducible-MSBuild/Techniques/toc.md b/docs/Reproducible-MSBuild/Techniques/toc.md similarity index 100% rename from Documentation/Reproducible-MSBuild/Techniques/toc.md rename to docs/Reproducible-MSBuild/Techniques/toc.md diff --git a/docs/diagnostics/RPB0001.md b/docs/diagnostics/RPB0001.md new file mode 100644 index 0000000..9293aaa --- /dev/null +++ b/docs/diagnostics/RPB0001.md @@ -0,0 +1,20 @@ +# RPB0001: DotNet.ReproducibleBuilds minimum required MSBuild version + +## Description + +This warning occurs when the project is using an MSBuild version that is older than the minimum required version for +this package. + +## Cause + +The DotNet.ReproducibleBuilds package requires specific MSBuild features that were introduced in newer versions. Older +versions of MSBuild lack the necessary functionality to ensure reproducible builds. + +## Resolution + +To resolve this warning, update your development environment to use a supported version. + +## Related Documentation + +- [Upgrade to a new .NET version](https://learn.microsoft.com/en-us/dotnet/core/install/upgrade) +- [.NET SDK, MSBuild, and Visual Studio versioning](https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs) diff --git a/docs/diagnostics/RPB0002.md b/docs/diagnostics/RPB0002.md new file mode 100644 index 0000000..dc706c3 --- /dev/null +++ b/docs/diagnostics/RPB0002.md @@ -0,0 +1,24 @@ +# RPB0002: TargetFrameworkRootPath not initialized + +## Description + +This warning occurs when building .NET Framework projects without proper reference assembly configuration. +The `TargetFrameworkRootPath` property is undefined, which prevents the build system from locating the correct +.NET Framework reference assemblies. + +## Cause + +This warning appears when: +- Building a .NET Framework project (e.g., net462, net48) +- The `TargetFrameworkRootPath` MSBuild property is not properly set +- The `Microsoft.NETFramework.ReferenceAssemblies` NuGet package is not referenced + +## Resolution + +See [Build apps against Microsoft.NETFramework.ReferenceAssemblies](https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/reference-assemblies) + +## Related Documentation + +- [Microsoft.NETFramework.ReferenceAssemblies Package](https://www.nuget.org/packages/Microsoft.NETFramework.ReferenceAssemblies/) +- [Build apps against Microsoft.NETFramework.ReferenceAssemblies](https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/reference-assemblies) +- [Techniques/TargetFrameworkRootPath](../Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md) \ No newline at end of file diff --git a/src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.props b/src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.props index 54587c5..5652709 100644 --- a/src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.props +++ b/src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.props @@ -2,8 +2,8 @@