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

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.

Related

How to get .NET 5 symbols to show up in the call stack in Process Hacker or Process Explorer?

I created a simple console application in both .NET Framework 4.8 and .NET 5 (same code in both), but symbols resolve differently across various debugging tools.
If I run both applications, launch Process Hacker, open the process's properties, click on the Threads tab, and open the Stack for the primary managed thread, the .NET 4.8 Stack shows resolved symbols for my classes and methods, but the .NET 5 Stack does not -- it shows hex strings like 0x7ffbac6087a3.
In both cases, calls to System.Console.dll!System.Console.ReadKey() resolve correctly, so I know I have my symbol loading configured correctly (_NT_SYMBOL_PATH = "srv*C:\Source\symbols*https://msdl.microsoft.com/download/symbols"). In both cases, the projects are configured for full debug type and to include debug symbols. In both cases, there is a .pdb to go along with the .exe.
Sysinternals Process Explorer won't display any of that - the bottom of the call stack is 0x0.
If I take a dump of the applications, I can load them into WinDbg Preview and am able to see all of my code as expected. For the .NET 5 application, the normal Stack shows the same thing as Process Hacker (e.g. 0x7ffbac6087a3), but if I run the command !CLRStack -a, those hex values get properly resolved (e.g. 000000BD4F17E840 00007ffbac6087a3 SymbolsCoreConsoleApp.Program.Run() [C:\Source\research\SymbolsCore\SymbolsCoreConsoleApp\Program.cs # 18]).
So, there's the background. Here are the questions:
1.) Why doesn't the Process Hacker Stack resolve symbols for my classes in a .NET 5 application, but it does for the exact same code in a .NET Framework 4.8 application?
2.) Why doesn't Sysinternals Process Explorer display any of my code (just 0x0) for either application? In case it matters, I run procexp64.exe and my machine is x64 Windows 10 Enterprise. If I run 'procexp.exe`, it ultimately launches the x64 version anyhow. Mentioning this in case there is an issue with 32 vs. 64 bit.
3.) Both Process Hacker and Process Explorer have process tabs specifically for .NET (e.g. .NET assemblies and .NET performance), and those tabs only show up for the .NET Framework 4.8 application, but not for the .NET 5 application. Is this by-design or do I have something configured wrong?
4.) In WinDbg Preview, is this behavior by-design? If so, why?
5.) Are there other special things to consider when debugging/analyzing .NET 5/Core applications outside of Visual Studio?
That's a lot of questions, but they're all closely related, and I suspect there may be some fundamental thing(s) that I'm missing here.
Thanks in advance!
EDIT: 20210803 10:55 AM CDT
Per magicandre1981's comment, I installed the nightly of Process Hacker (v3.0.4234).
It still doesn't resolve those symbols.
It does show .NET assemblies and .NET performance tabs for the .NET 5 application now, but there are no values on the .NET performance tab.
EDIT: 20210803 05:05 PM CDT
I ran symchk and dumpbin against both of the applications in case this will help anyone diagnose the problem.
.NET 5
net5.0> $> pwd
C:\Source\research\SymbolsCore\SymbolsCoreConsoleApp\bin\Debug\net5.0
net5.0> $> & 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symchk.exe' .\SymbolsCoreConsoleApp.exe /r
SYMCHK: FAILED files = 0
SYMCHK: PASSED + IGNORED files = 1
net5.0> $> & 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\dumpbin.exe' /PDBPATH:VERBOSE .\SymbolsCoreConsoleApp.exe
Microsoft (R) COFF/PE Dumper Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file .\SymbolsCoreConsoleApp.exe
File Type: EXECUTABLE IMAGE
PDB file 'C:\Source\research\SymbolsCore\SymbolsCoreConsoleApp\bin\Debug\net5.0\apphost.pdb' checked. (File not found)
PDB file 'D:\workspace\_work\1\s\artifacts\obj\win-x64.Release\corehost\cli\apphost\standalone\Release\apphost.pdb' checked. (File not found)
PDB file 'C:\WINDOWS\symbols\exe\apphost.pdb' checked. (File not found)
PDB file 'C:\WINDOWS\exe\apphost.pdb' checked. (File not found)
PDB file 'C:\WINDOWS\apphost.pdb' checked. (File not found)
Summary
2000 .data
2000 .pdata
9000 .rdata
1000 .reloc
1000 .rsrc
14000 .text
1000 _RDATA
net5.0> $> & 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symchk.exe' .\SymbolsCoreConsoleApp.dll /r
SYMCHK: SymbolsCoreConsoleApp.dll FAILED - SymbolsCoreConsoleApp.pdb mismatched or not found
SYMCHK: SymbolsCoreConsoleApp.dll FAILED - No CodeView information found.
SYMCHK: FAILED files = 2
SYMCHK: PASSED + IGNORED files = 0
net5.0> $> & 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\dumpbin.exe' /PDBPATH:VERBOSE .\SymbolsCoreConsoleApp.dll
Microsoft (R) COFF/PE Dumper Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file .\SymbolsCoreConsoleApp.dll
File Type: EXECUTABLE IMAGE
PDB file found at 'C:\Source\research\SymbolsCore\SymbolsCoreConsoleApp\bin\Debug\net5.0\SymbolsCoreConsoleApp.pdb'
Summary
2000 .reloc
2000 .rsrc
2000 .text
.NET 4.8
Debug> $> pwd
C:\Source\research\SymbolsFramework\SymbolsFrameworkConsoleApp\bin\Debug
Debug> $> & 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symchk.exe' .\SymbolsFrameworkConsoleApp.exe /r
SYMCHK: SymbolsFrameworkConsoleApp.exe FAILED - SymbolsFrameworkConsoleApp.pdb mismatched or not found
SYMCHK: FAILED files = 1
SYMCHK: PASSED + IGNORED files = 0
Debug> $> & 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\dumpbin.exe' /PDBPATH:VERBOSE .\SymbolsFrameworkConsoleApp.exe
Microsoft (R) COFF/PE Dumper Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file .\SymbolsFrameworkConsoleApp.exe
File Type: EXECUTABLE IMAGE
PDB file found at 'C:\Source\research\SymbolsFramework\SymbolsFrameworkConsoleApp\bin\Debug\SymbolsFrameworkConsoleApp.pdb'
Summary
2000 .reloc
2000 .rsrc
2000 .text
EDIT: 20210803 07:54 PM CDT
Per hanpassant's comment, here is the project file (it already had the DebugType set to full).
SymbolsCoreConsoleApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
</Project>
EDIT: 20210803 08:40 PM CDT
Here are a few screenshots in case it wasn't clear from my explanation.
Notice the 0x7xfbb03a8 addresses instead of resolved symbols.
Notice the resolved symbols for SymbolsFramework.ConsoleApp.Program instead of the unresolved 0x7xfbb03a8 addresses.
Notice the 0x0 address instead of any resolved symbols.
The .NET Assemblies tab shows up for .NET 5 and appears to populate correctly.
The .NET Performance tab shows up for .NET 5, but it has no values.
I opened an issue with Process Hacker on GitHub and it was closed a few days back with a fix in the nightly build. I confirmed that it now works as expected.

Can't debug VSIX project: "Expected export ITextEditorFactoryService but found 0"

I am working in a couple of VSIX projects and suddenly, for some reason, I can't properly debug them. When I run the project, the experimental VS instance opens without issues, but as soon as I load a solution the problems begin.
To start with, if the solution I'm loading is under source control I get the following error message:
The 'GitCollaborationPackage' package did not load correctly.
The problem may have been caused by a configuration change
or by the installation of another extension.
There's also a link to a log file, which shows an apparently not very useful error message:
LegacySitePackage failed for package [GitCollaborationPackage] Source:
"" Description: Catastrophic failure (Exception from HRESULT:
0x8000FFFF (E_UNEXPECTED))
After that the solution loads, but as soon as I try to open a file I get this error:
Expected 1 export(s) with contract name
"Microsoft.VisualStudio.Text.Editor.ITextEditorFactoryService" but
found 0 after applying applicable constraints.
I didn't perform any significant change in my projects, but just in case I created a fresh new VSIX project and ran it right away, with identical results.
As suggested in MSDN I tried to delete Visual Studio's component cache and reset Visual Studio's settings, to no avail.
So what's going on here? What can I do to fix this?
UPDATE: A couple of new findings:
When running Visual Studio with devenv /safemode the problem persists.
This is happening in VS Professional edition. I have Community edition installed as well, and in that one I can debug without issues. Damn, that one got somehow corrupted too! :-(
UPDATE 2: Repairing Visual Studio didn't help.
This is not an answer, but it's been two years and the problem remains serious, so I thought it might be worthwhile to add some detail for the sake of future investigation.
On my machine the experimental instance was working earlier today, but now it fails. The initial error most often reads
The 'RoslynPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users...\AppData\Roaming\Microsoft\VisualStudio\15.0_b0b65856Exp\ActivityLog.xml'.
But the failing package occasionally varies, and in any case the second error (involving ITextEditorFactoryService) soon follows.
Deleting the two VisualStudio\15.0_b0b65856Exp folders in AppData doesn't help, so I tried uninstalling and reinstalling VS2017. That didn't help either.
I tried debugging a "known good" Visual Studio extension. Same error. I tried loading a simple text file. Same error.
So I moved on to Visual Studio 2019 Community (which was already installed before the failures started). VS 2019 fails too, but its behavior is slightly different: the first error message does not appear, and the second error is slightly modified (notice the "2"):
Expected 1 export(s) with contract name "Microsoft.VisualStudio.Text.Editor.ITextEditorFactoryService2" but found 0 after applying applicable constraints.
I noticed that when I reinstalled VS2017, it still picked up on settings left over from the previous installation. And when the experimental instance starts, it asks me which theme I want. I tell it to use the Blue Theme, and for a few seconds it does, but then it loads Dark Theme which is the same theme used by the main instance. This leads to a hypothesis that the failure is caused by a "zombie" configuration setting that the experimental instance is choosing to load, a setting we just don't know how to get rid of. However, I tried dragging a .cs file onto the experimental instance immediately (before the dark theme loads) and the error still occurs. Also, I tried Tools -> Import and Export Settings -> Reset all Settings (inside the experimental instance), which didn't help.
In my case the command-line arguments /rootsuffix Exp /safemode prevent the error from happening, but this is useless because it also blocks the VSIX I'm trying to debug from loading.
Here are the entries in ActivityLog.xml that mention the word "error":
<entry>
<record>523</record>
<time>2020/03/11 00:20:56.182</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
</entry>
<entry>
<record>527</record>
<time>2020/03/11 00:20:56.494</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [Microsoft.VisualStudio.Shell.Connected.Packages.PathTrustVerifier.PathTrustVerifierPackage]</description>
<guid>{2F6B5046-3BB0-4825-B344-3F4238921119}</guid>
</entry>
<entry>
<record>531</record>
<time>2020/03/11 00:20:56.511</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [CSharpPackage]</description>
<guid>{13C3BBB4-F18F-4111-9F54-A0FB010D9194}</guid>
</entry>
<entry>
<record>534</record>
<time>2020/03/11 00:20:56.590</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [RoslynPackage]</description>
<guid>{6CF2E545-6109-4730-8883-CF43D7AEC3E1}</guid>
</entry>
<entry>
<record>537</record>
<time>2020/03/11 00:20:56.811</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [ErrorListPackage]</description>
<guid>{4A9B7E50-AA16-11D0-A8C5-00A0C921A4D2}</guid>
</entry>
<entry>
<record>541</record>
<time>2020/03/11 00:20:57.014</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [Text Management Package]</description>
<guid>{F5E7E720-1401-11D1-883B-0000F87579D2}</guid>
</entry>
<entry>
<record>545</record>
<time>2020/03/11 00:20:57.026</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [Microsoft.VisualStudio.Editor.Implementation.EditorPackage]</description>
<guid>{E269B994-EF71-4CE0-8BCD-581C217372E8}</guid>
</entry>
<entry>
<record>548</record>
<time>2020/03/11 00:20:57.457</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [RoslynPackage]Source: &apos;Microsoft.VisualStudio.Composition&apos; Description: Expected 1 export(s) with contract name "Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource.VisualStudioDiagnosticListTableCommandHandler" but found 0 after applying applicable constraints.
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource.VisualStudioDiagnosticListTableCommandHandler" but found 0 after applying applicable constraints.
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]()
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
at Microsoft.VisualStudio.LanguageServices.Setup.RoslynPackage.LoadComponentsInUIContext()
at Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService.AbstractPackage.LoadComponentsInUIContextOnceSolutionFullyLoaded()
at Microsoft.VisualStudio.LanguageServices.Setup.RoslynPackage.Initialize()
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{6CF2E545-6109-4730-8883-CF43D7AEC3E1}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>549</record>
<time>2020/03/11 00:20:57.469</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [RoslynPackage](null)</description>
<guid>{6CF2E545-6109-4730-8883-CF43D7AEC3E1}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>551</record>
<time>2020/03/11 00:20:57.479</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Unexpected system error mode before loading package [Visual Studio Component Enumerator Package]</description>
<guid>{588205E0-66E0-11D3-8600-00C04F6123B3}</guid>
</entry>
<entry>
<record>555</record>
<time>2020/03/11 00:20:57.490</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [RoslynPackage]</description>
<guid>{6CF2E545-6109-4730-8883-CF43D7AEC3E1}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
Note: the above error is the final entry in ActivityLog.xml; The second error doesn't show up here.
For me, this started happening after using a IViewTaggerProvider instead of an IViewProvider. When changing it back, it works.
Not sure why though, and I really need to be able to use a IViewTaggerProvider, but I hope this lets others get more insight.
Edit: Okay, I solved it! It was due to the type in my Export attribute not matching the implemented type.
So I changed:
[Export(typeof(ITaggerProvider))]
[ContentType("code")]
[TagType(typeof(ToDoTag))]
class ToDoTaggerProvider : IViewTaggerProvider
{ ... }
Into:
[Export(typeof(IViewTaggerProvider))]
[ContentType("code")]
[TagType(typeof(ToDoTag))]
class ToDoTaggerProvider : IViewTaggerProvider
{ ... }

How to overcome "Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService'" without updating?

I'm getting the same error message as in this question: Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService' Unfortunately, I cannot upgrade to Azure SDK 2.9, as the top answer there suggests.
Specifically, I get this error in a message box whenever I try to package my Azure Cloud Service project:
What's interesting is that I can start the same project in the emulator, which I would assume involves packaging it.
Things I've tried:
Ensuring that I only have version 2.8.2 of the emulator installed (I may have had 2.9 installed initially)
Reinstalling version 2.8.2 of the SDK
Manually copying the Windows Azure Tools from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 to the v14.0 equivalent.
Ensuring that C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.8 exists
Reinstalling Visual Studio (so you know I'm desperate!)
And I've no idea what to try next. I can't work out which DLL is supposed to hold the Microsoft.VisualStudio.WindowsAzure.Services assembly, I can't find any references in any config files, and all the Google hits seem to point back to the SO question linked above.
What's going on? And how can I fix it?
In case I'm being an idiot, here's all the Azure-related things I've got installed:
Also (just in case it's relevant) I'm on Windows 7 SP1.
Update 17/01/16
Following some advice from the excellent Rest Azured Slack channel, I've tried using ProcMon and Fusion Log to diagnose this (spoiler: without success)
ProcMon filtered to that assembly returns nothing:
Fusion log (set to log everything) yields lots of entries like this:
* Assembly Binder Log Entry (17/01/2017 # 11:52:02) *
The operation was successful. Bind result: hr = 0x0. The operation
completed successfully.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
executable C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\devenv.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Microsoft.VisualStudio.WindowsAzure.Services, Version=1.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio
14.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = devenv.exe Calling assembly
: Microsoft.VisualStudio.WindowsAzure, Version=2.9.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
=== WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with
Assembly.Load(). WRN: No matching native image found. LOG: IL assembly
loaded from C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\Extensions\Microsoft\Windows Azure Tools\Microsoft.VisualStudio.WindowsAzure.Services.dll.
When I explore the DLL mentioned, I can find Microsoft.Cct.Services.Sqm, but it doesn't contain a type IWatSqlService:
This feels like it's the crux of the issue, but I've no idea what to do next. Presumably I'd need to replace the DLL with a version that does define IWatSqlService, but I'm not sure where I'd get one. Or, for that matter, why it would even be necessary.
Next stop is probably a full wipe of the machine.
I've had the same problem, and solved it by not using the Web Platform Installer.
Download all parts (Microsoft Azure SDK for .NET - 2.8.2) from the Microsoft site: https://www.microsoft.com/en-us/download/details.aspx?id=50041 and follow the instructions how to install them.
For anyone else with this problem. I ended up resolving this by nuking it from orbit. Fresh install of Windows, reinstall VS and the SDK.
Confusingly, you can also see this error when you add a new
<setting name="TODO" />
element to your *.csdef file but either:
forget to add the corresponding <setting name="TODO" value="TODO" /> element to every *.cscfg file, or
accidentally add a duplicate <setting name="TODO" value="TODO" /> element to any of the *.cscfg files.

'TestWindowPackage' package did not load correctly

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.

SSRS does not recognize custom DLL

I'm developing SSRS reports via VS2010 on my local machine.
I need to reference from a certain report to a DLL I wrote, The DLL was built at .net framwork 3.5 and I've placed the dll in the following libraries:
1.C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies.
2.C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin
both on my local machine and the server where SSRS is located.
I've also added rssrvpolicy.config file as following:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Test"
Description="">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin\Test.dll"
/>
Done all that' I've referenced the DLL through the report properties but yet recieved the following error message while previewing the report:
"An error occured during local report processing, The definition of the report X is invalid.
Error while loading code module "Test ...' Could not load file or assembly 'Test ...' or one of its dependenies. The system cannot find the file specified"
Any ideas?
OK found the problem!
Apperntly installing VS2010 on win7 64 bit create two Microsoft Visual Studio 10.0 folders, one in Program Files where I've located my DLL and one in Program Files (x86) where I should have located it.
Once the DLL was put in the correct folder the report recognized it.
Thanks for your reply

Resources