473,657 Members | 2,445 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("E xception")”
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 1015

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

Similar topics

2
2192
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 Reference. The Add Reference Dialog only allows me to browse and add a *.dll,*.ocx,*.tlb, *.olb and *.exe. No *.lib! While if it is in the same solution I automatically see the library
3
4396
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++ Class Library output a dll :o( I have created a libray in VC 6.0
10
5076
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 add a reference, I can start using the class in the DLL as follows: Imports <TheNamespace>
0
1469
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 static library in a VS .NET 2003 managed C++ project. Currently, I am just linking the compiled .lib file into my VC 7 project. (This is the simplest approach, as it is not practical to move the static library project to VC 7 at this time.) My VC...
2
1964
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++ library. As the library is utilizing DirectX 9 it bases on COM. This causes me quite some troubles as I get compile errors caused by the include files included through the DirectX 9 header file. The errors occur in unknwn.h, objbase.h and ObjIdl.h. ...
0
6603
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 every the of C++ project I try to build. Not just Class Libraries, but a plain Windows Form Application as well. I've tried creating new projects with nothing but shell built by the Wizard, but I still get the error.
10
2394
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 created a new CLR class library and added my native/unmanaged C++ code then added some code to the unmanaged class. Now, and this is where I am not sure, I turned off the CLR support in
1
1532
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 errors. There is another managed C++ project (UseTestMCpp) which uses the ManagedClass class: it does have included header file with native type definitions but it does not help in case with template parameters. The explicit instantiation of...
0
2266
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 cannot see the object of the dll reference project. My project is a mixed mode project which contains normal C++ MFC classes and a managed C++ class which communicates with external dll objects. From my managed C++ class I am going to add the dll...
0
8395
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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 we have to send another system
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.