简体   繁体   中英

“This project requires a Visual Studio update to load” error when creating a Xamarin.Forms Cross-Platform Application

When I create a Xamarin.Forms application using Visual Studio Community 2015 Community on Windows 8.1 it shows me this error on load:

A problem was encountered creating the sub project 'App1.WinPhone'. This project requires a Visual Studio update to load. Right-click on the project and choose 'Download Update'

I've installed all updates available and trying on a newly installed Windows.

Note: I had this error in Forms.

How can I fix this error?

Note: There isn't a Download Update option in Solution Explorer.

Navigate to where you saved the project files that you created in Visual Studio. Default location is C:\\Users\\PSDan\\Documents\\Visual Studio 2015\\Projects .

Open the project folder that you are experiencing problems with and navigate to C:\\Users\\PSDan\\Documents\\Visual Studio 2015\\Projects\\test\\test\\test.Windows folder. Inside this folder is a file called test.Windows.csproj .

Right click on that file and open with... using Visual Studio, by doing this it should detect the missing package and in my case automatically prompted to install the missing package.

I've been seeing similar errors for .Window or .WindowPhone and what I've observed is that it is due to missing SDK. Same might be the case with you.

Do you see App1.Droid appearing in the solution? (I guess NO)

Go to file explorer and locate App1.Droid.csproj (..\\App1\\App1.Droid\\App1.Droid.csproj) and open this in a new instance. There it will pop up "Install Missing Feature" dialog and you can follow the steps to install missing components.

If your issue is the same as here:

Project required a Visual Studio update

then you may try and see if this solution works:

[Cause is] a mismatch of the target framework version and profile in the .csproj file. Despite the target framework being correct in the project Properties, they were not being correctly saved for whatever reason. Thus, when trying to install a utility library from nuGet, it left my project in the state you described.

The solution was to go by this site:

Framework Profiles in .NET

and find the correct combination, then manually edit the .csproj file to adjust <TargetFrameworkProfile> and <TargetFrameworkVersion> .

安装具有选定功能“ Windows 8.1和Windows Phone 8.0 / 8.1”和“跨平台移动开发”的Visual Studio Update 3为我解决了此问题。

Uninstall Xamarin completely, and reinstall it. That happened to me as well. I would uninstall Visual studio too. Install that first, then install Xamarin.

Edit: I know this sucks to do, but it was what the Xamarin team had me do to resolve it. As far as I know this is the official fix as of last week.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM