I have a Xamarin project, which is based on MvvmCross
. The project is for both iOS and Android. I opened this project in Visual Studio 15. I got some errors, wh
I have faced the same problem today. After two days searching, I have found the solution here. The issue is Xamarin.Forms library does not install all its dependent Nuget packages while first creating project by choosing cross-platform Mobile(Xamarin.Forms) project template from Visual Studio 2017. I have to manually install the upgraded dependent nuget packages to build the project successfully. Also have removed and added Xamarin.Forms at the end which resolves the issue.
Also, it is some time creating issues when two instances of Visual Studio 2017 is running, make sure only one instance is only running as I have encountered this issue as well.
This kind of issue may also come if by mistake you have any syntactical error like in my case: two text cells were present in the ListView -
<ListView x:Name="ProductsView">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding ProductId}" />
<TextCell Text="{Binding ProductDescription}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I went through other posts for this issue and found the same issue occurred due to the presence of syntactical errors, which VS doesn't report directly. So look for this, otherwise, reinstall the compatible version of xamarin.forms -> clean solutions -> rebuild by reopening VS.
This worked for me:
Hope this helps.
Still have issues ? Check your namespaces and your xaml code. Sometimes when you copy/paste some files, it can be the problem.
Here is the problem: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Try to move you project to another location like "C:/" , or change the name of the project for something more brief
This was how I got the error. In a StackLayout I put in a Padding property, and I seperated the 4 digits by a space rather than a comma. To find the bug I had to comment out the XAML controls individually and rebuild to isolate where the error is, and eventually I found the problem line. So basically this was the error message I got for a syntax error in my XAML code! In any other language I would expect to be informed what the error is so I can fix it in seconds. But this took me a few hours - although next time I know what to do.