473,403 Members | 2,270 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,403 software developers and data experts.

bc30311 when linking 2 projects to static dll in same solution

Hi all,

I am getting a bc30311 error (Value of type 'x' cannot be converted to
'x'). Note that the source and destination types are the same.

I have run into this issue on 2 separate occasions. On both occasions,
type x was contained in a statically linked dll. The dll was linked in
2 projects in the same solution. One project depended on the other,
but both had to access type x and therefore needed the static dll
reference.

I am using Visual Studio.NET 2003.

The problem occurs only when first attempting to compile the solution
on a new machine. I tried a combination of rebooting, rebuilding, and
pixie dust and eventually got the code to compile, but I don't
understand why the problem is occuring and what a systematic solution
to the problem is.

Any help is appreciated.

Dec 2 '05 #1
2 2446
Getting the exact same problem but with Web References in ASP.NET 2.0.

1. If you have a webreference [WR] containing an exposed class [X]
2. Then create say a wrapper class Y, which exposes class X
3. Then do the following in another place in the project (say a webform
page):

Dim oX as WR.X
Dim oY as New oY

oX = oY.GetX

you get the exact same problem.

I've noticed another old thread on the problem which even had some
replies from MVP's, but didn't really come to a conclusion.

http://groups.google.com/group/micro...15eee69cb05744

This has surely got to be a bug in the IDE, as you can build and run
the projects without problems.

Does anybody know any more on this issue?

Dec 15 '05 #2
Well, I think I have the problem licked. Basically, you are risking
disaster (i.e. this problem) when you have the same static DLL linked
to 2 projects in the same solution.

So, I checked into MS best practices, and one solution they offer is to
place all the external DLLs for a solution on a network drive, so I
created a dll directory (the DLL's are in SourceSafe, but not in the
projects themselves) and mapped a network drive to that directory.

That way, both Project A and Project B are referencing
ProblemCausingDLL.dll in the same directory: Y:\

Problem solved. This one was particularly infuriating because it won't
occur on one machine (the machine where the Solution was put together),
but will appear on another machine where the person has grabbed the
project from source control.

Dec 15 '05 #3

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

Similar topics

4
by: Derrick | last post by:
Long story short: I've been working on a project which includes both designtime and runtime components, for both the PC and Pocket PC. While testing, I've been having problems with Visual Studio...
3
by: styko | last post by:
I've got an executable file which references assembly compiled into separate dll. How to compile this dll into my executable- I simple want to distribute only my executable. Thanks for any...
0
by: Mythran | last post by:
Just wanted to let y'all know something that I dug up...maybe ya already knew. You know you can link files in .Net so you can work on 1 single file and have it compile for each project or...
4
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error...
6
by: Rudy Ray Moore | last post by:
I work with a multi-project workspace. One project (the "startup" project) has a "Configuration Type" of "Application (.exe)". The other 40 projects have a "Configuration Type" of "Static Library...
0
by: Rudy Ray Moore | last post by:
I've been having trouble getting incremental linking to work under Visual C++ .net 2003 7.1 for my multi-project workspace. Ronald Laeremans and Carl Daniel (and a few others) helped me figure it...
1
by: Kay | last post by:
I already specified to ignore specific library: MSVCPRT.lib MSVCRT.lib LIBC.lib MSVCRTD.lib LIBCD.lib command line is like: /INCREMENTAL /NOLOGO /DLL /NODEFAULTLIB:"MSVCPRT.lib MSVCRT.lib LIBC.lib...
9
by: David | last post by:
I am getting the following error during run-time compilation or a rebuild all of my application: error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x' This...
7
by: Hal Vaughan | last post by:
I have a problem with port forwarding and I have been working on it for over 2 weeks with no luck. I have found C programs that almost work and Java programs that almost work, but nothing that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...
0
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,...

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.