Error after adding reference to my project(TlGallioAddOn.dll) - c#

I have added the reference TlGallioAddOn.dll to our sample c# application. I have using that reference like using TlGallioAddOn;. When using that reference of that dll it shows the following error.
The type or namespace name 'TlGallioAddOn' could not be found (are you missing a using directive or an assembly reference?)
Could u all please help me to resolve that.

Right click the project in your Solution Explorer. Click 'Add Reference' then find your DLL. It will import the DLL and resolve the error.

Check the framework target of both projects.
Project defaults are now .NET 4.0 Client. If you've compiled the addon project against .NET 4.0 (Full), you'll need to modify the project for which you're adding a reference to use .NET 4.0 (Full) also.

Related

The type or namespace name 'WinForms' does not exist

I was trying to biuld my project, when I got the following error:
The type or namespace name 'WinForms' does not exist in the class or namespace 'Microsoft.Reporting' (are you missing an assembly reference?)
I have already added this references:
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;
using Microsoft.Reporting.WebForms;
And I'm using Visual Studio 2010, with .Net framework 4.0.
How can I fix this error?
Thanks
Even if you added the using its most probable that you don't have a reference to the Microsoft.Reporting dll. You need to add a reference to the Microsoft.Reporting dll in the project that is generating this error. I usually use the solution explorer in VS and right-click on the project -> Add Reference.
Do note that in the Add Reference dialog you generally have multiple sources available
P.S. I say the Microsoft.Reporting dll but because I assume that Microsoft.Reporting.WinForms is a namespace in said dll, but there could be a separate Microsoft.Reporting.Winforms dll

The type or namespace name 'Device' does not exist in the namespace 'System'

I am trying to work with GeoCoordinate which is meant to be supported by .Net Framework 4.5. I am working on winodws 8 and I have .Net Framework 4.5, but I keep getting The type or namespace name 'Device' does not exist in the namespace 'System' error.
Any solution?
The type or namespace name 'XXX' could not be found...
Always bear in mind, if you get this error there are three possibilities.
You missed the using directive.
You missed the Assembly reference
You have "using directive" as well as "Assembly reference" in place but the current project's target framework version is lower than the referenced assembly target framework version.
Almost all the cases above three steps should solve the problem.
Hope this helps.
Does not have added reference of System.Device dll in your project.
Steps to Add Reference.
1. Right click on the Reference folder on your project.
2. Select Add Reference.
3. Expand Assemblies option.
4. Search System.Device in the serach box at right corner side.
5. After searching, click on checkbox to select and click on ok.
If you are using VS.NET:
Right click on the References folder on your project.
Select Add Reference.
Select the .NET tab (or select the Browse button if it is not a .NET Framework assembly).
Double-click the assembly containing the namespace in the error message.
Press the OK button.
If you are using the command line, use the /r: or /reference: option. For Example:
csc.exe /reference:System.Drawing.dll MyFontDisplayApp.cs
When you recompile, this error will no longer appear.
It is also possible that your project uses x64 libraries and your machine has limited x64 libraries. I think this happened in my case.
Possible Solution: I copied library from x86 folder to bin folder of my project. Then added the new reference(discard the old reference to same library). AND IT WORKED.
Note: Please correct me if I am wrong here.

System.Data Doesn't Exist in Visual Studio 2010

I have a red line under System.Data saying that "The type or namespace 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)."
Thought I needed 4.5 .Net Framework, but I have another project that can use the namespace, so it is something with this project that I am using.
I have seen other threads similar to mine, such as this, but it isn't directly related to just system.data. It's trying to add a namespace beyond data, so there system.data namespace isn't the problem. Haven't seen any threads only related to just the system.data namespace. Any help would be appreciated.
did you try to add the assembly reference in your project?
right click on your project > add reference then select assemblies tab and finally System.Data and check it, then press ok.
Have you checked to make sure the reference to the System.Data assembly is in your project?
Have you a reference to syste.data under your references folder in solution explorer window? If not add it
check the project configuration :
->Right click on Project
->Select Properties
->Change "Target Framework" from ".Net Framework 4.0 Client Profile" to ".Net Framework 4.0"
->now run the Project.

Missing fireball.docking dll reference

I had downloaded a C# project from the net.When I opened it in VS2010 and tried to run it it showed Error
"The type or namespace name 'Fireball' could not be found (are you
missing a using directive or an assembly reference?)"
When I checked the References Folder it showed a ! symbol on Fireball.Docking and fireball.Windows.Form
Can Somebody pls help me on how to get those dll files?
You don't have this current DLL included in your project. You could go back to where you downloaded the project and try to find the missing DLL. If you are sure that you have it with the project, go to the reference section where you have the ! and delete it. Then :
Right click References
Click Add Reference...
Browse to your Dll and add it.

Cannot compile solution?

I have business layer in my solution. I added console project to the solution. Added necessary reference to console application. Created instances of classes in business layer. I'm using resharper so code looks correct.
when I try to build I get the error like
Error 127 The type or namespace name 'BusinessLayer' could not be found (are you missing a using directive or an assembly reference?) C:\ConsoleApplication\Program.cs 13 25
if I reference business layer from web project under the same solution it compiles, but with console it's not.
do you have any idea what can be the problem?
Add using BusinessLayer; in the top of your application, if you already did that, then try to clean and rebuild the solution.
Also make sure that both the library and the console application have the same .net framework version, for example both are 4.0 and not one of them 4.0 client profile...
You seem to confuse a library (project) reference and a using statement judging by your comment:
I have the reference at the top of the page.
You need both to add a reference (right-click your project's References folder in Solution Explorer > Add Reference...) and add a using directive at the top of the code file to import the required namespaces.
You'll have to add a reference to that assembly from your console project.
You add references at the project level not the solution level, so the reference you added to your web application doesn't help your console app.
Right click over your solution, configuration manager, you will see all projects, be sure that you have marked all necessary projects to build with right platform.
Hope it helps.
Rebuild the BusinessLayer class library and build your solution again.

Categories