0
votes

****EDIT UPDATE****

I have tried to create a shared project and this was the following issue:

enter image description here

I am new to Xamarin Forms on Visual Studio and was confused about the recent changes to the PCL and .NET Standard class library updates. Currently, I am trying to create a Cross-Platform App (Xamarin.Forms) on Visual Studio 2017 15.5.7 using the following settings:

I created this project using a different name (rga_inventory_app). Stating this now so that no one gets confused on the error output at the bottom. New Project

Template

Error1

Error2

Is this normal behavior for creating a cross-platform Xamarin Forms project on Visual Studio? Am I required to create a csproj file myself? Reading through the Xamarin documentation, I don't see anything on explicitly the .csproj files in VS2017. This causes trouble in updating the NuGet packages as well as its attempting to reload the project.

1
Try setting the Code Sharing Strategy to Shared Project. Also, will the Android project run?Muhammad Khan
@MuhammadKhan I changed it to Shared Project and I placed the screenshot on what errors I received on the main post. I cant run the Android project because it cannot find the .csproj files. I wonder if this is something that has changed recently? I reinstalled VS2017 and Xamarin as well. Very odd.Peter Kay
When I started working with Xamarin I also had to deal with many issues, but I know it will work perfectly on a clean version of windows. Try the obvious solutions, e.g. restart your computer, uninstall then reinstall etc.Muhammad Khan
Yeah, that is something I really want to avoid... thanks for the help though!Peter Kay

1 Answers

1
votes

I have found what the issue is. The initial creation of a Xamarin Forms project had some buggy startup operations that broke the referencing from the Android and iOS projects to the .NET Standard Library project. I had to go into each project and re-reference the .NET Standard project to the Android and iOS.

I later found out that the default installation were missing certain android SDK files and had to be later installed through the Xamarin Android SDK manager to resolve the referencing issue, as that may have been causing errors during start up (maybe the process was looking for a certain SDK version). I decided to install all versions from Oreo down to Lollipop.

I hope this helps anyone else that's having this issue when they first start off trying to use Xamarin Forms.