'TestWindowPackage' package did not load correctly - visual-studio-2013

I am not able to open the test Explorer
on machine had Visual Studios 2008, 2010, 2012. Then installed 2015, then 2013
Using Visual Studio 2013 update 5
'TestWindowPackage' package did not load correctly , activity log error:
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [TestWindowPackage]</description>
<guid>{BFC24BF4-B994-4757-BCDC-1D5D2768BF29}</guid>
<hr>80131509</hr>
<errorinfo>Loading MEF components failed with the following exception:
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) The specified argument cannot be empty.
Parameter name: commandContainers
Resulting in: An exception occurred while trying to create an instance of type 'Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer'.
Resulting in: Cannot activate part 'Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer'.
Element: Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer --> Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer
Resulting in: Cannot get export 'Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer (ContractName="Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer")' from part 'Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer'.
Element: Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer (ContractName="Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer") --> Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer
Resulting in: Cannot set import 'Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage.PackageContainer (ContractName="Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer")' on part 'Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage'.
Element: Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage.PackageContainer (ContractName="Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer") --> Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage
Additional diagnostics here:
MEF Import details for Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage
ContractName Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer
RequiredTypeIdentity Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer
Satisfied by :
Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer (ContractName="Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer")
I have tried:
-Restarted Visual Studio
-Restarted PC
-Delete all files in AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache
-Run VS with devenv /setup
-Run VS With devenv /setup /ResetSkipPkgs
-Repaired the VS installation
-Uninstall VS2013, Delete all visual studio files in app data, re install VS 2013 update 5

Opened ticket with Microsoft via company support account, Case number 116081014529972
They told me to reformat my machine and not install Visual Studios out of order.

Related

An error was encountered while initializing templates Visual Studio 2019

