Skip to content

Commit

Permalink
Merge pull request #21 from cmeeren/add-DisableImplicitLibraryPacksFo…
Browse files Browse the repository at this point in the history
…lder

Add DisableImplicitLibraryPacksFolder
  • Loading branch information
baronfel authored Sep 8, 2022
2 parents d5a50d9 + 92e661f commit 6c69594
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# DisableImplicitLibraryPacksFolder

Similar to [`DisableImplicitNuGetFallbackFolder`](./DisableImplicitNuGetFallbackFolder.md), Microsoft.NET.NuGetOfflineCache.targets (imported by Microsoft.NET.Sdk.BeforeCommon.targets) adds an extra search path for nuget packages that is not controlled by the user nuget.config. It will add the `sdk/<version>/FSharp` from your dotnet installation to the set of nuget search locations. At the time of writing, this location is used to distribute the FSharp.Core NuGet package, which is generally referenced by all F# projects (and, transitively, all projects that reference projects and NuGet packages created with F#). This could potentially poison your nuget cache between repos, even if you've configured per-repo nuget caches.


## Usage

In Directory.Build.props

```xml
<PropertyGroup>
<DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder>
</PropertyGroup>
```

## 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?
1 change: 1 addition & 0 deletions Documentation/Reproducible-MSBuild/Techniques/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [AssemblySearchPaths](./AssemblySearchPaths.md)
- [DisableImplicitNuGetFallbackFolder](./DisableImplicitNuGetFallbackFolder.md)
- [DisableImplicitLibraryPacksFolder](./DisableImplicitLibraryPacksFolder.md)
- [DOTNET_MULTILEVEL_LOOKUP](./DOTNET_MULTILEVEL_LOOKUP.md)
- [NetCoreTargetingPackRoot](./NetCoreTargetingPackRoot.md)
- [NUGET_XMLDOC_MODE](./NUGET_XMLDOC_MODE.md)
Expand Down
3 changes: 2 additions & 1 deletion src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
</PropertyGroup>

<!--
Disable the extra implicit nuget package cache provided by dotnetsdk.
Disable the extra implicit nuget package caches provided by dotnetsdk.
-->
<PropertyGroup>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder>
</PropertyGroup>
</Project>

0 comments on commit 6c69594

Please sign in to comment.