473,396 Members | 1,998 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,396 software developers and data experts.

Name conflicts with multiple .NET versions

I have an assembly "A" which contains a Windows Control and has
been compiled with C# in .NET 1.0, and I have now attempted to use
this from a C++ 2005 Windows Forms Application "B".

I can add a reference to the assembly and add a control to
the form without problems, but when compiling I get a heap
of errors complaining about conflicts between symbols from
differing version of System.Windows.Forms and similar:

c:\winnt\assembly\gac\system.windows.forms\1.0.330 0.0__b77a5c561934e089\
system.windows.forms.dll : warning C4945: 'ResXFileRef' :
cannot import symbol from
'c:\winnt\assembly\gac\system.windows.forms\1.0.33 00.0__b77a5c561934e089\
system.windows.forms.dll': as 'System::Resources::ResXFileRef' has
already been imported from another assembly 'System.Windows.Forms'
c:\winnt\microsoft.net\framework\v2.0.50727\system .windows.forms.dll :
see declaration of 'System::Resources::ResXFileRef'

Technically, I understand that the compiler has a point here,
because A contains an explicit reference to System.Windows.Forms
in .NET 1.0, while B contains an explicit reference to
System.Windows.Forms in .NET 2.0.

However, there is no problem using A in a C# 2005 or VB.NET 2005
Windows Forms applications, and I would expect enough intelligence
in the .NET runtime to resolve this issue anyway. This seems to
be a special problem of the C++ project type or C++ compiler.

It works without problems if I compile A with .NET 2.0.
My reason for compiling A with .NET 1.0 in the first place was to
have a single assembly which works in all development environments
like .NET 1.0, .NET 2.0 or Mono (the assembly is the "product"),
given that I don't need any of the new features and everything
seems to work fine except for this C++ 2005 glitch.

Any ideas?



Nov 9 '06 #1
1 1066
I have an assembly "A" which contains a Windows Control and has
been compiled with C# in .NET 1.0, and I have now attempted to use
this from a C++ 2005 Windows Forms Application "B".
Did noone else encounter this scenario before? Although the problem
is not related to the C++ language itself, it only seems to manifest
itself with C++ projects in Visual Studio 2005.
Nov 15 '06 #2

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

Similar topics

16
by: Robert Mark Bram | last post by:
Hi All! Is there a way to reference a window by name without doing something like this: open (, 'windowName'); The open method will open a blank window if there is no window with such a name....
12
by: christopherlmarshall | last post by:
Suppose you want to write a subclass of some existing class you are importing from a module you didn't write and that you don't want to study the internals of, and you want to define a data member...
39
by: Joe Laughlin | last post by:
If I have a character array with "/some/file/directory/file_name", are there any functions / libraries that I could use to separate the directory ("some/file/directory") from the file name...
5
by: Eric | last post by:
After attempting to build a solution, I receive the error message; "One or more dependent assemblies have version conflicts" "Do you want to fix these conflicts by adding binding redirect records...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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
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
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...
0
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...
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.