Skip to content

Conversation

@laske185
Copy link
Contributor

PR Details

Introduced caching for MSBuild project loading to improve performance and prevent redundant loads. Added mechanisms to avoid infinite recursion during dependency processing and ensured sequential handling of project references to address MSBuild limitations.

Refactored package upgrade logic to simplify checks and reuse cached projects for NuGet reference updates. Enhanced error handling with detailed logging for unexpected exceptions.

Added cleanup methods to unload and dispose of cached projects, ensuring proper resource management. Improved handling of NuGet restores and platform updates by re-evaluating project properties post-restore.

Updated dependency processing to ensure all assemblies are registered and dependencies are loaded recursively. Finalized with proper state updates for packages and session-wide cleanup of cached projects.

In my setup with 26 projects the time to restore the NuGet packages was reduced from ~60 seconds to ~30 seconds.

Related Issue

No issue created yet.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

Introduced caching for MSBuild project loading to improve performance and prevent redundant loads. Added mechanisms to avoid infinite recursion during dependency processing and ensured sequential handling of project references to address MSBuild limitations.

Refactored package upgrade logic to simplify checks and reuse cached projects for NuGet reference updates. Enhanced error handling with detailed logging for unexpected exceptions.

Added cleanup methods to unload and dispose of cached projects, ensuring proper resource management. Improved handling of NuGet restores and platform updates by re-evaluating project properties post-restore.

Updated dependency processing to ensure all assemblies are registered and dependencies are loaded recursively. Finalized with proper state updates for packages and session-wide cleanup of cached projects.
@laske185
Copy link
Contributor Author

I tested it with some projects that included required Stride dependency updates, and it worked fine.

@laske185 laske185 marked this pull request as ready for review October 15, 2025 07:58
@Kryptos-FR Kryptos-FR self-requested a review October 15, 2025 15:30
@IXLLEGACYIXL
Copy link
Collaborator

msbuild gets opened twice
https://github.com/stride3d/stride/blob/master/sources/editor/Stride.Assets.Presentation/AssetEditors/ProjectWatcher.cs#L380
this is for watching over your projects for changes which loads the entire dependency graph to resolve chain reloading

mybe the overall process may be simplified

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.

2 participants