Xamarin Forms Item Templates Missing in Visual Studio - xamarin.forms

I had to restore my Windows to a previous restore point and then Xamarin stopped working. I ended up uninstalling Xamarin and Visual Studio 2015 to get Xamarin working again, which it mostly is. I cannot update Xamarin Forms to the latest stable 2.3.3.180 but 2.3.3.175 is working for now.
The most troublesome issue is when I right click my PCL project and select Add->New Item, in the list of Installed templates there is no Cross-Platform folder and nowhere to select "Forms Xaml Page" item. How can I get these templates installed? Have done reinstall and repair on both VS and Xamarin and I can't get these templates to show up.
Thanks,
Tony

See my post here:
https://stackoverflow.com/a/42341624/2274377
C:\Program Files (x86)\Microsoft Visual Studio14.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 Studio2015\Templates\ItemTemplates\Visual C#

Related

Xamarin.Forms upgraded to Maui - Visual Studio Cannot debug/run?

Application upgraded using Microsoft's auto upgrade command line tool.
Some code fixes, and the code builds successfully.
Visual Studio however does not show me any way to debug my app.
When trying to click on Debug anyway, a random Android Emulator from my list(which is not showing currently)
Will open, but deployment will fail without specifying the reason.
Has anyone managed to upgrade an existing Xamarin.Forms project to Maui?
I managed to make VS recognize the Android project in my converted solution.
I added the <SingleProject>true</SingleProject> property into my Android project's .csproj file under the first/main property group, closed VS, deleted Bin, Obj, .vs folders.
After starting VS again , I rebuilt and VS allowed me to debug on selected .net targets like a single project Maui solution.
This is very strange that it works, since this solution is made of 3 project like in a Xamarin.Forms solution, so it doesn't make since that adding this property solves the issue, but there you go.
Delete .bin and .obj folders. Delete solution's hidden .vs folder. Build. Does it show debug option now?
Try restarting VS (after the successful build). Now work?
If not, Create a new project using Maui template.
Use solution / manage all nugets to add nugets used by your project.
Copy all your source files into that new project.
Project / "Add existing items": all those source files.

Intellisense for WebForms doesn't work in Visual Studio 2019

I use Visual Studio 2019 (16.7.7). I created new ASP.NET Web Application (.NET Framework) with web forms. But in code behind “Find All References” doesn’t work for setter. And in .aspx-file I can’t “drill down” to user control definition. It seems like a plain text.
I can’t use a previous visual studio version. My current project contains a lot of web forms and also projects with PackageReference format
I had installed visual studio 2017 before. But I unistalled it according to https://learn.microsoft.com/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2017 and https://learn.microsoft.com/en-us/visualstudio/install/remove-visual-studio?view=vs-2017 Also I several times have reinstalled visual studio 2019 but problem remains
Here are steps to reproduce:
Create ASP.NET WEB Application (.Net Framework) C#
Select Web Forms Template
At ViewSwitcher.aspx.cs file I have added public property
public string SomeProp { get; set; }
At Site.Mobile.Master file I have added value. Here intellisense works. It suggests property SomeProp.
<friendlyUrls:ViewSwitcher SomeProp="someValue" runat="server" />
Build.
Return to ViewSwitcher.aspx.cs. I do right mouse click on set of SomeProp and click "Find All References". But it doesn't show using from Site.Mobile.Master.
It is too difficult make any refactoring and rename without it
Maybe, visual studio have never had such feature. Previously I have used Resharper but now I can't use it.
The same true for visual studio 2017. windows 10
I suggest you could try the following suggestions:
1) disable any third party vs installed extensions under Extensions-->Manage Extensions-->Installed
2) clean nuget caches
3) run update-package -reinstall under Tools-->Nuget Package Manager-->Package Manager Console.
4) close VS, delete all the folders C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\16.0_xxxx to initialize your VS.
also, for your project, you should delete .vs hidden folder under the solution folder, bin and obj folder of your project.
Besides, if you still cannot get what you want, please click C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe to clear all vs versions strongly, their registry information and data info.
Then, reinstall the VS again. If you have tried this step, then, you should try to turn off any antivirus software, other third party windows programs.
Update 1
Actually, it is quite strange. As to help you further, I have reported the issue on our DC Forum and you can vote it and add any comments if I did not describe the issue in detail so that it will get more Microsoft's attention. And I hope the Team will give you a satisfactory reply.

Visual Studio App Center - Duplicate 'EmbeddedResource' items were included when building Xamarin Forms app?

When building a Xamarin Forms app in Visual Studio App Center it complains about the embedded xaml-files when using netstandard2.0.
Locally with updated Visual Studio and Xamarin Forms it works perfect to build and run.
(CheckForDuplicateItems target) ->
/usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(276,5):
error : Duplicate 'EmbeddedResource' items were included. The .NET SDK
includes 'EmbeddedResource' items from your project directory by
default. You can either remove these items from your project file, or
set the 'EnableDefaultEmbeddedResourceItems' property to 'false' if
you want to explicitly include them in your project file. For more
information, see https://aka.ms/sdkimplicititems.
How should xaml-files be added to the project if not as embedded?
UPDATE:
The same error is present using VSTS and Hosted Mac Agent
Edit your .csproj file and remove the ItemGroup that contains the EmbeddedResource.
This resolved the issue from me but the original answer came from Xamarin Forums

How to launch VStudio 2015 RC for ASP.NET vNext

I installed VSStudio 2015 from here: http://www.asp.net/vnext
Installation says success but I have no icon on desktop to run why?
VS2015RC installation did not put an icon on my desktop either, it is in the application menu though.
The exe should be located here.
C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\devenv.exe
You can create a shortcut and put it on the desktop yourself.
If you cannot find the folder maybe you need to reinstall or repair the installation.
The official download site is here. The community edition should have all you need to get started with ASP.NET 5 and all the vNext stuff.

cant add Web User Control (vs 2010)

In my project, solution explorer I click on the folder and -> add new Item. I would like to add web user control but I cant see it. In previous versions of visual studio I didnt have such a problem,
any idead on how can I add this template ?
thanks for any help,
Bye
EDIT:
this is how it looks:
http://imageshack.us/photo/my-images/820/controlka.png/
in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\1033
I dont have any web zip files :/
But when I create new WebSite or asp.net Web Application tempaltes are available.
Project Im working on is converted from vs2008
Is your project set for Client Profile in your project's properties? If so, change it not to.
Is Web selected in the tree to the right?

Resources