Closed NMansuriET closed 6 years ago
I tried the below steps:
I cannot build Forms app with 3.x version on VS 2017 professional.
Delete all folders in C:\Users\nmansuri.nuget\packages
deleting packages is not working..
I have observed the yellow warning ticks on the dependencies folder in the shared library. If the Forms version is 3.x, i get this warning ticks else not. I think this is the root cause of my problem. I have not configured the environment properly.
How the dev environment should be configured to use Xamarin Forms in VS2017 if: 1) Windows OS is 10 2) Which .NET framework needs to be installed? Is there any compatiblity issues of Xamarin Forms with the .NET framework? 3) The components that i opted while installing VS2017 : a) Mobile Development with .NET b) .NET desktop development 4) the .NET runtime and frameworks installed are:
Please install .NET Framework 4.7.1 if it isn't and see if that helps your issue.
How do i install 4.7.1? Its not under the modify list. Any pointers on how to install it externally?
Is Xamarin forms 3.x compatible with .Net Standard 2.0?
Here is a page regarding the 4.7.1 release; I would suggest installing that, doing a full deletion of bin/obj folders along with a clean and rebuild of your project and report back. If it still does not work, uploading a solution that fails on your end can let us compare.
I could not install 4.7.1.
I have uploaded the source code https://github.com/NMansuriET/XamarinFormsBuildIssues
Alright...after 5 days of frustration..i got it!
Forms 3.x will only work when you have .Net Framework 4.7. In windows 10 Pro, you can get .net Framework 4.7 only when you have the latest updates.
I first upgraded my windows 10 Pro from 1509 to 1803. After that i get option to modify my VS2017 to add .Net Framework 4.7
Steps to make Xamarin Forms 3.1 work with VS2017 .net standard 2.0
1) Update Windows 10 OS to a version compatible enough to get .NET Framework 4.7 2) Update VS 2017 and include .NET Framework 4.7
Installing .net framework 4.7 didn't work for me.
Installing .NET framework 4.7.2 resolved this issue. Anyone else having this issue should upgrade .NET framework version to 4.7.2
Description
If i try to create a Xamarin.Forms (3.1) project in Visual Studio 2017, it fails with below issues.
Severity Code Description Project File Line Suppression State Error MSB4062 The "Xamarin.Forms.Build.Tasks.XamlGTask" task could not be loaded from the assembly C:\Users\nmansuri.nuget\packages\xamarin.forms\3.0.0.561731\build\netstandard2.0\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. July7App C:\Users\nmansuri.nuget\packages\xamarin.forms\3.0.0.561731\build\netstandard2.0\Xamarin.Forms.targets 75
Severity Code Description Project File Line Suppression State Error MSB4062 The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly C:\Users\nmansuri.nuget\packages\xamarin.forms\3.1.0.583944\build\netstandard2.0\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. July7App C:\Users\nmansuri.nuget\packages\xamarin.forms\3.1.0.583944\build\netstandard2.0\Xamarin.Forms.targets 36
Another observation is the warning symbol appearing on the Dependencies folders in the shared library project. I dont understand why it appears.
Steps to Reproduce
Expected Behavior
The solution should be built successfully
Actual Behavior
Basic Information
Version with issue:
IDE:
Last known good version: VS Professional 2017 Version 15.7.4 (On Windows 10) Xamarin.Forms - 3.0
Platform Target Frameworks:
Android Support Library Version:
Nuget Packages: Xamarin Forms 3.0
Affected Devices:
Screenshots
Reproduction Link