Matt Junck
Matt Junck

Reputation: 21

Visual Studio acting like a reference is missing, but it is clearly there,

I am using Visual Studios 2015 Community. I was given this code to work on and improve, and I cant get any thing from MetroFramework to behave properly. This is my first time using VS, but my research has been extensive, and I am very stuck. Any time I try to open up a design, I am met with many many errors that you can see in the gallery.

So naturally I follow up and check my references. The references in this project clearly show MetroFramework.

And furthermore, Metroframework.Controls clearly shows the components it says are missing. I would post the pictures, but SO only lets me put two links right now.

What am I missing here? This is the first time I've found a problem I cant solve looking at answered questions, and I hope you all can help. Thank you.

Edit: I have metroframework in both my references node and in the header of my code. VS does recommend I remove it from my header, as it says it is not being used, but it is being used, its just throwing the errors.

I also seem to get a setup error, and I am not sure that I had it before. Image in gallery.

All images are in the folowing gallery. Imgur Link

Upvotes: 2

Views: 565

Answers (4)

stopkillinggames.com
stopkillinggames.com

Reputation: 1436

You have the wrong project installed. To fix your problem install Metro Modern UI - Metro Framework by Dennis Magno from NuGet (I assume that's the correct one because it has MetroGrid and MetroDateTime). If you use gui search for metromodernui in search box, or execute this

Install-Package MetroModernUI


For the record

Here is original project which you probably had installed (now so that I looked at last screenshot). Installed using:

Install-Package ModernUI

Here is another project you don't want to install (I thought you had this one originally) because it also doesn't have neither of those controls. Installed using:

Install-Package MetroFramework -Version 1.2.0.3

Here is the project you probably want to install to resolve errors.

Install-Package MetroModernUI

"Conveniently", they all use the same namespace MetroFramework, hence the confusion.

Upvotes: 0

Matt
Matt

Reputation: 35281

Try this command from your Package Manager Console

Update-Package

Upvotes: -1

blazky
blazky

Reputation: 156

Visual Studio sometimes acts up. Try any of the following:

  1. Building the solution even with errors. This can get NuGet packages to refresh and that may be your problem.
  2. Cleaning the solution and then building.
  3. Restarting Visual Studio.

Upvotes: 3

Matt
Matt

Reputation: 35281

  1. Right click on the References folder on your project.
  2. Select Add Reference.
  3. Select the .NET tab (or select the Browse button if it is not a .NET Framework assembly).
  4. Double-click the assembly containing the namespace in the error message.
  5. Press the OK button.

Upvotes: -1

Related Questions