dll using issue in visual studio 2010 - c#

I'm trying to use Bouncy Castel dll in my project. When I add it to my references I can't use it and when I write this code:
using BouncyCastle.Crypto;
I face with this error:
The type or namespace name 'BouncyCastle' could not be found (are you missing a using directive or an assembly reference?)
what should I do?

I have checked it Micheal, you should write this:
using Org.BouncyCastle.Crypto;
instead of:
using BouncyCastle.Crypto;

Related

Importing a namespace from Unity Packages c# - The type or namespace name 'Steamworks' could not be found

I am trying to import Steamworks from the Steamworks.NET package that I imported through the unity package manager.
I can clearly see that the Steamworks.NET package was installed and that it contains the namespace Steamworks.
However, when I actually try to use this namespace, like this:
using Steamworks;
I get the error:
Assets\Scripts\SteamIntegration\SteamManager.cs(15,7): error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)
This makes no sense to me - The namespace clearly exists in the project. Why can I not use it / How can I use it?
You seem to be using an Assembly definition for your scripts.
In that case you additionally will need to reference the assembly definition of according package(s).
In your case the file starting with com.rlabrecque....

C# Added MySQL Reference Into C# Still Not Recognizing MYSQL

using MySql.Data.MySqlClient;
References
It is referenced, I have downloaded the connector, yet it refuses to work. I rebuilt and cleaned, doesn't work.
The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)

XmlNode could not be found error in visual studio 2013

I am making a weather app using C# in Visual Studio 2013.I have used the namespace System.Xml and also added the reference of System.Xml.XmlNode using the object browser.
But still when I am trying to use the namespace XmlNode it is showing the following error:
The type or namespace name 'XmlNode' could not be found (are you missing a using directive or an assembly reference?)
Am I using any broken reference?
And how to rectify this error?
As you see at http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.aspx it requires namespace System.Xml in System.Xml.dll assembly.
So first add a reference to System.Xml.dll and then add the following using statement in your code:
using System.Xml;
Check whether your project references the System.Xml.dll assembly.
Make sure your assembly references System.Xml.dll
Make sure to put using System.Xml; in the top of the .cs file

Using XDocument in XNA on Windows Phone

I have some perfectly working code using XDocument, XMLWriter etc but when I try to add it to my XNA 4.0 game it doesn't work.
I get the following compilation errors, even though I have all the required references referenced and usings used as shown here:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.IO;
The type or namespace name 'XmlTextWriter' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'XmlNodeList' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'XmlDocument' could not be found (are you missing a using directive or an assembly reference?)
Any help?
If you developing a Windows Store App, you may want to check the following thread...
How to rectify Namespace errors in a Windows Store class library in Windows 8 and Visual Studio 2012?

Missing directive or assembly reference using WMI ManagementObjectSearcher?

I have found this link:
Detect Antivirus on Windows using C#
However when I try this code in visual c# express edition 2008 it says :
Error 1 The type or namespace name 'ManagementObjectSearcher' could not be found
(are you missing a using directive or an assembly reference?)
C:\Users\Andy\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 15 17 ConsoleApplication1
Amongst other similar errors on the 2 lines which seem important!
Looks like the code segment is missing some imports or something?
I am using Windows 7... Please help!
Andy
You are missing a reference to the assembly containing the type ManagementObjectSearcher, which is in the System.Managementnamespace. Add this namespace and it should work.
You will have to rightclick the project -> add reference and add the System.Management assembly. System.Managment is not added automatically with the creation of a new project.
WMI reference
WMI + C#

Categories

Resources