473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

calling a .NET dll from a .NET dll generates error when compiling


I added a .NET dll as a reference to my new .NET dll. When I went to build,
I received error "Unable to emit assembly: Referenced assembly
'CrystalReport' does not have a strong name". "CrystalReport" is a .NET dll
I built which calls the third-party Crystal dll. I have no problem when I
call the "CrystalReport" dll from my .NET executables.

I never had to call a .NET dll from a .NET dll before. I figured it would a
no-brainer as we're calling managed code from managed code.

Any ideas? Thanks.
--
Richard B
Jan 26 '06 #1
2 1611
Richard B wrote:

I added a .NET dll as a reference to my new .NET dll. When I went to
build, I received error "Unable to emit assembly: Referenced assembly
'CrystalReport' does not have a strong name". "CrystalReport" is a
.NET dll I built which calls the third-party Crystal dll. I have no
problem when I call the "CrystalReport" dll from my .NET executables.

I never had to call a .NET dll from a .NET dll before. I figured it
would a no-brainer as we're calling managed code from managed code.


Sign the crystalreport dll you wrote. You can't call a method in an
unsigned assembly from a signed assembly, as that would make the
signing of the calling assembly void. (calling insecure code can return
data to the signed code, etc. )

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Jan 27 '06 #2
Thanks, I had forgotten about that. By signing the dll, I was able to
compile the code.

Thanks again.
--
Richard B
"Frans Bouma [C# MVP]" wrote:
Richard B wrote:

I added a .NET dll as a reference to my new .NET dll. When I went to
build, I received error "Unable to emit assembly: Referenced assembly
'CrystalReport' does not have a strong name". "CrystalReport" is a
.NET dll I built which calls the third-party Crystal dll. I have no
problem when I call the "CrystalReport" dll from my .NET executables.

I never had to call a .NET dll from a .NET dll before. I figured it
would a no-brainer as we're calling managed code from managed code.


Sign the crystalreport dll you wrote. You can't call a method in an
unsigned assembly from a signed assembly, as that would make the
signing of the calling assembly void. (calling insecure code can return
data to the signed code, etc. )

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Jan 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dw | last post by:
Hello all, I'm having a dickens of a time calling a stored procedure on a connection. Every time I do, it generates an error "Arguments are of the wrong type, are out of acceptable range, or are in...
13
by: RainBow | last post by:
Hi everyone, (Very Sorry, if this is the wrong group in which I am posting this query). Code snippet: //C library typedef int (*PFunc)(int* aArg); void call_c_foo(PFunc aPtrtoFunc) {
9
by: soumen | last post by:
Hi, I'm a newbie compiling the following program on Sun Solaris platform for reading data from a file. The code commented as "/* WORKING */" is working (!). But in the current form of...
6
by: I_have_nothing | last post by:
Hi! I am new in C. I try to use dynamical allocation fuction malloc( ) and realloc( ). I found something strange. After several calling realloc( ), the malloc( ) will give me a Segmentation...
4
by: zlatko | last post by:
Hello. I am new to .net . I have a managed C++ library. It looks like this. // header file namespace cppnetdll { public __gc class Class1 { public: static int foo_int(void);
0
by: Rob | last post by:
Hi Visual Studio.NET 2002 v7.0 Windows XP (all service packs up to date) Working on Clearcase MVFS mapped drive. When compiling my ATL control, I always have to hit Rebuild Solution. If I...
11
by: j23 | last post by:
I have library (static) testlib.cpp: #include <stdarg.h> void xxx(...) { char buf; va_list args; va_start(args, buf); va_end(args); }
11
by: ypjofficial | last post by:
Hello All, So far I have been reading that in case of a polymorphic class ( having at least one virtual function in it), the virtual function call get resolved at run time and during that the...
10
by: SQACPP | last post by:
Hi, I try to figure out how to use Callback procedure in a C++ form project The following code *work* perfectly on a console project #include "Windows.h" BOOL CALLBACK...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.