dotnet / dotnet/msbuild

`.sln.metaproj.tmp` written to disk too soon

Open
#1,958 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

[This](https://github.com/Microsoft/msbuild/blob/master/src/Build/Construction/Solution/SolutionProjectGenerator.cs#L880-L887) writes the metaproj for the solution to disk here. But after this point there are changes made to the project, eg. a `.csproj.metaproj` reference might be added like in #1957 .
Moving that to around [here](https://github.com/Microsoft/msbuild/blob/master/src/Build/Construction/Solution/SolutionProjectGenerator.cs#L735) fixes it. But I'm a little unsure because of this [comment](https://github.com/Microsoft/msbuild/blob/master/src/Build/Construction/Solution/SolutionProjectGenerator.cs#L880-L881):

```
// For debugging purposes: some information is lost when evaluating into a project instance,
// so make it possible to see what we have at this point.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.