VS2017反复无法创建Xamarin Forms项目求助
Hey there, let's work through this issue step by step—since reinstalling worked before but the problem came back, we can target potential component corruption or template registration issues with these fixes:
Repair your Visual Studio 2017 installation
- Launch the Visual Studio Installer, locate your VS2017 instance, and click Modify.
- Double-check that the Mobile development with .NET workload is checked (even if you selected it during initial setup, some components might have become corrupted).
- Click Modify to reinstall any missing or damaged components, then restart VS once complete.
Reset Visual Studio user data and template registration
Sometimes cached settings or unregistered templates cause this problem:- Close all open instances of Visual Studio.
- Open Command Prompt as an administrator, then run these commands one after another:
devenv /resetuserdata devenv /setup - Wait for the commands to finish, then launch VS again and check if the Xamarin Forms project option is back.
Verify template files exist
- Navigate to the VS template directory (replace
YourEditionwith your VS2017 edition like Community/Professional):C:\Program Files (x86)\Microsoft Visual Studio\2017\YourEdition\Common7\IDE\ItemTemplates\CSharp\Mobile Apps - Look for Xamarin Forms-related template folders here. If they're missing, a repair (from the first step) should restore them.
- Navigate to the VS template directory (replace
Update Xamarin components
Outdated Xamarin components can break template visibility:- Open VS, go to Tools > Options > Xamarin > Other.
- Click Check for Updates to install the latest versions of Xamarin.iOS, Xamarin.Android, and Xamarin.Forms. Restart VS after updating.
From your attached screenshot, it’s clear the template is entirely missing, so focusing on repairing components and re-registering templates should resolve this issue.
内容的提问来源于stack exchange,提问作者priya_d

