Wisej.NET
Ask or search…
K

Troubleshooting

Missing Templates

In case Visual Studio decides not to show the new templates try this:
For Visual Studio 2017 and 2019, open the VS command line and run:
>devenv /installVSTemplates
For Visual Studio 2022, open the VS command line and run:
>devenv /updateConfiguration
⚠️
If it still doesn't work, check if the \Wisej 2 or \Wisej 3 templates are present on your development machine under your user name here:

Wisej.NET 2.5 and earlier:

  • Documents\Visual Studio (2019|2022)\Templates\ProjectTemplates\Visual C#
  • Documents\Visual Studio (2019|2022)\Templates\ProjectTemplates\Visual Basic

Wisej.NET 3.0 and above:

Starting with Wisej.NET 3.0, we took the approach of distributing the Designer and the templates in a Visual Studio Extension format.
The path to the templates can vary from one machine to another:
%LOCALAPPDATA%\Microsoft\VisualStudio\17.0_{id}\Extensions\{extension_id}
As an example, it can be something like this:
%LOCALAPPDATA%\Microsoft\VisualStudio\17.0_315d49d1\Extensions\x2rkvlci.xbt
In case the project templates (or item templates) for Wisej.NET are missing, either run the installer again and select Repair, or download the templates below.

Download Templates

We also provide the templates to download as another option:
Unblock the zip (this is important!) and expand into:
Documents\Visual Studio (2019|2022)\Templates
Select to overwrite existing files when asked. The zip archives contain the \ItemTemplates and \ProjectTemplates files in the same structure expected by Visual Studio.
👉
Run the >devenv command above again.

Clear Templates Cache

⚠️
If it still doesn't work, delete the Visual Studio templates cache. Each installation of Visual Studio has a different unique ID. Visual Studio 2019 versions start with "16.0" and Visual Studio 2022 versions start with "17.0".
>dir %LOCALAPPDATA%\Microsoft\VisualStudio
>del %LOCALAPPDATA%\Microsoft\VisualStudio\{version}\ItemTemplatesCache_{00000000-0000-0000-0000-000000000000}
>del %LOCALAPPDATA%\Microsoft\VisualStudio\{version}\ProjectTemplatesCache_{00000000-0000-0000-0000-000000000000}
👉
Run the >devenv command above again.
Templates will not show up when starting a Visual Studio Experimental Instance.

Designer Error

Occasionally you may start getting designer errors when opening a container in design mode. The most common error is "Unable to cast type..." It's a well-known issue related to Visual Studio having to load a shadow copy of the assemblies used at design time.
Since assemblies cannot be unloaded in .NET Framework, Visual Studio loads shadow copies of the assemblies loaded by the designer. Sometimes it ends up loading the same assembly multiple times, leading to the "Unable to cast" error because the same type is loaded more than once.
The WebView2 component can be silently updated by Microsoft, these updates can eventually break Wisej.NET's Edge-based renderer.
In case you encountered this issue, please post in our forum, or contact us via email.
The current workaround for this type of issue is to switch back to the Internet Explorer renderer, this allows you to use the designer with little to no issues, one side effect would be the use of some complex JavaScript components that don't usually work with IE.
We're constantly updating the Designer component, please make sure to follow the forum for any pinned post, usually, those posts would contain links to newer releases of the Wisej.NET Designer.
If an opened designer looks empty, that usually means that the WebView2 component is what causing the issue, make sure to click on the "Edge" icon found in the lower left of the Designer window, and report the version number to us.
Wisej.NET Designer Engine Information

Clean and Rebuild

Usually, it's enough to:
  1. 1.
    Close all designer tabs
  2. 2.
    Close all Visual Studio instances
  3. 3.
    Delete /bin, /obj, /.vs
  4. 4.
    Open Visual Studio and reload the solution
  5. 5.
    Recompile
⚠️
If you still get the problem, try to clean the designer assembly cache and repeat the steps above.

Clear Designer Assembly Cache

Visual Studio makes shadow copies of the assemblies loaded by the designer here:
%LOCALAPPDATA%\Microsoft\VisualStudio{version}\Designer\ShadowCache
Each installation of Visual Studio has a different unique ID. Visual Studio 2019 versions start with "16.0" and Visual Studio 2022 versions start with "17.0".
>dir %LOCALAPPDATA%\Microsoft\VisualStudio
>del %LOCALAPPDATA%\Microsoft\VisualStudio\{version}\Designer\ShadowCache
⚠️
Reopen Visual Studio, recompile again and the problem should be solved.