0

I am currently resolving all warnings in our project solution and I have troubles with one last warning: "mismatch between processor architecture". This warning appears in our Unit Test project which has a lot of references to other components and external assemblies that are used for a wide range of Unit Tests.

The warning only appears with one external assembly we have to include for Unit Tests and a total of six Fakes we are using. If I remove the external assembly and all Unit Tests that use this assembly, I can compile the project without any warnings. If I remove the six Fakes and all Unit Tests that use them, I can also compile without any warnings. However, the existence of the Fakes and the external assembly cause the warning.

Visual Studio error log states "Microsoft.QualityTools.Testing.Fakes.targets" as source of the warning. So I checked the project files that are generated by Visual Studio for the Fakes and I found references to almost all files referenced by our Unit Test project. I would have expected to find only the references of the projects that are faked!

I could solve my warning by removing the reference to the external assembly from the Fakes projects. However, I have no idea how to tell Visual Studio not to include this assembly into the generated Fakes. I am thankful for any hint you might have for me!

I could also solve the warning by suppressing the warning message, but I also do not know how to do this for Fakes.

GameDevAlien
  • 195
  • 1
  • 17
  • Try changing the drop down at the top of visual studio for process architecture from x86 / x64 (what ever you have at the moment) to Any CPU – uk2k05 Jul 01 '19 at 10:50
  • I have tried that, but it does not have any effect. I tried it for the entire solution, just for the test project and for the test project and all of the projects it uses. It had no effect. I know how to resolve the "mismatch between processor architecture" warning normally, but not in this particular case. – GameDevAlien Jul 01 '19 at 10:58
  • 2
    Somebody had a similar issue here.. https://stackoverflow.com/questions/18833006/msb3270-mismatch-between-the-processor-architecture-fakes-framework does this help? – uk2k05 Jul 01 '19 at 11:05
  • Thank you very much for this URL, @uk2k05. It had some new information for me that I did not find in my previous researchs. However, I still could not resolve my warning. The _ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch_ property is set correctly in the generated Fakes assembly, but it has no effect. I was able to overwrite the target architecture of the Fakes, but then, there was a target architecture mismatch between my Unit Test project (which I can't change) and the generated Fakes. It is so frustrating... – GameDevAlien Jul 02 '19 at 12:34

0 Answers0