Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Add Item in Visual Studio 2015 loses templates for .NET Core class library projects

Open petmat opened this issue 9 years ago • 13 comments

After I installed the Visual Studio Tools for Azure Functions from this address: https://aka.ms/azfunctiontools I noticed that in a .NET Core class library project when I added a new item (or new class) only templates visible were powershell and webpack config templates. The reason those were visible is probably because they came from extensions. Only .NET Core class libraries were missing the templates. I could add classes and other items in for example ASP.NET Core projects.

image

So it seems installing the tools makes it difficult to add new classes and other items in a .NET Core class library project. I have Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3.

I tried several different .NET Core class library projects and they all had the same issue. I even tried to reset the VS templates, but it did not fix the problem. After uninstalling the Azure Functions tools all the item templates are visible again.

petmat avatar Jan 03 '17 18:01 petmat

I'm seeing the same issue on my machine. Thankfully, I found this issue as I just reinstalled and was unsure what the root cause was. I'm unaware of a workaround though I checked out the ASP.NET Core projects and those still have their templates in tact. Console and class libraries no longer have any templates (except for PowerShell)

maxpower720 avatar Jan 07 '17 03:01 maxpower720

Same here, I tried uninstalling Microsoft Azure App Service Tools 2.9.6 but the templates ars still missing.

aminebizid avatar Jan 28 '17 13:01 aminebizid

Try running devenv /setup from an administrator developer command prompt

lindydonna avatar Feb 01 '17 23:02 lindydonna

Hi,

@lindydonna the command didn't solve the issue. [edit] I got it working again. I had to remove the folders "Web Tools Azure" and "Windows Azure Tools" from my Visual Studio installation and after that I ran the devenv /setup and devenv /InstallVSTemplates.

CharlesToniolo avatar Feb 13 '17 12:02 CharlesToniolo

@CharlesToniolo Thanks for providing the workaround!

lindydonna avatar Feb 13 '17 20:02 lindydonna

Uhm @CharlesToniolo @lindydonna this breaks all the existing Azure tooling (publish, cloud explorer etc.).

I have found the following files that needs to be removed; This is in the "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools Azure" folder.

  • AzureFunctionsImages.imagemanifest
  • Microsoft.VisualStudio.Web.WindowsAzure.AzureFunctions.dll
  • Microsoft.VisualStudio.Web.WindowsAzure.AzureFunctions.pkgdef

The "Windows Azure Tools" folder does not need any change in my case.

TomGroeneboer avatar Feb 14 '17 08:02 TomGroeneboer

@TomGroeneboer Great! I had to remove everything because I was in a hurry.

CharlesToniolo avatar Feb 14 '17 17:02 CharlesToniolo

@TomGroeneboer excellent point, thanks for providing your workaround.

lindydonna avatar Feb 14 '17 19:02 lindydonna

@lindydonna I did run the uninstall for the Azure Functions and that didn't remove the files. So I would classify this as a bug in the uninstaller...

TomGroeneboer avatar Feb 14 '17 19:02 TomGroeneboer

@TomGroeneboer Agreed, I created https://github.com/Azure/Azure-Functions/issues/181, which will also document your workaround.

lindydonna avatar Feb 14 '17 19:02 lindydonna

I suppose it is a bug in the installer too? As only the Powershell templates are left after installing the Azure Functions tools?

jeanpaulsmit avatar Feb 16 '17 13:02 jeanpaulsmit

Will there be a fix for this at some point? Not having access to the Item Templates for .Net core class libraries is really annoying.

martinstenhoff avatar Apr 20 '17 06:04 martinstenhoff

This particular version of the Functions tooling will not be maintained, and the new version will be based on class libraries. We'll also use a VSIX to install, which won't have this effect on other project types.

See Azure Functions Tools Roadmap blog post

lindydonna avatar May 09 '17 01:05 lindydonna