Visual Studio 2015 Community Xamarin Cross-Platform templates missing - visual-studio

I installed Visual Studio 2015 Community Update 3 with Xamarin, updated Xamarin and everything was working fine.
But suddenly, the Xamarin Cross-Platform templates went missing when I tried to create a new project.
I don't have these templates anymore:
I only have these ones:
What I tried:
Change
Repair
Uninstall & reinstall Xamarin
Tried this solution (delete cache.bin files): https://stackoverflow.com/a/40201478/1351076
Configuration:
Visual Studio 2015 Community Update 3
Xamarin 4.2.2.11
Question:
Anyone having this issue or a solution?
Can I download somewhere the official missing templates?

This was working for me:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\
Find the correct subfolder. This can be tricky. I had a Xamarin folder, but that was not the right one. In my case it was folder wa13kl1p.m3s.
However, open your folders and check it there is some Xamarin.Forms.Templates... files in it.
Inside that folder navigate to the T/P/CSharp folder.
Copy the Cross-Platform folder over to C:\Users\\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#
Same thing for the ItemTemplates:
But this time navigate to T/I/CSharp folder.
Copy the Cross-Platform folder over to C:\Users\\Documents\Visual Studio 2015\Templates\ItemTemplates\Visual C#

In the current Beta channel, the templates all get merged into a "Wizard Template" instead.
Which will give you all of the same options as the separate templates gave:
However if you run into an issue where templates are not included, please ensure you check your Xamarin extension cache:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin
Which will have various versions such as 4.2.2.11 that you are currently on. You can then move those .vstemplate files from the .zips to your C:\Users\{username}\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C# location.
I would highly recommend updating to the Beta channel to ensure this template is at least there before doing this.

Related

Xamarin in VS - Add References shows no packages

I am developing a Xamarin.Android app and need to export a field. I went to the Add References dialog to add a reference to Mono.Android.Export.dll but there are no packages in the list there. Everything I'm seeing suggests that there should be a number of assemblies available to reference. I am using Visual Studio Enterprise 2017 RC 4, Xamarin 4.3.0.664, and Xamarin.Android 7.1.0.31. I have attempted a full reinstall as well as trying to find the Mono location on disk with no results. How might I get this list to populate?
Make sure you have the Mono.Android.Export.dll in your Visual Studio / Xamarin installation:
Example Path(Enterprise version):
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Micro‌​soft\Framework\MonoA‌​ndroid\{VERSION NUMBER}\Mono.Android.Export.dll
These seem to pickup just fine on the latest stable release of VS 2017.

Why visual studio 2015 not supporting intellisense support for xamarin.android?

recently after build 2016 of Microsoft, I have install xamarin for visual studio 2015.
The key part of vs is its intellisense feature and that is not supported when working with .axml files.
Please suggest
Visual Studio supports Intellisense for Android .axml files, but you must enable this first. For enabling this feature, read How do I enable Intellisense in Android .axml files? - If you didn't find the files in the mentioned directory (see article), you could download these from GitHub:
android-layout-xml.xsd
schemas.android.com.apk.res.android.xsd
For Visual Studio 2015.
Link: https://forums.xamarin.com/discussion/60962/enable-intellisense-for-axml-missing-android-layout-xml-xsd-schemas-android-com-apk-res-androiod
Download "android-layout-xml.xsd" and "schemas.android.com.apk.res.android.xsd" from:
https://github.com/atsushieno/monodroid-schema-gen
Put all downloaded files into C:\Program Files (x86)\Microsoft Visual Studio 14.0\Xml\Schemas
Open .axml file and click XML/Schemas menu in the Visual Studio. Then add correspondent files to the project.
Xamarin for Visual Studio includes out of the box xsd-based intellisense support starting with our cycle 7 builds. (XamarinVS 4.1.0.x).
You can try it right now switching to the Beta channel. In Visual Studio go to:
Tools - Options - Xamarin - Other
Select the Beta channel, and press Check now
Keep in mind that if you're developing for Xamarin.iOS, you will need to switch to the Beta channel your Mac as well. That can be done from Xamarin Studio in the Mac.
This is for Visual Studio, but you need a Xamarin Studio installation to make it work.
To enable Intellisense in Android .axml files:
Download or copy android-layout-xml.xsd into Visual Studio folder\Xml\Schemas
open catalog.xml and add line after last :
http://schemas.android.com/apk/res/android' />
Save catalog.xml and restart (or start) Visual Studio.
Intellisense in .axml files should work by default. (Maybe you need add a schemas.android.com.apk.res.android.xsd file too.)
Shem's files: https://github.com/atsushieno/monodroid-schema-gen

How to open a Visual Studio Code Folder (Project) in Visual Studio IDE

How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.

SharePoint 2010 WebPart .g.cs files not being generated by Visual Studio 2010

I've inherited a SharePoint 2010 project that was originally created in another environment using a different version of Visual Studio (2012). My issue is that the .g.cs files for some WebParts are not being [re-]generated when I make changes to the .ascx files. I know that for regular .aspx pages, you can right-click and choose "Convert to Web Application" to force generation of the designer files. Is there something similar for WebParts?
I've already tried deleting the bin\ and obj\ directories in the project, cleaning and rebuilding (both the solution and the project), as well as trying to re-create the WebPart from scratch.
Wrote about workaround here: http://sadomovalex.blogspot.com/2013/08/fix-bug-in-visual-studio-2012-with.html. You need to specify url of correct Sharepoint site on local dev environment in "Site URL" property of your project.
It seems that it's an issue from going between Visual Studio 2010 and 2012. On the 2012 box the .g.cs files are regenerated and updated fine but the 2010 box refuses to do so.
Correction: SharePointWebPartCodeGenerator wasn't being found. After re-installing the Visual Studio 2010 SharePoint Power Tools, the .g.cs files were being updated.
I searched forever for a fix and installing the 2010 SharePoint Power Tools solution fixed the issue! The solution I was working on must have been a 2012 Sandbox solution.

Visual Studio 2010 - Silverlight 4 templates missing, how to redownload them?

I am missing the silverlight 4 templates for Visual Studio 2010. devenv /installvstemplate doesn't work because the actual files are missing, and the specific one I want (User Control) doesn't show up in the list of online templates. I've already tried the solutions in Missing Project/Item Templates.
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ does not contain any project templates or item templates.
I've already tried uninstalling and reinstalling all Silverlight components and tools I'm using.
Is there any way to just download the templates directly and put them in that folder?
I went to the windows control panel, Programs and Features, and did a re-install of Visual Studio (VS lets you do that without having to uninstall and lose all your settings). After that, I re-instaled all the silverlight components I'm using. The templates are available now.
This helped me: http://chiragrdarji.wordpress.com/2008/05/06/missing-templates-in-visual-studio-installed-templates/
If you Close all instance of Visual Studio. Open visual studio command prompt and type,
devenv /installvstemplates
Press Enter

Resources