If you're working with MDriven and Visual Studio, you know how crucial seamless integration is for efficient development. With the release of Visual Studio 2026, MDriven has made significant updates to enhance this integration, focusing on assembly management and design-time support. These changes not only improve stability but also align with modern development practices.
Overview of MDriven Support for Visual Studio 2026
MDriven's support for Visual Studio 2026 introduces a robust framework for handling assemblies and design-time operations. This update is crucial for developers who rely on MDriven for model-driven development, ensuring that their tools are up-to-date and compatible with the latest Visual Studio features.
Key Changes in Assembly Management
The transition to Visual Studio 2026 marks a significant shift in how MDriven handles assemblies. Previously, MDriven relied on the Global Assembly Cache (GAC), which simplified some aspects of assembly management but also imposed limitations.
The GAC Era: Simplicity and Limitations
- Uniformity: The GAC ensured that there was only one version of each MDriven assembly on a machine, simplifying version management.
- Challenges: However, this approach made it difficult to ship new versions, test different versions side-by-side, and leverage NuGet for modern .NET development.
Moving Beyond the GAC
With the removal from the GAC, MDriven now fully supports NuGet, allowing for more flexible and modern assembly management. This change exposed some underlying issues with load-context conflicts, which have now been addressed.
Handling Strong-Named Assemblies
To resolve load-context conflicts, MDriven introduced a new strategy for handling strong-named assemblies:
- Separate Assembly Identities: Design-time assemblies in the VSIX now have a different signing key than runtime assemblies.
- Runtime/NuGet assemblies:
PublicKeyToken=46a833be9e90de8c - Design-time/VSIX assemblies:
PublicKeyToken=8284d47cc38744ec - This separation ensures that Visual Studio loads the correct assemblies for both design-time and runtime, eliminating conflicts.
Design-Time Support Enhancements
MDriven has also improved its design-time support by adopting a Data Transfer Object (DTO) strategy:
- DTO Strategy: Instead of passing project-loaded objects directly into VSIX designers, simple DTOs are used to maintain isolation between design-time and runtime environments.
- Unified Approach: All designers, including legacy ones, now use this strategy, improving reliability and consistency.
Tips and Gotchas
- Parallel Installations: If you have both Visual Studio 2022 and 2026 installed, the VSIX can target both versions, ensuring compatibility and ease of use.
- Avoid Mixing Assemblies: Ensure that you do not mix assemblies signed with different keys, as this can lead to unpredictable behavior.
Summary
The integration of MDriven with Visual Studio 2026 represents a significant advancement in assembly management and design-time support. By moving away from the GAC and adopting a modern assembly strategy, MDriven enhances stability and aligns with current development practices. These changes ensure that developers can continue to leverage MDriven's powerful model-driven capabilities within the latest Visual Studio environment.
For more information on related topics, consider exploring:
- Documentation:MDriven Framework Visual Studio installation
- Documentation:Visual Studio 2022
- Documentation:Breaking changes
- Documentation:NugetProject
Source
Based on the MDriven video Wednesday with MDriven 2026 Jan.
