nightclub
nightclub

Reputation: 721

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

I'm using MSVS2015Pro for Xamarin.

I downloaded the project: https://github.com/Clans/FloatingActionButton

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

[EDIT]

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: Clans.Fab; specifically is needed and from where do I have to download it?

[EDIT]

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?

Upvotes: 0

Views: 84

Answers (1)

Claudio Redi
Claudio Redi

Reputation: 68440

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.

Upvotes: 0

Related Questions