Visual Studio 2012 Add New Class Missing Template - visual-studio-2012

I've just installed VS2012 Ultimate side by side with VS2010 and it seems the standard templates are broken. I cannot add a class nor a console application.
File > New > File dialog contains the "Visual C# Class" template
but Right Click Project > Add > Class dialog does not contain the "Visual C# Class" template
Also File > New Project only contains MVC4 and not things like Console Application even if I change framework version and left filter.
EDIT: This only occurs after installing update 1. We have tried reinstalling, repairing, deleting the templates cache and reinstalling templates. We're considering working without update 1 at the moment, but there doesn't seem to be a way to uninstall just the update.

Corrupted ISO supplied, tried another from msdn and all fine now.

Related

Visual Studio 2022 - File Add New Item CSS, HTML, JS missing

I have 2019 Web Project I'm trying to open in Visual Studio 2022 and it's missing a lot of common file types, HTML, CSS, JS and Text to name a few. If I open the project by going to File -> Open -> Folder the expected file types are available but the Azure Dev Ops integration doesn't work.
Any pointers on how to get this working. Someone recommended building the New Item file templates but that seems like a chore for such a simple set of file types.
Update: If I change the Solution Explorer view to Folder View then I can add the files I expect, but with Folder View I can't check-in or publish. I will need to toggle between Solution View & Folder View complete those actions. To clarify further, how/what populates the Solution Explorer(Solution View) -> Add New Item menu?
In Visual Studio 2022, the .NET Framework project and item templates are now optional components. At the time of installing VS 2022, you need to manually check this option on the ASP.NET and web development section. If somehow this got missed during the installation, you can enable it by following the below steps:-
Open Visual Studio Installer
Click on Modify
Expand Asp.Net and web development
Check .Net Framework project and item templates
Screenshot:-
The above steps will bring back the missing HTML, CSS, JS, and other templates
One of the workaround you can follow to resolve the above issue,
We are trying the same with console application and trying to add html and can able to get it as well using VS-2022 with version 17.2.6.
Make sure that you have open the correct project in your environment.
HERE ARE THE SCREENSHOT FOR REFERENCE:-
Alternatively if you want to add an item template to the Add New Item dialog box in visual studio please refer this MICROSOFT DOCUMENTATION| How to Create item templates
For more information please refer the below links:-
SIMILAR SO THREAD|Can't find ADO.net Entity Data Model template in VS2017 .
This is a pain. It happened to me with the last upgrade. To fix it, open the installer, select "Web and Cloud", then "ASP.NET and web development." Check all the boxes through Intellicode, and then check ".Net Framework project and item templates".

Context menu does not display "add transform" in console job when using slow cheetah

I assume this is a simple fix considering I don't see any other posts about others having this issue. I am using VS2012 and I added slowcheetah 2.5.10.3 to the project using the nuget package installer.
I have tried opening a new console application as well as a unit test project, but in both I am not able to "add transform" to my App.config. The option in the context menu doesn't exist...
You will need to install the SlowCheetah Visual Studio extension to get the additional menus in Visual Studio. The NuGet package only adds a .targets file to the solution which is useful for command line (build server) scenarios.

Unable to edit Orchard CMS site in Visual Studio 2012

I'm trying to create a site using Orchard CMS. To get started, I downloaded / installed Orchard from WebMatrix. I successfully setup a site using the "Default" recipe. I then click the "Files" tab within the accordian along the left side. From here, I can see all of the files in my project. To begin editing within Visual Studio 2012, I click the "Visual Studio" button in the ribbon.
Once inside Visual Studio, I right-click on the solution and select "Rebuild Solution". The solution begins building, but then I receive an error. The error says:
Error 1 Object reference not set to an instance of an object. C:\Users\username\Documents\My Web Sites\Orchard CMS2\Modules\Contrib.Cache\Contrib.Cache.csproj 1
Please note that at this point, I have not even edited a single file. Rather, I created a basic site and attempted to open it in Visual Studio. What am I doing wrong?
Only the full source code will build in Visual Studio. You can edit the compiled web site version that you downloaded in Visual Studio, but you won't be able to build it. It actually doesn't need building as it has dynamic compilation built-in.
If you want to build the framework and core, get the full source code version.

Missing ADO.NET entity data model template from visual studio 2012 professional

