Microsoft Fakes Framework not installed.

jamesstumme's Avatar


15 Jul, 2015 05:27 AM

I have a project that I am trying to build on appveyor that uses the fakes framework to shim in expected web responses. When I try to build I get errors saying it cannot find the assemblies for the fakes framework.

C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.QualityTools.Testing.Fakes, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\projects\no-ip-ddns\NoIP.DDNS\NoIP.DDNS\NoIP.DDNS.csproj]

  1. Support Staff 1 Posted by Feodor Fitsner on 15 Jul, 2015 05:33 PM

    Feodor Fitsner's Avatar

    There is Visual Studio Community 2013 installed on build workers and Fakes is not part of it.

    However, I think you can try deploying missing assemblies and targets in zip during the build. Using 7-zip (or any other favorite archiver) pack required files with their original folders structure preserved and then upload it somewhere on the net (S3, Azure, FTP), something like:

    cd c:\
    7z a c:\projects\ "Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Fakes\*"
    7z a c:\projects\ "Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies\Microsoft.QualityTools.Testing.Fakes.dll"
    7z a c:\projects\ "Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.QualityTools.Testing.Fakes.dll"

    Add few lines to a build script to download and unpack the archive on every build:

    - ps: $zipPath = "$($env:USERPROFILE)\"
    - ps: (New-Object Net.WebClient).DownloadFile('http://<url-to>/', $zipPath)
    - ps: 7z x $zipPath -y -oC:\ | Out-Null

    You can then GAC any assemblies if needed.

  2. 2 Posted by Abhishek on 31 Jul, 2015 06:36 PM

    Abhishek's Avatar

    Adding missing dlls does not help sadly. getting the error below -

    Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables.

    Please help!

  3. Support Staff 3 Posted by Feodor Fitsner on 31 Jul, 2015 07:11 PM

    Feodor Fitsner's Avatar

    Looks like Fakes require Visual Studio Premium and beyond.

  4. 4 Posted by Abhishek on 31 Jul, 2015 09:35 PM

    Abhishek's Avatar

    On the build server? We have selected Visual Studio 2015. Please provide more details on how to resolve this issue.

  5. 5 Posted by Abhishek on 31 Jul, 2015 09:36 PM

    Abhishek's Avatar

    Also, my tests are running fine on local machine.

  6. Support Staff 6 Posted by Feodor Fitsner on 31 Jul, 2015 09:56 PM

    Feodor Fitsner's Avatar

    Visual Studio Community 2015 is installed on build workers and Fakes are not part of this edition.

  7. 7 Posted by Abhishek on 31 Jul, 2015 10:00 PM

    Abhishek's Avatar

    Ok, so if I understand right, Fakes not support on AppVeyor?
    Is there any workaround or future plan to support the same?

  8. Support Staff 8 Posted by Feodor Fitsner on 31 Jul, 2015 10:08 PM

    Feodor Fitsner's Avatar

    Right, Fakes are not supported right now, sorry. They are part of Ultimate and Premium editions and I don't have an ETA when they will be supported on AppVeyor platform.

    As a workaround (and it might be better decision to don't be locked in expensive VS editions) I'd recommend switching to alternative open-source mocking frameworks such Moq or Rhino Mocks.

  9. 9 Posted by Abhishek on 31 Jul, 2015 10:14 PM

    Abhishek's Avatar

    Thanks a lot for answering the question promptly! We will definitely look for alternate routes.

  10. 10 Posted by jamesstumme on 26 Aug, 2015 04:31 AM

    jamesstumme's Avatar

    Just wanted to mention I found that Moq + Smock allows for shimming. Although it's not perfect, it's a great combo in-place of the microsoft fakes framework.

  11. Support Staff 11 Posted by Feodor Fitsner on 26 Aug, 2015 05:28 AM

    Feodor Fitsner's Avatar

    Nice, thanks for the update!

  12. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:59 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac