Installed the reference from NuGet but VS2010 cant find the namespace - visual-studio-2010

I am quite new to C# and Visual Studio but I just downloaded the Facebook C# SDK from NuGet but when I try to use it using:
using Facebook;
visual studio says that it cannot find the namespace name. I checked my references list and Facebook is on the project's reference list.
I tried to follow the instructions from this post on code project.
http://www.codeproject.com/Articles/20032/Creating-a-simple-Facebook-Application-using-WPF
All the examples that I found so far online do not suggest for a problem of that nature.
any suggestions?

Sometimes some NuGet issues require to re-open the project with the referenced assembly to load it. This problem is not Facebook-specific.

Related

Unity keeps removing log4net from my Visual Studio project

I tried to install log4net for use in my Unity project with the following command :
Install-Package Unity.log4net
However, when I go back to the editor, then back to Visual Studio again, the log4net reference is removed, just like the Unity Editor had regenerated the project or something like that. The log4net reference no longer appears in the reference list and thus the log4net namespace can no longer be found.
I'm using Visual Studio 2017 Community Edition.
Has anyone experienced that and found a solution ? Thanks !
It seems like one cannot freely add references to a Unity project since Unity has to know about them. DLLs should be placed in a folder of the project called Plugins and then it works.
However it's weird that people are telling to use nuget packages. I'm assuming that must work somehow, but I don't know how. The solution above is dirty, but at least it works.
Unity projects require a special process to add NuGet packages. This is because when you open a project in Unity, its Visual Studio project files are regenerated, undoing necessary configurations. To add a package from NuGet to your Unity project you can check this doc from Microsoft: https://learn.microsoft.com/zh-cn/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2019

Assemblies can't get resolved when getting them from NuGet

I have some annyoing problem which I can't figure out. I installed Visual Studio 2017 Community on a new laptop and loaded an project I made on my old one from TFS. Suddenly some of the references can't get resolved.
So I tried to create a complete fresh ASP.NET MVC Project and download some of the assemblies that don't work in the old project by NUGET. After downloading the references don't work. I get already the warning in VS. One of those assemblies that doesn't work is for example
The referenced component 'System.Linq.Expressions' could not be found.
NUGET downloaded the assembly correctly and added the reference to the project. If I open the project file I find the entry for System.Linq.Expressions
and in HintPath: ..\packages\System.Linq.Expressions.4.3.0\lib\net463.
That file definitely exists on the file system. I also tried to change to path to an absolute one manually with same result.
I am using the newest .NET framework 4.7.2
Any suggestions what might be the problem?

Can not reference System.data Error when creating project

I am using Visual Studio 2015 Enterprise to generate Coded UI Tests. Things have been working well until this morning. When I attempt to create a new Solution/Project, I am given the following error:
I am then able finish loading the project. However, I see another issue in solution explorer:
Note that there is no path given for the selected reference. If I try to remove it/add it back as a reference manually, I still do not see a path or version. I have tried the following:
Selected different .Net framework versions when creating the solution/project
Tried different project types: Window Forms, Class Library
Repaired visual studio
Repaired .Net Framework 4.6.1
So far I have been unable to make the error go away. Any other suggestions?
I was not able to resolve this issue. I ended up performing a reinstall of the OS/Visual Studio to get things working again.

How do I add ArcObjects Version to a Visual Basic project?

I am developing a Visual Basic project in Visual Studio 2010 that uses ArcObjects. (I have ArcGIS 10.3 for Desktop.) I am getting the error "'RuntimeManager' is not declared. It may be inaccessible due to its protection level." A previous answer, Esri ArcObjects--Esri.ArcGIS.Version assembly, recommended adding a reference to Esri.ArcGIS.Version by clicking on Project, Add Reference, selecting it under .NET and clicking OK. I have tried to do this, but it's not under .NET. What can I do to make it available?
You should be able to find it if you use the Browse option.
The ESRI.ArcGIS.Version.dll file should be under your DeveloperKit installation folder. For me it is:
C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet

What assembly contains the BreezeControllerAttribute?

I'm just trying out Breeze.js and decided to convert an existing Web API 2.2 (.net 4.5.2) project to Breeze. I went to NuGet and installed the Breeze.ContextProvider and Breeze.ContextProvider.EF6 packages, since I used EF6 for this project. When I add the [BreezeController] attribute to my controllers Visual Studio (2015 CTP) doesn't know what it is ("Cannot resolve symbol 'BreezeController'" error). So I tried installing other NuGet packages that might contain this attribute (i.e. Breeze.Server.WebApi2), but couldn't find any. The docs don't seem to show what assembly I need to use for that attribute, so I'm stuck. Any help for this? Is that attribute deprecated? I can't find any mention of it in the docs... Thanks!
The BreezeControllerAttribute class is part of the Breeze.ContextProvider assembly. ( and is available as a standalone nuget package: Breeze.Server.ContextProvider or as part of the Breeze.Server.WebApi2 nuget) Not sure why you are having this issue, but nuget can be a little flaky... It might be worth removing all nugets and reinstalling them.
I just searched and installed "breeze.webapi2" and had the same issue. When I did a search for "breeze.server.webapi2", I noticed that that package wasn't installed (I thought it was a dependency on the "breeze.webapi2" package).
Installing just the "breeze.server.webapi2" currently doesn't do anything.
I'm doing this via VS2015 CTP6. My coworker was able to install the very same package using VS2013.

Resources