nightclub nightclub - 2 months ago 26
C# Question

C# - Xamarin - how to debug a "using ..." error?

I'm using MSVS2015Pro for Xamarin.

I downloaded the project:

But I'm getting an error on:

using Clans.Fab;

It says:

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Clans' could not be found (are you missing a using directive or an assembly reference?) FAB.Sample D:\Xamarin\FloatingActionButton-Xamarin.Android\FAB.Sample\FloatingActionMenuBehavior.cs 5 Active

as you can see on the following image:

enter image description here


On the following image you have more details on errors:

enter image description here

My question is:

how can I debug these kind of errors?, I mean, not this one specifically but when there are
using errors
in general?. How can I know what:
specifically is needed and from where do I have to download it?


Then I did:

PM> Install-Package FAB.XamarinAndroid

and the errors disappeared and now I have 255 warnings.
Any idea on how to fix these warnings?

Below you have an screenshot with them:

enter image description here

Any idea on how to get rid of these warnings?


You should not have to troubleshoot these kind of problems very often.

Visual Studio projects you download from github should contains all external references pointing to nuget packages and you restore them on first build (unless project is not configured to restore on build).

Local references are either framework references you should have installed on your machine or other projects inside the solution.

Normally a missed class will be paired with a yellow exlamation symbol on references list indicating that a necessary assembly could not be loaded, that could be a first check to do.

Output window from build could also provide insights about any anomaly related to references.