I get this error when I try to add a Razor Page:
I've tried cleaning the project and even repairing Visual Studio via the installer to no avail.
Opening the indicated log, I can see at the end:
<entry>
<record>3545</record>
<time>2021/01/26 11:36:35.647</time>
<type>Error</type>
<source>Template Bootstrapper</source>
<description>Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path &apos;&apos;, line 1, position 25.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.EnsureInstallDescriptorsLoaded()
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.WriteInstallDescriptorCache()
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save(TemplateCache cacheToSave)
at Microsoft.TemplateEngine.Edge.Settings.SettingsLoader.Save()
at Microsoft.TemplateEngine.Edge.Settings.ComponentManager.Save()
at Microsoft.TemplateEngine.Edge.Settings.ComponentManager.RegisterMany(IEnumerable`1 typeList)
at Microsoft.TemplateEngine.IDE.Bootstrapper.Register(Assembly assembly)
at Microsoft.VisualStudio.TemplateEngine.Shared.Host.TemplateEngineBootstrapperFactory.TemplateEngineBoostrapper.Register(Assembly assembly)
at Microsoft.VisualStudio.TemplateEngine.TemplateEngineHostManager.InitializeEngine()</description>
</entry>
Try updating Visual Studio to the latest version. That solve our issue when we encountered the same problem

Visual Studio stops working when trying to debug wp8.1 [duplicate]

I'm using Visual Studio 2015 in a Windows 10 environment. Visual Studio is constantly crashing. The solution opens up fine, but after typing a few letters I get a message saying that an error occurred and Visual Studio must be shut down. I searched online and found how to run VS in diagnostic mode (devenv /log). I tried this and see several errors in ActivityLog.xml. I don't know what any of these mean and I can't find anything online about them. I've updated all of the Visual Studio extensions, but that didn't help. I tried repairing VS, but that didn't help either. Can someone explain how I can diagnose and fix the problem?
Here is the error messages in the log:
<entry>
<record>161</record>
<time>2017/05/08 14:53:38.815</time>
<type>Error</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Still unable to load MEF component DLL: Could not load file or assembly &apos;Microsoft.VisualStudio.Workspaces.Contracts, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\RV0KRPV2.PBV\TMLanguage.dll</path>
</entry>
<entry>
<record>162</record>
<time>2017/05/08 14:53:38.822</time>
<type>Error</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Still unable to load MEF component DLL: Could not load file or assembly &apos;Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.Contracts.1.7, Version=1.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.</description>
<path>C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\2re3mhbz.g1s\Microsoft.VisualStudio.ApplicationInsights.dll</path>
</entry>
<entry>
<record>163</record>
<time>2017/05/08 14:53:38.830</time>
<type>Error</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Still unable to load MEF component DLL: Could not load file or assembly &apos;Microsoft.VisualStudio.ApacheCordovaTools.Definitions.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&apos; or one of its dependencies. The system cannot find the file specified.</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\22KH2U4Y.XLJ\Microsoft.VisualStudio.Azure.ConnectedServices.MobileServices.dll</path>
</entry>
To diag Visual Studio crashes, you need to generate a crash dump, which includes the current state of Visual Studio.
To generate such a crash dump, you can configure Windows Error Reporting to generate dumps by running regedit.exe, go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\devenv.exe create a string DumpFolder and give it a name like C:\localdumps and create a DWORD 32Bit named DumpType and set it to 2 to generate a Full dump.
After Visual Studio crashed and you got a dump, install the Debugging Tools for Windows, which are part of the Windows 10 SDK.
During Setup you only need to select the Debugging Tools for Windows
all other can be skipped.
Now run 32 Bit/x86 Windbg.exe (because Visual Studio is a 32Bit /x86 applciation), inside Windbg, setup the debug symbols, open the dmp via File->Open crash dump (or CTRL+D) and type !analyze -v in the command line at buttom
and now press ENTER. Now Windbg loads the required debug symbols and analyzes the dump and shows you some data. In my example I see this:
BUGCHECK_STR: CLR_EXCEPTION_REMOTE_System.NullReferenceException
DEFAULT_BUCKET_ID: CLR_EXCEPTION_REMOTE_System.NullReferenceException
PRIMARY_PROBLEM_CLASS: CLR_EXCEPTION
STACK_TEXT:
00000000 00000000 Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.DTE.MainWindow..ctor+0x0
00000000 00000000 Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.CreateMainWindow+0x0
00000000 00000000 Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.get_MainWindow+0x0
00000000 00000000 UNKNOWN!EnvDTE._DTE.get_MainWindow+0x1
00aed828 11da97b8 UNKNOWN!VSWindowTitleChanger.VSWindowTitleChangerPackage.DelayedInit+0x90
SYMBOL_NAME: Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.DTE.MainWindow..ctor
MODULE_NAME: Microsoft_VisualStudio_Platform_WindowManagement_ni
BUCKET_ID: CLR_EXCEPTION_REMOTE_System.NullReferenceException_Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.DTE.MainWindow..ctor
FAILURE_IMAGE_NAME: Microsoft.VisualStudio.Platform.WindowManagement.dll
BUCKET_ID_IMAGE_STR: Microsoft.VisualStudio.Platform.WindowManagement.dll
FAILURE_MODULE_NAME: Microsoft_VisualStudio_Platform_WindowManagement_ni
BUCKET_ID_MODULE_STR: Microsoft_VisualStudio_Platform_WindowManagement_ni
FAILURE_FUNCTION_NAME: Microsoft.VisualStudio.Platform.WindowManagement.DTE.MainWindow..ctor
BUCKET_ID_FUNCTION_STR: Microsoft.VisualStudio.Platform.WindowManagement.DTE.MainWindow..ctor
BUCKET_ID_PREFIX_STR: CLR_EXCEPTION_REMOTE_System.NullReferenceException_
So the Visual Studio crashed because of a System.NullReferenceException in the module VSWindowTitleChanger which tries to change the Title of a Window before it was laoded correctly and accessed an object with was NULL. This is a Visual Studio extension and removing it fixes the crash I had at startup.
If Windbg is too complicated, you can use the DebugDiag analyzer. 1st download the Debug Diagnostic Tool v2 Update 2, now run DebugDiag.Analysis.exe from C:\Program Files\DebugDiag, select CrashHangDumpAnalysis, now click on Add Data Files and select the dump.
In last step, click on Start Analysis. Now the analyzer checks the dump
and if this is finished, it opens a mht Report wit the result.

Why Opencover with MSTest does not execute and says "access is denied"?

I am using open cover with MSTest.
I am a new users and trying to get hang of Opencover.
I have tried with MSTest and MSTest is working fine with my new project in Vs2010. When I am executing following test using MStest it is working fine:
Command line run of MS Test :
MSTest /testmetadata:VoterDetails.vsmdi /testlist:DOBTest
Result:
C:\Users\<<MYuserName>>\Documents\Visual Studio 2010\Projects\VoterDetails>
MSTest /testmetadata:VoterDetails.vsmdi /testlist:DOBTest
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.
Loading VoterDetails.vsmdi...
Starting execution...
Results Top Level Tests
------- ---------------
Passed (DOBTest/)UT_voterDOB.VoterValidationTest.validateVoterDOB
Test
1/1 test(s) Passed
Summary
-------
Test Run Completed.
Passed 1
---------
Total 1
Results file: C:\Users\<<MYuserName>>\Documents\Visual Studio 2010\Projects\VoterDetails\TestResults\<<MYuserName>>.trx
Test Settings: Local
But When I am executing following command then I am getting following result:
I am posting all combinations I have tried:
C:\Users\<<MyUserName>>\AppData\Local\Apps\OpenCover>OpenCover.Console.exe
-register:user
-target:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe"
-targetargs:"/testmetadata:VoterDetails.vsmdi /testlist:DOBTest"
-filter:+[VoterDetails]*
Access is denied.
C:\Users\<<MyUserName>>\AppData\Local\Apps\OpenCover>OpenCover.Console.exe
-register:-arch:32
-target:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe"
-targetargs:"/testmetadata:VoterDetails.vsmdi /testlist:DOBTest"
-filter:+[VoterDetails]* -output:coverage.xml
Access is denied.
C:\Users\<<MyUserName>>\AppData\Local\Apps\OpenCover>OpenCover.Console.exe
-target:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe"
-targetargs:"/testmetadata:VoterDetails.vsmdi /testlist:DOBTest"
-filter:+[VoterDetails]*
-output:coverage.xml
-mergebyhash
Access is denied.
How will MSTEST know where to find VoterDetails.vsmdi when you are running in the wrong folder; try running from OpenCover from
C:\Users\<<MYuserName>>\Documents\Visual Studio 2010\Projects\VoterDetails
i.e.
C:\Users\<<MyUserName>>\AppData\Local\Apps\OpenCover>OpenCover.Console.exe -register:user ...
also -arch:32 is not a valid option for OpenCover

How to fix Setup project Prerequisites warning

When I go to the "Setup Property Pages" in a Visual Studio Setup project and view the Prerequisites, I see a warning:
Prerequisite could not be found for bootstrapping
I did the following things:
Added a new folder in: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages" with my package
Restarted VS2010
(Even rebooted my pc)
Warning is still visible on that package.
Next I've added a .VSBootstrapperManifest file in the Packages directory ( C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages )
Restarted VS2010 again but that didn't help either, same with reboot.
Any suggestion what could be wrong?
This worked on my Win7 x64 machine, but this doesn't seem to work anymore on my Win8 Pro x64.
Thanks in advance.
update:
When I open the Product.xml file from my package I see these XML lines:
<InstallChecks>
<RegistryCheck Property="FoxProOleDbInstalled" Key="HKCR\CLSID\{...-..-..}\InprocServer32" />
</InstallChecks>
When I search that key {...-..-..} in my registry I cannot find it at the location HKCR\CLSID{...-..-..}
But I can find it at this location:
HKEY_CLASSES_ROOT\ Wow6432Node \CLSID\ {...-..-..}
Can I just add another line inside the InstallChecks-tag in the Product.xml ?
How will the RegistryCheck tags be checked in that file (AND? OR?)
(I think all InstallChecks need to be true but I'm not sure, the documentation is not so clear: http://msdn.microsoft.com/en-us/library/ms229432(v=vs.80).aspx )
If you are developing windows 8 store/metro apps in "windows 8 pro".
Use visual studio 2012 instead of vs2010.It will work.

Visual 2010 MFC new project doesn't build!

I just created a new project in Visual 2010. It is a multi-document MFC (static link) application with the HTML help option, Visual Studio 2008 style (with style changing option), that's about it.
Just after creation, I hit Build Solution and I get a lot build errors all in afxcomctl32.h. Errors like:
Error 1 error C2061: syntax error : identifier 'LPCWS' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxcomctl32.h 426 1
On this line:
AFX_ISOLATIONAWARE_STATICLINK_FUNC(HWND ,CreateWindowExW,(DWORD dwExStyle,LPCWS TR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam),(dwExStyle,lpClassName,lpWindowName,dwStyle,X,Y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam),NULL)
Same errors in Debug and Release.
My PC is Windows 7 Ultimate. What's the problem???
Best regards,
Downy
AFX_ISOLATIONAWARE_STATICLINK_FUNC(..., LPCWS TR lpClassName, ...)
That code got messed up, there is a space or tab inserted in LPCWSTR. Deleting it will fix the problem.
However, that changed the timestamp on the file as well, you may run into trouble when you install a future service pack. One thing to try is to rename the file, then run a Repair to get the original file back. Or copy it off another machine.

Resources