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.NET 2 or \Wisej.NET 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 installer (.vsix).

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.


Wisej.NET 4.0

With Wisej.NET 4, developers have access to two distinct designers: one for the .NET Framework (net48) and another for .NET Core (.NET 8.0-windows and later versions).

The designer for the .NET Framework is included in the VSIX installer, which also provides various templates and other Visual Studio add-ons. In contrast, the designer for .NET Core is distributed and updated through the NuGet package that includes Wisej.NET itself.


Download Templates

We also provide the templates to download as another option:

Templates

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.

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.

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. Close all designer tabs

  2. Close all Visual Studio instances

  3. Delete /bin, /obj, /.vs

  4. Open Visual Studio and reload the solution

  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.

Last updated

Was this helpful?