?
=?ISO-8859-1?Q?Christian_Fr=F6schlin?=
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.3300.0__b77a5c561934e089\
system.windows.forms.dll : warning C4945: 'ResXFileRef' :
cannot import symbol from
'c:\winnt\assembly\gac\system.windows.forms\1.0.3300.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?
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.3300.0__b77a5c561934e089\
system.windows.forms.dll : warning C4945: 'ResXFileRef' :
cannot import symbol from
'c:\winnt\assembly\gac\system.windows.forms\1.0.3300.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?