{"id":5378,"date":"2014-03-30T21:11:22","date_gmt":"2014-03-30T21:11:22","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/creating-a-codedui-test-project-i-get-an-access-is-denied-error-collection-of-common-programming-errors\/"},"modified":"2014-03-30T21:11:22","modified_gmt":"2014-03-30T21:11:22","slug":"creating-a-codedui-test-project-i-get-an-access-is-denied-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/creating-a-codedui-test-project-i-get-an-access-is-denied-error-collection-of-common-programming-errors\/","title":{"rendered":"Creating a codedUI Test Project I get an Access is denied error-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to use coded UI test in Visual Studio 2012. When I try to make a Coded UI test Project or try to add a coded UI test To an existing project I get :<\/p>\n<p>An unexpected error happened and Coded UI Test can not recover from it.<\/p>\n<p>Exception Message : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))<\/p>\n<p>Source Assembly: mscorlib.dll<\/p>\n<p>If I create a coded UI test in VS2010 then move open it in VS2012 I get the same Access is denied error. (It does run properly in 2010).<\/p>\n<p>Checking the event viewer I get same exception:<\/p>\n<p>The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: (devenv.exe, PID 5528, Thread 1) TestProjectWizard.RunFinished: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) \u00a0\u00a0 at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence) \u00a0\u00a0 at System.Reflection.Assembly.LoadFile(String path) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssembly(String assemblyFile) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssemblies(String[] assemblyNames) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager..ctor() \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestService.Initialize() \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.UITesting.PropertyProviderManager.get_Instance() \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.CodedUITest.UITestWizardBase.ProjectItemFinishedGenerating(ProjectItem projectItem) \u00a0\u00a0 at Microsoft.VisualStudio.TemplateWizard.Wizard.EnumContentsAddItem(ProjectItems projectItems, XmlNode contentNode, String projectName, String currentFolder, String currentTargetFolder, String rootName, String templateFolderPath, String destinationRootFolderPath, String userSpecifiedDestItemPath, String projectTypeString, List`1 wizardExtensions, String rootExtension) \u00a0\u00a0 at Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(Object application, Int32 hwndOwner, Object[]&amp; ContextParams, Object[]&amp; CustomParams, wizardResult&amp; retval) \u00a0\u00a0 at EnvDTE80.IVsExtensibility2.RunWizardFileEx(String bstrWizFilename, Int32 hwndOwner, Object[]&amp; vContextParams, Object[]&amp; vCustomParams) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.Tips.TuipPackage.TestProjectService.AddTestFromTemplate(ProjectItems projectItems, String templateFile, String newItemName, Object[] customParams) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.Tips.TuipPackage.TestProjectService.AddTestToProject(Project testProject, ProjectItem folder, String templateId, String testName, Object[] customParams) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.Tips.TuipPackage.TestProjectService.AddTestToProject(Project testProject, String templateId, Object[] customParams) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.TestProjectWizards.WizardHelper.AddTests(IServiceProvider serviceProvider, Project project, String[] templateIds) \u00a0\u00a0 at Microsoft.VisualStudio.TestTools.TestProjectWizards.TestProjectWizardExtension.RunFinished()<\/p>\n<p>the message resource is present but the message is not found in the string\/message table<\/p>\n<p>I am guessing that I am missing permissions on something but I can&#8217;t figure out what.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to use coded UI test in Visual Studio 2012. When I try to make a Coded UI test Project or try to add a coded UI test To an existing project I get : An unexpected error happened and Coded UI Test can not recover from it. Exception Message : Access is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5378","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5378"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5378\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}