Missing ADO.NET entity data model template from Visual Studio 2012 Professional. I don't even have "Data" category from Visual Studio template category.
I modified the Visual Studio 2012 installation, and selected all the available packages to install. But even then no luck.
I did a search in C:\ProgramData\Package Cache for "eftools.msi"
There were three versions (from different beta/RCs I guess)
I picked the most recent and installed it.
This solved the problem for me.
Firstly you can add ClassLibrary in your Solution.
Then, Add New Item to ClassLibrary and you can add Data>ADO.NET Entity Data Model
I solved this by going into project properties and changing the target framework. In my case, the default target framework for the project was 2.0 (no idea why - I would've expected 4.5 to be the default). I changed it to 4.5 and I was able to see the "ADO.Net Entity Data Model" option. I think it's all about having the correct EF tools installed for the CLR version that you are targeting.
Close Visual Studio and then install "Entity Framework Tools for Visual Studio" from this location:
► [Visual Studio Disk or installer folder]\packages\EFTools\EFTools.msi"
I do it and I got the result.
You can also download this tool from here.
Press right click on an existing project
select "add" -> "New Item..."
Under "data" node you can select the "ADO.NET Entity Data Model"
Here I found the solution
I found the EFTools.msi file in my packages folder, and run it then choose uninstall then run it again and choose install. After this reinstall, the template appeared.
If you have installed the new EFTools6.1.3ForVS2013.msi, and then uninstalled it, it removes the ADO.net Entity Model option.
Microsoft never puts the old version back.
Thank you Hainesy.
I faced the same issue today. But in my C:\ProgramData\Package Cache folder there was only one eftools.msi file. I installed it. Still the template was missing. Then I installed the same msi file again with repair option. Then the template appeared.
When you click on add new item you will get general list of templates. "Visual c# " may be highlighted on left had side menu when you open it. From that you must click on "Data" menu. Now you can see ADO.NET Entity Data Model :)
It succeeded me in a way just downloaded from given link https://www.microsoft.com/en-in/download/details.aspx?id=40762 and run for repair the Entity framework.
I had the same problem with Visual Studio Express 2013. If you have that problem, don't reinstall Visual Studio, you have to repair EF tools:
Search in C:\ProgramData\Package Cache for "eftools.msi"
Pick the most recent, run it and select repair.
Right click on the Project In Solution Explorer
Add > New Item > Data > ADO.NET Entity Data Model
You can update here

Visual Studio 2012 Windows service .vdproj project migration

I'm trying to move a solution I have over to Visual Studio 2012 and one of the project types is .vdproj.
According to this link this project type is not supported in Visual Studio 2012:
MSDN says they recommend that you use InstallShield Limited Edition for Visual Studio.
The problem is, when I open up my solution in VS2012 and try to add a new "Enable InstallShield Limited Edition" project to my solution, I get an error message saying:
Creating project 'test'...project creation failed.
Why might I not be able to add a project of this type to my solution?
If I make a new empty solution I can't make an InstallShield project it in either.
I'm going to try to download InstallShield limited edition and see if it does anything.
I tried out that InstallShield download, and it added two extra project types, but I'm unable to create either of them. I'm able to add normal website projects to my solutions just fine, but not deployment projects.
The installer was named the same, but this one prompted me to re-start. After re-starting I was able to add an InstallShield project, but it gets created in its own solution. So, it looks like now I have to figure out how to use it, and I'll be good to go.
It's looking like the limited edition doesn't have support to install Windows services.
This will probably be long and boring because there's lots of steps, but I'd like to write up how to move from a Windows service installer .vdproj to the new InstallShield LE that's available in Visual Studio 2012.
Step 1: Create a merge module (.msm)
Follow the steps of this guide.
Notes:
You will need to install WiX 3.6 and isWiX
The latest release of IsWiX doesn't enable the Tools menu item in Visual Studio 2012. Edit the file: C:\ProgramData\Microsoft\MSEnvShared\AddIns\IsWiXAddin.Addin (XML) and clone the HostApplication element and update 10.0 to 11.0.
In step #8 of the guide, it references a code tab. This has been moved to the XML Editor item in the bottom of the left menu
I left the MergeRedirectFolder empty for my installation
Here is my isWix files view:
After you're done with the guide you should have an empty .wxs file that looks something like this:
Using the Component XML element pulled from here you should end up with a .wxs file that looks like this:
Hit build and you should now have a .msm file.
Step 2: Adding merge module to InstallShield
Go though the wizard to setup the basic install information like company and version information.
Find the redistributables view in ISLE. Right click the list and select browse for module. After your module is found and added, right click the modules and select properties. Set the destination folder drop down to INSTALLDIR. I had to set mine to the lowest level folder I created for my install path, so you might have to experiment a bit.
Build Project, and test on virtual machine
Redistributables Screen
If you're getting errors about the path being too long you might need to change the release location to something close to the root.
Here's a list of all the build errors for reference.
Now you should be able to run your installer and have it install/start a Windows service. A lot more work than .MSI files, we got it to generate in Visual Studio 2010, but overall it was not too bad.
While there is no easy or truly supported solution for Visual Studio 2012, Visual Studio 2013 users can get an extension from Microsoft in the Visual Studio Gallery.
I found this post which says you must download InstallShield first. It's a very confusing way to work. I suggest to vote up the post on the connect site and give them comments letting know how poor that is. They could at least give a more descriptive error http://connect.microsoft.com/VisualStudio/feedback/details/732196/project-creation-failed-for-installshield-limited-edition#tabs

Resources