{"id":283,"date":"2014-11-23T20:41:16","date_gmt":"2014-11-23T20:41:16","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2014\/11\/23\/avoiding-visual-studio-fakes-build-break\/"},"modified":"2019-02-14T17:47:40","modified_gmt":"2019-02-15T01:47:40","slug":"avoiding-visual-studio-fakes-build-break","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/avoiding-visual-studio-fakes-build-break\/","title":{"rendered":"Avoiding Visual Studio Fakes Build break"},"content":{"rendered":"<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">If you are using Visual Studio Fakes in your Unit Testing, and you created your test project from any of the below versions of Visual Studio, then if you upgrade to Visual Studio 2013 Update 4, you may start hitting build errors around <em><span style=\"font-family: 'Arial',sans-serif\">Microsoft.QualityTools.Testing.Fakes.dll.<\/span><\/em><\/span><\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">Visual Studio 2012<\/span><\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">Visual Studio 2013 Update1<\/span><\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">Visual Studio 2013 Update2<\/span><\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">Visual Studio 2013 Update3<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">Exact error message : &#8220;The type &#8216;Microsoft.QualityTools.Testing.Fakes.Stubs.StubBase`1&#8217; is defined in an assembly that is not referenced. You must add a reference to assembly &#8216;Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'&#8221;.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">To overcome this build error : please follow <span style=\"text-decoration: underline\">any of the below workarounds<\/span> :<\/span><\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">1. In all your .proj files that refer this assembly, remove the version info from the reference. (it should not be having 11.0.0.0)<\/span><\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">2. In all your .proj files that refer this assembly, turn specific version field of the reference to &#8220;false&#8221;.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: black;font-family: 'Arial',sans-serif;font-size: 9pt\">Hope this helps.<\/span><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are using Visual Studio Fakes in your Unit Testing, and you created your test project from any of the below versions of Visual Studio, then if you upgrade to Visual Studio 2013 Update 4, you may start hitting build errors around Microsoft.QualityTools.Testing.Fakes.dll. Visual Studio 2012 Visual Studio 2013 Update1 Visual Studio 2013 Update2 [&hellip;]<\/p>\n","protected":false},"author":136,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,252],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-testing"],"acf":[],"blog_post_summary":"<p>If you are using Visual Studio Fakes in your Unit Testing, and you created your test project from any of the below versions of Visual Studio, then if you upgrade to Visual Studio 2013 Update 4, you may start hitting build errors around Microsoft.QualityTools.Testing.Fakes.dll. Visual Studio 2012 Visual Studio 2013 Update1 Visual Studio 2013 Update2 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/136"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}