Jump to content

Microsoft test adapter crashes with MVID mismatch


Go to solution Solved by Rick Brewster,

Recommended Posts

The error:"The active test run was aborted. Reason: Test host process crashed : Process terminated. MVID mismatch between loaded assembly 'System.Private.Xml' (MVID = {4007EC53-119A-4580-9B7F-C8A4BBCDB0E0}) and version of assembly 'System.Private.Xml' expected by assembly 'PaintDotNet.Data' (MVID = {405DEE27-471D-48E3-8C64-1D8278CF1FDD})"

I'm not sure whether this is a problem for Paint.NET or Microsoft, but finding a workaround on these forums seems plausible.

Unit tests have been working fine for a long time, but yesterday I updated Visual Studio 2022 to the latest version, and apparently this updated the Xml assembly used in the test adapter to a different one that is used in Paint.NET. (That's how I'm reading it anyway). Why this crashes is anybody's guess. I speculate that a recompile of Paint.NET would fix the issue?

In the meantime, is there a workaround? Some form of assembly forwarding? Is there a way to make Paint.NET (or MS test adapter for that matter) less strict on the required assemblies?

Cheers

John

Link to comment
Share on other sites

I've written a container format for compressed texture formats used in graphics hardware (think DDS format but with extra features). Part of the suite is that these can be loaded directly into Paint.NET for viewing. 

The general test process in C++ is:
Load PNG
Add mip maps, convert to a compressed texture format (e.g. BC1/DXT1), and save as DDS.
Convert to my format and save.
Load in my format and make sure it matches the DDS.

Then the test process in C#:
Load PNG
Load my format version
Use the Paint.NET file type code to decompress my format to RGBA and make sure it matches the PNG.

As I've been working on this for a while, I tend to be a bit too succinct 😃 Is that a suitable explanation?

Cheers

John

Link to comment
Share on other sites

  • Solution

I have no idea why the test adapter is failing like that. Others have seen that same MVID error pop up sometimes when trying to use the WinForms Designer inside of Visual Studio, and it was completely vexing then too. There's something about the way these hosts are loading DLLs that just doesn't work. I'm pretty sure it's a Microsoft bug.

 

Also, I need to make sure you know that Paint.NET's DLLs are not licensed for redistribution or integration -- I'm not worried if you're doing automated tests on your own PC as part of developing a FileType plugin, but you can't (for example) put Paint.NET's DLLs into a public git repo, or use it in a CI system, or bundle it within your own apps or services, etc.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Quote

I'm pretty sure it's a Microsoft bug.

Probably - just looking for a workaround from a responsive team. No replies from MS as yet.

 

Quote

Paint.NET's DLLs are not licensed for redistribution or integration

They are not in source control, just referenced by the csproj files and VS makes a local copy for reasons that are known only to Microsoft. The only limitation with this is that Paint.NET needs to be installed to the default location ("C:\Program Files\paint.net") for that 'just works out of the box' experience.

Cheers

John

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...