question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load the custom visualizer.

See original GitHub issue

When I click on the magnifying glass icon, I get this error message from Visual Studio. Error on Visual Studio Enterprise 2017 v15.7.4 on Windows 10 Enterprise v10.0.15063

Unable to load the custom visualizer.
Additional information:
The UI-side visualizer type 
'NRules.Debugger.Visualizer.SessionVisualizer' must derive from 
'Microsoft.VisualStudio.DebuggerVisualizers.DialogDebuggerVisualizer'.

I did not make changes to any source code prior to running build.bat. After the build is completed, I copied the following files to C:\Users\xxxx\Documents\Visual Studio 2017\Visualizers Built with Visual Studio Enterprise v15.7.4 on Windows 10 Enterprise v10.0.16299.492


1. Microsoft.VisualStudio.DebuggerVisualizers.dll
2. NRules.Debugger.Visualizer.dll
3. NRules.Debugger.Visualizer.pdb
4. NRules.dll
5. NRules.Fluent.dll
6. NRules.Fluent.pdb
7. NRules.Fluent.xml
8. NRules.pdb
9. NRules.RuleModel.dll
10. NRules.RuleModel.pdb
11. NRules.RuleModel.xml
12. NRules.xml

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bigkencommented, Oct 11, 2018

<Reference Include="Microsoft.VisualStudio.DebuggerVisualizers"> <HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Packages\Debugger\Visualizers\Microsoft.VisualStudio.DebuggerVisualizers.dll</HintPath> </Reference>

it’s for vs2017 Community Version, if you use other editon , please update the Microsoft.VisualStudio.DebuggerVisualizers.dll’s Path.

e.g. profession editor path is <Reference Include="Microsoft.VisualStudio.DebuggerVisualizers"> <HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Packages\Debugger\Visualizers\Microsoft.VisualStudio.DebuggerVisualizers.dll</HintPath> </Reference>

1reaction
snikolayevcommented, Jul 15, 2018

The nuget package that the visualizer is referencing for Microsoft.VisualStudio.DebuggerVisualizers.dll is for VS 2013. Unfortunately there is no nuget package for VS2015 or VS2017. You can slightly modify the references to make it work for 2017. First, make sure to clone the sources for the same version of NRules you are using. You can clone by tag under “releases”. Then, modify csproj files for the Visualizer and Visualizer Tests, to reference the visualizer DLL from under the Visual Studio install location.

NRules.Debugger.Visualizer.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\..\..\Common.props" />

  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\..\..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
    <Compile Include="..\CommonAssemblyInfo.cs" Link="Properties\CommonAssemblyInfo.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="Microsoft.VisualStudio.DebuggerVisualizers">
      <HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Packages\Debugger\Visualizers\Microsoft.VisualStudio.DebuggerVisualizers.dll</HintPath>
    </Reference>
    <Reference Include="NRules">
      <HintPath>..\..\..\binaries\NRules\net45\NRules.dll</HintPath>
    </Reference>
    <Reference Include="NRules.Fluent">
      <HintPath>..\..\..\binaries\NRules\net45\NRules.Fluent.dll</HintPath>
    </Reference>
    <Reference Include="NRules.RuleModel">
      <HintPath>..\..\..\binaries\NRules\net45\NRules.RuleModel.dll</HintPath>
    </Reference>
  </ItemGroup>
  
</Project>

NRules.Debugger.Visualizer.Tests.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <OutputType>Exe</OutputType>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\NRules.Debugger.Visualizer\NRules.Debugger.Visualizer.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="Microsoft.VisualStudio.DebuggerVisualizers">
      <HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Packages\Debugger\Visualizers\Microsoft.VisualStudio.DebuggerVisualizers.dll</HintPath>
    </Reference>
    <Reference Include="NRules">
      <HintPath>..\..\..\binaries\NRules\net45\NRules.dll</HintPath>
    </Reference>
    <Reference Include="NRules.Fluent">
      <HintPath>..\..\..\binaries\NRules\net45\NRules.Fluent.dll</HintPath>
    </Reference>
    <Reference Include="NRules.RuleModel">
      <HintPath>..\..\..\binaries\NRules\net45\NRules.RuleModel.dll</HintPath>
    </Reference>
  </ItemGroup>

</Project>

Then run the build again, and copy the files from under <GitRoot>\NRules\binaries\NRules.Debugger.Visualizer\net45 to <Documents>\Visual Studio 2017\Visualizers

Let me know if this workaround works for you. I’ll see if I can have a more permanent solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show Visualizers Error "could not load this custom viewer"
When I try to inspect DataSet by standard DataSet visualizer I see this error "could not load this custom viewer".
Read more >
[NEW] Could not load this custom viewer
Recently when debugging a web app, if I try to use the dataset visualizer I get a modal popup saying "Could not load...
Read more >
Could not load this custom viewer · Issue #50
I'm unable to reproduce on a .NET 4.6.2 project, as I am unable to debug at all with Managed Compatibility Mode on.
Read more >
Show Visualizers Error “could not load this custom viewer”
Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists...
Read more >
Thread: [RESOLVED] Could not load this custom viewer
Re: Could not load this custom viewer. Sounds like something is corrupt. I'd try a repair of VS. You can do that from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found