Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable deserialization of cached project file data and fix legacy project tests #139

Merged
merged 4 commits into from
Apr 3, 2022

Conversation

baronfel
Copy link
Collaborator

@baronfel baronfel commented Apr 3, 2022

This PR does two main things:

  • fix auto-loading of cached project data from the fsac.cache files in the obj directory of projects, and
  • fix legacy format project file loading on newer Visual Studio installs.

Cache Loading

The core fix here was to mark the cache data structure as public, so that newtonsoft.json could serialize it and deserialize it again. When the type was internal, none of the fields were written into the cached structure. I also brought this under test for the first time. A slight fix was needed to the background loader logic to present a sensible chain of project-loading events to consumers.

Legacy project loading

The MSBuild found by VSWhere on my VS2022-installed windows host was skipped by the current logic, resulting in test failures on my machine. I think this is also the case for CI, where the hosts have VS2022 installed and run under .NET 6. I moved the probing logic to take the most recent VS instead of the least recent. @su8898 I would appreciate it if you could check this out and verify.

@baronfel baronfel force-pushed the fix-project-cache-loading branch from 263cf0d to 6288d23 Compare April 3, 2022 01:59
@baronfel baronfel merged commit 5c68800 into main Apr 3, 2022
@baronfel baronfel deleted the fix-project-cache-loading branch April 3, 2022 02:07
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