Skip to main content

Troubleshooting

Missing Templates​

If Visual Studio does not display the project templates, refresh its template configuration:

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, the designer and templates are distributed through 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}

For example:

%LOCALAPPDATA%\Microsoft\VisualStudio\17.0_315d49d1\Extensions\x2rkvlci.xbt

info

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.

warning

If multiple developers use the same machine, installing a VSIX package can become a challenge. To manage this efficiently, you might need to manually install the VSIX package using the Visual Studio Developer Command Prompt. This method ensures that the extension is accessible to all users on the system. You can achieve this by executing the command VSIXInstaller /admin path_to_the_vsix.vsix. This command runs the installer with administrative privileges, making sure the extension is deployed globally rather than limited to a single user profile.


Wisej.NET 4.x​

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​

You can also download the templates separately:

warning

Unblock the ZIP archive in its Windows file properties, then extract it into:

Documents\Visual Studio (2019|2022)\Templates

When prompted, choose to overwrite the existing files. The ZIP archives contain the \ItemTemplates and \ProjectTemplates files in the folder structure expected by Visual Studio.

:point_right: 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}

:point_right: Run the >devenv command above again.

danger

Templates will not show up when starting a Visual Studio Experimental Instance.

Designer Error​

Errors can occur when you open a container in the designer. A common error, "Unable to cast type...", can result from Visual Studio loading shadow copies 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.

danger

Microsoft can update WebView2 automatically. Such updates can affect compatibility with the Wisej.NET Edge-based designer renderer.

If you encounter this issue, report it in our forum or contact us by email.

For designer versions that offer the Internet Explorer renderer, switching to it can work around this issue. Some complex JavaScript components may not work with that renderer.

Check the forum for pinned posts about designer updates. These posts typically include links to newer Wisej.NET Designer releases.

info

If the designer opens with an empty surface, WebView2 may be the cause. Click the "Edge" icon in the lower-left corner of the designer window and include the displayed version number in your report.

Wisej.NET Designer Engine Information

Clean and Rebuild​

The following steps usually resolve assembly-loading issues:

  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 and rebuild the solution, then check whether the designer loads correctly.