Skip to content

Restore once and evaluate each project once when cracking - #390

Merged
nojaf merged 2 commits into
mainfrom
faster-project-cracking
Oct 23, 2026
Merged

nojaf merged 2 commits into
mainfrom
faster-project-cracking

Conversation

@nojaf

@nojaf nojaf commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Every design time build ran its own /restore with a TargetFramework
global property. A restore given a TargetFramework writes the assets
file for that framework only, and the main project's restore passed its
framework on to the referenced projects. A referenced project with
several target frameworks was left with an assets file for one of them,
and the next dotnet build --no-restore of another framework failed
with NETSDK1005. The parallel builds also restored overlapping projects
at the same time.

The main project is now restored once, without a TargetFramework, which
covers its references. The restore runs while the references are
walked, and the design time builds start after it.

The walk now asks MSBuild for the project references, the reference
assembly setting and the target framework in one evaluation, so a
project costs one evaluation instead of three.

nojaf added 2 commits October 23, 2026 08:39
Every design time build ran its own /restore with a TargetFramework
global property. A restore given a TargetFramework writes the assets
file for that framework only, and the main project's restore passed its
framework on to the referenced projects. A referenced project with
several target frameworks was left with an assets file for one of them,
and the next `dotnet build --no-restore` of another framework failed
with NETSDK1005. The parallel builds also restored overlapping projects
at the same time.

The main project is now restored once, without a TargetFramework, which
covers its references. The restore runs while the references are
walked, and the design time builds start after it.

The walk now asks MSBuild for the project references, the reference
assembly setting and the target framework in one evaluation, so a
project costs one evaluation instead of three.

Release 0.17.2 and bump the fantomas tool to 9.0.0-alpha-001.
The dotnet CLI blocks on sending telemetry at exit, which can take
seconds on a restricted network. Telplin starts a `dotnet msbuild`
process for the restore and two for every project, so the wait adds up.
DOTNET_CLI_TELEMETRY_OPTOUT is set to 1 unless the environment already
has a value for it.

Taken from fable-compiler/Fable#5136

Release 0.17.3.
@nojaf
nojaf merged commit 41e8cc7 into main Oct 23, 2026
1 check passed
@nojaf
nojaf deleted the faster-project-cracking branch October 23, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant