Web Connection
Template pages don't appear in Visual Studio
Gravatar is a globally recognized avatar based on your email address. Template pages don't appear in Visual Studio
  Tore Bleken
  All
  Sep 6, 2019 @ 10:14am

I use Visual Studio community 2019 and Web Connction 7.08.

My problem is that when I create a new file, I don't see any of the Web Connection template pages. In VS' Manage Extensions I see that version 7.6.0 of WestWind Web Connection Visual Studio Add-In is in deed installed.

I even tried to uninstall and reinstall the add-ins, but that didn't help.

In earlier versions of WWC I seem to remember that I had to make some manual changes in VS, but I don't find anything in Help. Do I have to change any parameters?

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Rick Strahl
  Tore Bleken
  Sep 6, 2019 @ 02:18pm

Tore,

You mean the syntax highlighting in Visual Studio for your custom extension?

This used to be settable via registry settings, but it's been moved to a private registry that can't be easily written to so it has to be done manually now unfortunately.

Here's more info Visual Studio Configuration - Manual Extension Mapping

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Tore Bleken
  Tore Bleken
  Sep 6, 2019 @ 10:46pm

No, that's not the problem. When I want to create a new file based on one of the template pages, these template pages don't appear in the list. This is what I see:

In this list I expect to see the *template.html files which have been installed into my \webconnectionprojects\mynewsite\web\views folder. Just like I see them in your video Getting Started with Web Connection 6.0 at around the time of 19:43.

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Rick Strahl
  Tore Bleken
  Sep 8, 2019 @ 01:43pm

Those templates get installed with the Visual Studio VSIX package that should run when the installer says - installing Visual Studio extensions.

You can try to re-run that explicitly by:

Go to c:\wconnect\VisualStudio (or your install folder), then double-click the WebConnection-Addin.vsix.

Note: The new addin only works with Visual Studio 2017 and 2019 not earlier versions.

If there's a problem it should let you know. You can also check whether the addin was installed in VS under Tools -> Extensions. it should be listed there if it's installed. If it is, maybe uninstall in Visual Studio, shut down, and then re-install from the VSIX file.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Tore Bleken
  Rick Strahl
  Sep 8, 2019 @ 02:51pm

I'll look into it tomorrow, it's midnight right now.

Just a quick question; do I really "need" Visual Studio? I mean, if it's used mostly for reading in the templates for new pages, I can easily do that manually in VS Code. Maybe I even can create Code a script, a la the Emmet solution of using ! to start a new HTML page.

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Rick Strahl
  Tore Bleken
  Sep 8, 2019 @ 03:14pm

No you don't need Visual Studio.

There are now templates and hotkeys for VS Code as well. I'm using VS Code mostly for my Web Connection editing now.

Visual Studio Code Configuration

There are still a number of benefits to Visual Studio

  • Web Connection Add-in jumps you to code file in FoxPro
  • You can publish your Web files from Visual Studio easily
  • Some tooling is better (CSS, HTML completions)

Maybe not worth it any longer.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Tore Bleken
  Rick Strahl
  Sep 8, 2019 @ 11:56pm

No success with VS.

I did as you instructed, uninstalled the extension and re-installed it. But the problem remains. I can see that the extension is installed, but I don't see the template pages.

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Rick Strahl
  Tore Bleken
  Sep 9, 2019 @ 12:17am

Sorry - I just realized the Addin doesn't copy the templates - the Web Connection installer does.

Can you try the following:

  • Run wcstart (to load the menu)
  • In the Web Connection menu:
  • Configure Visual Studio

This should copy the templates. This should also happen during installation. If this doesn't work it might be that Visual Studio 2019 Community is perhaps not registering itself in the same way as other versions and setup may not pick up the folder properly.

If it doesn't work you can copy the templates manually.

The templates are in:

C:\wconnect\VisualStudio\Visual Studio Page Templates

Copy the zip files from that folder to:

%userprofile%\Documents\Visual Studio 2019\Templates\ItemTemplates\Visual Web Developer

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Tore Bleken
  Rick Strahl
  Sep 9, 2019 @ 01:18am

First of all, I suspect that you have left a Debug line in your code. After the first confirmation, the debugger appears, so I have to press ctrl-M to resume. Afterwards I see a messagebox, "This extension is already installed to all applicable products". Plus another "Templates and Add-in registered". But no templates appears in the list in VS.

In my folder %userprofile%\Documents\Visual Studio 2019\Templates\ItemTemplates\Visual Web Developer I already had the zip files, but not the sub-folders.

Unfortunately, after having copied them manually, the problems remains....!

Since I'm most comfortable with VS Code, this problem doesn't bother me at the moment. Actually, I have gone hrought your videos and run the samples Code. Your snippets are super.

However, it looks to me like something that needs fixing. If you want to find out more about why I have this problem with VS Community 2019, ping me.

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Rick Strahl
  Tore Bleken
  Sep 9, 2019 @ 10:24am

RE: Set step on in Console

Already fixed and updated with a new download (also has an updated powershell script for IIS install that adds the WebSocket dependency)

For VS 2019 I'm not sure why the unpacked folders are there. Only the Zip files should be required. Maybe delete the folders and see what happens.

It's possible that the Community Edition doesn't pick up the templates. That would suck as Microsoft supposedly added support for addins and extensions/templates into Community with VS 2017. I have to check that out.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Tore Bleken
  Rick Strahl
  Sep 9, 2019 @ 10:47am

The folders were not there before I copied them just to see the result. Deleting them again made no change, as expected.

I hope that the Community Edition problem is solved, eventually.

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Rick Strahl
  Tore Bleken
  Sep 9, 2019 @ 12:05pm

Sorry I meant you shouldn't have these folders there, just the ZIP files. The folders are the source files for the folders that you can modify for customizing or creating new templates.

But I doubt that's the problem - it just seems like VS Community is not reading the templates from that folder.

Can you also make sure your language for new file is set to Visual C#:

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template pages don't appear in Visual Studio
  Tore Bleken
  Rick Strahl
  Sep 9, 2019 @ 12:12pm

Nothing to be sorry for, it was my misunderstanding.

Maybe the problem is that the language in the Community Edition is called C#, and not Visual C#?

© 1996-2019