473,505 Members | 16,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add reference of C# library in managed VC++ project

1 New Member
Hi,

I have created a solution with two project one is managed VC++ and other is C# project. Now I would like to use C# dll in my VC++ project. I have followed the following steps.

1. Added a C# project reference to VC++ project. It compiles the project successfully, but at runtime is throws error. After debugging we found that when we create an instance of C# library it throws exception as “TestInterface::Common::Logger::LogMessage("Except ion")”
I have set the #using attribute also in project properties dialog.
But this approach does not work for me.

2. Then I have tried another approach, registered the C# library to GAC and added a project reference it worked fine. Here I have removed the #using property also.
But I do not want to register the C# library in GAC, I want this in my application folder.

When both the projects are managed project then why project reference doesn’t worked. Please help to resolve the issue.

Thanks,
Ved
Jul 27 '07 #1
0 996

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2167
by: Lady_A | last post by:
Hi, I need to add a reference to a static library (*.lib) to a COM/ATL project in VS.NET. Apparently if this library is not in my solution that is not possible using the ordinary way : Add...
3
4391
by: tone | last post by:
hi, I want to create a project in VC++ .net that creates a .lib file... No DLL's just a lib that I can use in other projects and link in. I can't see a way under file/new/project Managed C++...
10
5055
by: msnews.microsoft.com | last post by:
Hi, How do I add a reference in VC++.NET? In VB.NET and VC#.NET, there's an option in "Project" menu called "Add Reference". This will add a .NET DLL reference to the current project. After I...
0
1450
by: zhangrusi | last post by:
I have a static library that is compiled using the latest version of VC 6. It uses the multithreaded DLL versions of the run-time library, and it uses STL classes. I would like to make use of this...
2
1952
by: Michael Braitmaier | last post by:
I have a quite severe problem. I am trying to compile a C++ library initially written for VC++ 6. To make the library available for .NET languages I want to compile the library as managed C++...
0
6570
by: Herman Jones | last post by:
I'm getting the following error when I build a Class Library project: Embedding manifest... Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'. It happens with...
10
2367
by: ajtaylor | last post by:
Hello, I have a load of native C++ code that I want to use in a CLR class library. My "logic" being that I create a C++/CLI managed class that acts as an interface to the unmanged code. I...
1
1522
by: pikulsky | last post by:
There is a managed C++ class (ManagedClass) defined in one library (TestMCpp.dll), it has a method (funcTemplate) with template native type (NativeTemplate<int>). This library is built without any...
0
2260
by: arfte | last post by:
Hi, guys If you open http://support.microsoft.com/kb/310674 link, you will see there are several ways that make using references in a Managed C++ application. I tried all of them, but i still...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.