diff --git a/CHECKLIST.md b/CHECKLIST.md deleted file mode 100644 index adb395d..0000000 --- a/CHECKLIST.md +++ /dev/null @@ -1,12 +0,0 @@ -# Checklist for creating a new repo - -The following are some helpful steps and ideas to consider when you are creating a new repository from this template. Some of the ideas may be good ideas for repos generally. - -We will eventually break this checklist into meaningful sections. - -- [ ] Provide a concise and accurate description of your project in the GitHub "description" field. -- [ ] Provide a meaningful URL for your project, as appropriate. For .NET Core projects, this should be "https://github.com/dotnet/core". -- [ ] Update all of the README.md files to be specific to your project, taking care to replace all of the "New Repo" strings. -- [ ] The contributing link in CONTRIBUTING.md is a good choice for .NET Core projects. Update as appropriate. -- [ ] Delete the entry in THIRD-PARTY-NOTICES - it is there solely as an example -- [ ] Delete CHECKLIST.md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 718730d..a313f37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,3 @@ # Contributing -See [Contributing](https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/contributing.md) for general information about coding styles, source structure, making pull requests, and more. +See [Contributing](https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md) for general information about coding styles, source structure, making pull requests, and more. diff --git a/Documentation/README.md b/Documentation/README.md index 6e05300..6a6cbe3 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -1,14 +1,8 @@ # Documents Index -## Reproducible-Dotnetsdk - -This folder documents various settings in MSBuild necessary for configuring repeatible builds through isolation. +This folder documents various settings in MSBuild necessary for configuring repeatable builds through isolation. - [Reproducible MSBuild](./Reproducible-MSBuild/README.md) - [Organization](./Reproducible-MSBuild/Organization.md) - [Techniques](./Reproducible-MSBuild/Techniques/toc.md) - [References](./Reproducible-MSBuild/References.md) - - - - diff --git a/Documentation/Reproducible-MSBuild/Organization.md b/Documentation/Reproducible-MSBuild/Organization.md index 17130d5..ccdfd56 100644 --- a/Documentation/Reproducible-MSBuild/Organization.md +++ b/Documentation/Reproducible-MSBuild/Organization.md @@ -8,11 +8,11 @@ Each technique is categorized by two qualitative dimensions - Recommendation, an - Always: a technique that affects some build behavior that most users will utilize. For instance, resolution of C# framework assemblies. - Sometimes: a technique that affects only some infrequently used feature. This technique can generally be skipped if difficult to adopt and your team doesn't use that feature -- Rarely: a technique that generally doesn't affect users of the msbuild feature it's improving. This technique should generally be skipped unless you face the specific symptoms described in the technique. +- Rarely: a technique that generally doesn't affect users of the MSBuild feature it's improving. This technique should generally be skipped unless you face the specific symptoms described in the technique. ## Impact 'Impact' characterizes how much a technique may interfere with your dev team's workflow. - Low: a technique that is generally set once and forget. Developers might not realize it's even there. - Medium: developers working on the repo are likely to notice this technique in use, but find it generally easy to learn. -- High: a technique that negatively impacts developers often enough that many may consider it too much of a hastle to adopt. \ No newline at end of file +- High: a technique that negatively impacts developers often enough that many may consider it too much of a hassle to adopt. diff --git a/Documentation/Reproducible-MSBuild/README.md b/Documentation/Reproducible-MSBuild/README.md index bc04955..a1db40d 100644 --- a/Documentation/Reproducible-MSBuild/README.md +++ b/Documentation/Reproducible-MSBuild/README.md @@ -1,6 +1,6 @@ # Reproducible MSBuild -If you're landing here, you're probably interested in making your builds more repeatable or improve build reliability in some way. This wiki records a number of techniques and tricks for making MSBuild based builds repeatable through isolation from other installed software on your build machines. +If you're landing here, you're probably interested in making your builds more repeatable or improve build reliability in some way. This project describes a number of techniques and tricks for making MSBuild based builds repeatable through isolation from other installed software on your build machines. This follows a few principles: @@ -22,19 +22,14 @@ Anything "installed" during your build should be removable by `git clean` on the If your repo has prerequisites, it's often polite to create an init.cmd that locally installs these prerequisites. If not, your README.md should indicate what prerequisites the user must install. -Additionally, it's best to strongly prefer prerequisites that can be installed side-by-side. For instance, the dotnetsdk can be "installed" by adding it to the path and disabling multi-level-lookup. +Additionally, it's best to strongly prefer prerequisites that can be installed side-by-side. For instance, the .NET SDK can be "installed" by adding it to the path and disabling multi-level-lookup. -> E.g. my README.md instructs users that they need to only install dotnetsdk according to the version in global.json, and the repo takes care of everything else. The user can either install it normally, or install it 'standalone'. The build lab always installs it 'standalone' to validate that we can always build with just one version installed. +> E.g. my README.md instructs users that they need to only install .NET SDK according to the version in global.json, and the repo takes care of everything else. The user can either install it normally, or install it 'standalone'. The build lab always installs it 'standalone' to validate that we can always build with just one version installed. ## Tool versions matter Every tool used in the build should be pre-configured to support locking to an older version, in case of regression in the build tooling. Regressions include user "bugs" that the build tooling used to accept in a previous release. -This guide generally prefers using dotnetsdk over Visual Studio as dotnetsdk's install script supports a `-Version` argument to easily lock a repo to an earlier sdk version until a regression can be addressed. - -> E.g. my global.json is currently configured for 3.1.407 and latestPatch. However, if a new version regresses something, I know I can easily edit global.json to lock it back to 3.1.407 precisely. This unblocks my main branch builds, and gives me time to file a bug against the dotnetsdk for the regression and seek a workaround. - - - - +This guide generally prefers using .NET SDK over Visual Studio as .NET SDK's install script supports a `-Version` argument to easily lock a repo to an earlier sdk version until a regression can be addressed. +> E.g. my global.json is currently configured for 8.0.400 and latestPatch. However, if a new version regresses something, I know I can easily edit global.json to lock it back to 8.0.300 precisely. This unblocks my main branch builds, and gives me time to file a bug against the .NET SDK for the regression and seek a workaround. diff --git a/Documentation/Reproducible-MSBuild/References.md b/Documentation/Reproducible-MSBuild/References.md index 48564bf..d583914 100644 --- a/Documentation/Reproducible-MSBuild/References.md +++ b/Documentation/Reproducible-MSBuild/References.md @@ -3,4 +3,4 @@ Useful references # MSBuild - [MSBuild](https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild?view=vs-2019) on msdn - - [Customize all .NET builds](https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019#customize-all-net-builds) lists a number of extensibility points of the default targets that ship with MSBuild. \ No newline at end of file + - [Customize all .NET builds](https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019#customize-all-net-builds) lists a number of extensibility points of the default targets that ship with MSBuild. diff --git a/Documentation/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md b/Documentation/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md index 0320805..82b070b 100644 --- a/Documentation/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md +++ b/Documentation/Reproducible-MSBuild/Techniques/DOTNET_MULTILEVEL_LOOKUP.md @@ -33,4 +33,4 @@ export DOTNET_MULTILEVEL_LOOKUP=0 ## References - [Dotnet command / Environment Variables](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet#environment-variables) -- [Multi-level SharedFX Lookup](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md) \ No newline at end of file +- [Multi-level SharedFX Lookup](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md) diff --git a/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md b/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md index f58ef5f..f4cfddb 100644 --- a/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md +++ b/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitLibraryPacksFolder.md @@ -15,4 +15,4 @@ In Directory.Build.props ## References - [Microsoft.NET.NuGetOfflineCache.targets](https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.NuGetOfflineCache.targets) -- Official documentation: none? \ No newline at end of file +- Official documentation: none? diff --git a/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md b/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md index b96ddf4..451f808 100644 --- a/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md +++ b/Documentation/Reproducible-MSBuild/Techniques/DisableImplicitNuGetFallbackFolder.md @@ -15,4 +15,4 @@ In Directory.Build.props ## References - [Microsoft.NET.NuGetOfflineCache.targets](https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.NuGetOfflineCache.targets) -- Official documentation: none? \ No newline at end of file +- Official documentation: none? diff --git a/Documentation/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md b/Documentation/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md index 527ee60..925cdd0 100644 --- a/Documentation/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md +++ b/Documentation/Reproducible-MSBuild/Techniques/NUGET_XMLDOC_MODE.md @@ -18,9 +18,8 @@ variables: NUGET_XMLDOC_MODE: '' ``` -Unfortunatelyly there is no way known at this time to override this setting via MSBuild properties. Each developer will need to check if any installed program has overriden this setting. +Unfortunately there is no way known at this time to override this setting via MSBuild properties. Each developer will need to check if any installed program has changed this setting. ## Remarks The dotnet sdk docker image sets NUGET_XMLDOC_MODE=skip ([issue 2790](https://github.com/dotnet/dotnet-docker/issues/2790)), which causes builds run under this docker image to produce results different from a typical developer workstation. Thousands of developers are using this build image for their lab builds in the Azure organization. - diff --git a/Documentation/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md b/Documentation/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md index 5bce90a..8160d8d 100644 --- a/Documentation/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md +++ b/Documentation/Reproducible-MSBuild/Techniques/NetCoreTargetingPackRoot.md @@ -1,12 +1,12 @@ # NetCoreTargetingPackRoot -Similar to [`TargetFrameworkRootPath`](./TargetFrameworkRootPath.md), the msbuild property `NetCoreTargetingPackRoot` +Similar to [`TargetFrameworkRootPath`](./TargetFrameworkRootPath.md), the MSBuild property `NetCoreTargetingPackRoot` controls where dotnet sdk builds "sniff out" installed reference assemblies for dotnet runtimes. The target `ResolveTargetingPackAssets` will try seeing if there are any such reference assemblies installed into the `dotnet/packs/` folder. If not found, then MSBuild's built in targets will attempt to resolve the appropriate Microsoft.NETCore.App.Ref nuget package instead. -This can be problematic for reproducibility, as upgrading your dotnetsdk can result in a different set of packs available, and possible build failures if that nuget package isn't available on your nuget feed. +This can be problematic for reproducibility, as upgrading your .NET SDK can result in a different set of packs available, and possible build failures if that nuget package isn't available on your nuget feed. - Recommendation: Always - Impact: Low diff --git a/Documentation/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md b/Documentation/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md index 6eff20e..1861b84 100644 --- a/Documentation/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md +++ b/Documentation/Reproducible-MSBuild/Techniques/TargetFrameworkRootPath.md @@ -45,4 +45,4 @@ Using the nuget package will produce consistent results regardless of installed ## References - [GetReferenceAssemblyPaths task](https://docs.microsoft.com/en-us/visualstudio/msbuild/getreferenceassemblypaths-task?view=vs-2019) -- Github issue, closed: [TargetFrameworkRootPath not respected](https://github.com/dotnet/msbuild/issues/598) \ No newline at end of file +- Github issue, closed: [TargetFrameworkRootPath not respected](https://github.com/dotnet/msbuild/issues/598) diff --git a/README.md b/README.md index 93fb517..2761d81 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Add the following to your `Directory.Build.props` file so all projects in your s ```xml - + ``` -MSBuild 16.10 is required to generate binaries that can be fully reproduced. You'll need Visual Studio 2019 16.10 and/or .NET 5.0.300 SDK. You'll get a warning +MSBuild 17.8 is required to generate binaries that can be fully reproduced. You'll need Visual Studio 2022 17.8 and/or .NET 8.0.100 SDK. You'll get a warning 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): @@ -58,11 +58,9 @@ If you check out the same commit with the same SDK version and same nuget feed, Add the following to the top of your projects or to `Directory.Build.props`: ```xml - + ``` -Tested on MSBuild 16.7 (Latest LTS at time of writing). - ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for information on contributing to this project. @@ -77,11 +75,3 @@ This project is licensed with the [MIT license](LICENSE). ## .NET Foundation DotNet.ReproducibleBuilds is a [.NET Foundation project](https://dotnetfoundation.org/projects). - -## Related Projects - -You should take a look at these related projects: - -- [.NET Core](https://github.com/dotnet/core) -- [ASP.NET](https://github.com/aspnet) -- [Mono](https://github.com/mono) diff --git a/src/DotNet.ReproducibleBuilds/CHANGELOG.md b/src/DotNet.ReproducibleBuilds/CHANGELOG.md index d6b863c..4ced86b 100644 --- a/src/DotNet.ReproducibleBuilds/CHANGELOG.md +++ b/src/DotNet.ReproducibleBuilds/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [1.2.25] + +### Added + +- [Align RepositoryBranch logic with .NET 9](https://github.com/dotnet/reproducible-builds/pull/50) - thanks @MattKotsenas! + +### Removed + +- [Bump required SDK to 8+ and remove fixed issues](https://github.com/dotnet/reproducible-builds/pull/52) - thanks @MattKotsenas! + +## [1.2.4] + +### Added + +- [Set the `DisableImplicitLibraryPacks` property to `true` to prevent using packages from the .NET SDK's built-in package sources.](https://github.com/dotnet/reproducible-builds/pull/21) - thanks @cmeeren! +- [Populate the `RepositoryBranch` property if other Repository Metadata has been requested to be made public.](https://github.com/dotnet/reproducible-builds/pull/27) - thanks @kzu! + +### Removed + +- [No longer include the .NET Framework reference assembly packages, because the .NET SDK does this now.](https://github.com/dotnet/reproducible-builds/pull/33) - thanks @MattKotsenas! + ## [1.2.0] ### Added @@ -9,4 +30,4 @@ ### Removed -- [Remove the automatically provided .NET Framework reference assembly PackageReference, since the SDK provides this already](https://github.com/dotnet/reproducible-builds/pull/33) - thanks @MattKotsenas! \ No newline at end of file +- [Remove the automatically provided .NET Framework reference assembly PackageReference, since the SDK provides this already](https://github.com/dotnet/reproducible-builds/pull/33) - thanks @MattKotsenas!