ShimNotSupportedException in MS VisualStudio 2012

前端 未结 3 1718
别那么骄傲
别那么骄傲 2020-12-19 10:55

I\'m just trying to get familiar with the new Fakes Isolation Framework in Visual Studio 2012 RC but I\'m consequently facing issues with ShimNotSupportedException

相关标签:
3条回答
  • 2020-12-19 11:31

    The problem is related to testsettings. I´ve done what the link below suggested and it finally worked after trying lots of possible solutions

    http://blog.degree.no/2012/09/visual-studio-2012-fakes-shimnotsupportedexception-when-debugging-tests/

    0 讨论(0)
  • 2020-12-19 11:37

    I had the same exact problem. Try to remove all testsettings files (both from disk and solution), and make sure your solution does not reference any testsettings files.

    Also make sure you're using the visual studio testrunner (and not resharper etc. which is instrumenting the code).

    I've written two blogposts about these issues which may be helpful:

    Visual Studio 2012 Fakes – ShimNotSupportedException when debugging tests

    Unit testing – Visual Studio 2012 Fakes in Team City

    0 讨论(0)
  • 2020-12-19 11:37

    I have seen this error a number of times with different causes:

    • There is an error or problem in your fakes generation files, some of them are not correct generated. Clean the directories and remake your fake references
    • A depending dll is missing. In this case you are missing a dll on which a fakes dll depends. In one case I was shimming a webservice and missing the System.ServiceModel dll.
    • Sometimes you can fix it with changing your testsetting default processor architecure. However I do not know why, it will probably refresh some cached dlls.
    0 讨论(0)
提交回复
热议问题