microsoft / microsoft/MSBuildCache
Fresh clone of repository results in many compilation errors
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 64
- Forks
- 24
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
I want to investigate implementing S3 compatibility for this. As an initial stab I wanted to get this compiled and working in my local environment. I tested this about a year ago and it worked fine but since then it seems like there have been some regressions.
I wanted to outline the fixes I had to implement to get this compiling in hopes that someone more familiar with the repository can provide guidance on the correct fixes for the main branch.
https://github.com/microsoft/MSBuildCache/blob/c1faabb1d036689b2421342ccf1e747d96ab2cf5/.editorconfig#L377
Had to change that to dotnet_diagnostic.IDE0055.severity = none # Fix formatting because there were a significant amount of errors after opening the solution.
https://github.com/microsoft/MSBuildCache/blob/c1faabb1d036689b2421342ccf1e747d96ab2cf5/Directory.Build.props#L37
Had to update this to ignore security vulnerability errors <NoWarn>$(NoWarn);NU5104;NU1901;NU1902;NU1903</NoWarn>. There were a lot of NuGet packages being flagged for vulnerabilities and preventing compilation.
The NuGet.config (https://github.com/microsoft/MSBuildCache/blob/main/nuget.config) had to be updated because it was failing to retrieve packages.
I had to do this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="msbuildcache" value="https://pkgs.dev.azure.com/msbuildcache/public/_packaging/msbuildcache/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<clear />
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
<packageSource key="msbuildcache">
<package pattern="RocksDb*" />
<package pattern="Microsoft.BuildXL*" />
<package pattern="Microsoft.Windows.Debuggers*" />
</packageSource>
</packageSourceMapping>
</configuration>
If there is something I missed that should have prevented the need to make these changes it would be appreciated if that could be called out in the README (or maybe I missed it altogether). If these are actual errors then I'm happy to help open PRs to try and fix the issues if a repository owner has guidance on what the correct fixes are.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with a fresh clone and attempt the repository build, then inspect .editorconfig, Directory.Build.props, and nuget.config against the reported compilation and package-source failures. Check the README for build prerequisites and document or correct the repository configuration so a fresh checkout builds without local edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100