<<<Bug in Developer studio 2003 beta (Everett)>>> 
Author Message
 <<<Bug in Developer studio 2003 beta (Everett)>>>


Quote:
> Hello,

> Repro:

> 1. Create a C# console project.
> 2. Create  managed C++ class library with an unmanaged class called say
> Style.
> 3. Reference the managed c++ class library from the C# project.
> 4. Create a new namespace say Test and place a new C# class called Style
in
> it.
> 5. In the main class for the C# app create a member "Style style = null;"
> making sure your using the Test namespace.

> Result:

> c:\projects\bug\class1.cs(22,17): error CS0037: Cannot convert null to
> 'Style' because it is a value type

> I think this is a bug. For some wierd reason Devenv is picking up the
> unmanaged Style class in the managed C++ class library. It didn't do this
in
> version 7.0 (2002). I would have expected the unmanaged class to be
internal
> to the c++ class library. Anyway fnd a small example attached. Note once
you
> have downloaded it you will have to remove the .keepme extension and unzip
> it.

> Thoughts???

We are not able to reproduce your problem because you have forgotten to
attach your
CPPDLL project inside the zip file.

We tried adding our own CPP DLL with a class Style & your problem doesn't
reproduce.

The only way I can reproduce your problem is if I don't use the Test
Namespace & use the
CPPDLL namespace.

However you can trying qualifying your class name
Test.Style style = null;

That should fix the problem.

--
Shiva J & Chris Koz
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 05 Jun 2005 02:31:01 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>


Quote:
> > We are not able to reproduce your problem because you have forgotten to
> > attach your
> > CPPDLL project inside the zip file.
> Sorry about that, please find the correct version attached.

> > However you can trying qualifying your class name
> > Test.Style style = null;
> I don't see how that would be useful other than getting around this
problem.
> Surely an unmanaged class should not be made visible to referencing
> assemblies. I would have thought this would have at least been treated as
> "internal".

This is known issue with 7.1.
However you can use the workaround - qualifying the class as Test.Style.

Quote:
> I don't have this problem with version 7. Look at my example
> just in case we are talking at cross purposes.

--
Shiva J

Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:

> Lee.





> > > Hello,

> > > Repro:

> > > 1. Create a C# console project.
> > > 2. Create  managed C++ class library with an unmanaged class called
say
> > > Style.
> > > 3. Reference the managed c++ class library from the C# project.
> > > 4. Create a new namespace say Test and place a new C# class called
Style
> > in
> > > it.
> > > 5. In the main class for the C# app create a member "Style style =
> null;"
> > > making sure your using the Test namespace.

> > > Result:

> > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot convert null to
> > > 'Style' because it is a value type

> > > I think this is a bug. For some wierd reason Devenv is picking up the
> > > unmanaged Style class in the managed C++ class library. It didn't do
> this
> > in
> > > version 7.0 (2002). I would have expected the unmanaged class to be
> > internal
> > > to the c++ class library. Anyway fnd a small example attached. Note
once
> > you
> > > have downloaded it you will have to remove the .keepme extension and
> unzip
> > > it.

> > > Thoughts???

> > We are not able to reproduce your problem because you have forgotten to
> > attach your
> > CPPDLL project inside the zip file.

> > We tried adding our own CPP DLL with a class Style & your problem
doesn't
> > reproduce.

> > The only way I can reproduce your problem is if I don't use the Test
> > Namespace & use the
> > CPPDLL namespace.

> > However you can trying qualifying your class name
> > Test.Style style = null;

> > That should fix the problem.

> > --
> > Shiva J & Chris Koz
> > Visual C++ Team
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.



Tue, 07 Jun 2005 02:15:43 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>
Quote:
> However you can use the workaround - qualifying the class as Test.Style.

OK, I think I'll wait for the proper fix in the release. I dont fancy
running around changing loads of references to blah.blah.blah.Style.

Thanks for the feedback.#



Quote:



> > > We are not able to reproduce your problem because you have forgotten
to
> > > attach your
> > > CPPDLL project inside the zip file.
> > Sorry about that, please find the correct version attached.

> > > However you can trying qualifying your class name
> > > Test.Style style = null;
> > I don't see how that would be useful other than getting around this
> problem.
> > Surely an unmanaged class should not be made visible to referencing
> > assemblies. I would have thought this would have at least been treated
as
> > "internal".

> This is known issue with 7.1.
> However you can use the workaround - qualifying the class as Test.Style.

> > I don't have this problem with version 7. Look at my example
> > just in case we are talking at cross purposes.

> --
> Shiva J

> Visual C++ Team
> This posting is provided "AS IS" with no warranties, and confers no
rights.

> > Lee.





> > > > Hello,

> > > > Repro:

> > > > 1. Create a C# console project.
> > > > 2. Create  managed C++ class library with an unmanaged class called
> say
> > > > Style.
> > > > 3. Reference the managed c++ class library from the C# project.
> > > > 4. Create a new namespace say Test and place a new C# class called
> Style
> > > in
> > > > it.
> > > > 5. In the main class for the C# app create a member "Style style =
> > null;"
> > > > making sure your using the Test namespace.

> > > > Result:

> > > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot convert null
to
> > > > 'Style' because it is a value type

> > > > I think this is a bug. For some wierd reason Devenv is picking up
the
> > > > unmanaged Style class in the managed C++ class library. It didn't do
> > this
> > > in
> > > > version 7.0 (2002). I would have expected the unmanaged class to be
> > > internal
> > > > to the c++ class library. Anyway fnd a small example attached. Note
> once
> > > you
> > > > have downloaded it you will have to remove the .keepme extension and
> > unzip
> > > > it.

> > > > Thoughts???

> > > We are not able to reproduce your problem because you have forgotten
to
> > > attach your
> > > CPPDLL project inside the zip file.

> > > We tried adding our own CPP DLL with a class Style & your problem
> doesn't
> > > reproduce.

> > > The only way I can reproduce your problem is if I don't use the Test
> > > Namespace & use the
> > > CPPDLL namespace.

> > > However you can trying qualifying your class name
> > > Test.Style style = null;

> > > That should fix the problem.

> > > --
> > > Shiva J & Chris Koz
> > > Visual C++ Team
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.



Tue, 07 Jun 2005 17:05:42 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>


Quote:
> > However you can use the workaround - qualifying the class as Test.Style.
> OK, I think I'll wait for the proper fix in the release. I dont fancy
> running around changing loads of references to blah.blah.blah.Style.

I don't think this will be fixed in the 7.1 release.
Will probably be fixed only in the major release after that.

--
Shiva J
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:

> Thanks for the feedback.#





> > > > We are not able to reproduce your problem because you have forgotten
> to
> > > > attach your
> > > > CPPDLL project inside the zip file.
> > > Sorry about that, please find the correct version attached.

> > > > However you can trying qualifying your class name
> > > > Test.Style style = null;
> > > I don't see how that would be useful other than getting around this
> > problem.
> > > Surely an unmanaged class should not be made visible to referencing
> > > assemblies. I would have thought this would have at least been treated
> as
> > > "internal".

> > This is known issue with 7.1.
> > However you can use the workaround - qualifying the class as Test.Style.

> > > I don't have this problem with version 7. Look at my example
> > > just in case we are talking at cross purposes.

> > --
> > Shiva J

> > Visual C++ Team
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.

> > > Lee.





> > > > > Hello,

> > > > > Repro:

> > > > > 1. Create a C# console project.
> > > > > 2. Create  managed C++ class library with an unmanaged class
called
> > say
> > > > > Style.
> > > > > 3. Reference the managed c++ class library from the C# project.
> > > > > 4. Create a new namespace say Test and place a new C# class called
> > Style
> > > > in
> > > > > it.
> > > > > 5. In the main class for the C# app create a member "Style style =
> > > null;"
> > > > > making sure your using the Test namespace.

> > > > > Result:

> > > > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot convert
null
> to
> > > > > 'Style' because it is a value type

> > > > > I think this is a bug. For some wierd reason Devenv is picking up
> the
> > > > > unmanaged Style class in the managed C++ class library. It didn't
do
> > > this
> > > > in
> > > > > version 7.0 (2002). I would have expected the unmanaged class to
be
> > > > internal
> > > > > to the c++ class library. Anyway fnd a small example attached.
Note
> > once
> > > > you
> > > > > have downloaded it you will have to remove the .keepme extension
and
> > > unzip
> > > > > it.

> > > > > Thoughts???

> > > > We are not able to reproduce your problem because you have forgotten
> to
> > > > attach your
> > > > CPPDLL project inside the zip file.

> > > > We tried adding our own CPP DLL with a class Style & your problem
> > doesn't
> > > > reproduce.

> > > > The only way I can reproduce your problem is if I don't use the Test
> > > > Namespace & use the
> > > > CPPDLL namespace.

> > > > However you can trying qualifying your class name
> > > > Test.Style style = null;

> > > > That should fix the problem.

> > > > --
> > > > Shiva J & Chris Koz
> > > > Visual C++ Team
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.



Wed, 08 Jun 2005 02:09:24 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>
Quote:
> I don't think this will be fixed in the 7.1 release.
> Will probably be fixed only in the major release after that.

OK :-(



Quote:



> > > However you can use the workaround - qualifying the class as
Test.Style.
> > OK, I think I'll wait for the proper fix in the release. I dont fancy
> > running around changing loads of references to blah.blah.blah.Style.

> I don't think this will be fixed in the 7.1 release.
> Will probably be fixed only in the major release after that.

> --
> Shiva J
> Visual C++ Team
> This posting is provided "AS IS" with no warranties, and confers no
rights.

> > Thanks for the feedback.#





> > > > > We are not able to reproduce your problem because you have
forgotten
> > to
> > > > > attach your
> > > > > CPPDLL project inside the zip file.
> > > > Sorry about that, please find the correct version attached.

> > > > > However you can trying qualifying your class name
> > > > > Test.Style style = null;
> > > > I don't see how that would be useful other than getting around this
> > > problem.
> > > > Surely an unmanaged class should not be made visible to referencing
> > > > assemblies. I would have thought this would have at least been
treated
> > as
> > > > "internal".

> > > This is known issue with 7.1.
> > > However you can use the workaround - qualifying the class as
Test.Style.

> > > > I don't have this problem with version 7. Look at my example
> > > > just in case we are talking at cross purposes.

> > > --
> > > Shiva J

> > > Visual C++ Team
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.

> > > > Lee.





> > > > > > Hello,

> > > > > > Repro:

> > > > > > 1. Create a C# console project.
> > > > > > 2. Create  managed C++ class library with an unmanaged class
> called
> > > say
> > > > > > Style.
> > > > > > 3. Reference the managed c++ class library from the C# project.
> > > > > > 4. Create a new namespace say Test and place a new C# class
called
> > > Style
> > > > > in
> > > > > > it.
> > > > > > 5. In the main class for the C# app create a member "Style style
=
> > > > null;"
> > > > > > making sure your using the Test namespace.

> > > > > > Result:

> > > > > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot convert
> null
> > to
> > > > > > 'Style' because it is a value type

> > > > > > I think this is a bug. For some wierd reason Devenv is picking
up
> > the
> > > > > > unmanaged Style class in the managed C++ class library. It
didn't
> do
> > > > this
> > > > > in
> > > > > > version 7.0 (2002). I would have expected the unmanaged class to
> be
> > > > > internal
> > > > > > to the c++ class library. Anyway fnd a small example attached.
> Note
> > > once
> > > > > you
> > > > > > have downloaded it you will have to remove the .keepme extension
> and
> > > > unzip
> > > > > > it.

> > > > > > Thoughts???

> > > > > We are not able to reproduce your problem because you have
forgotten
> > to
> > > > > attach your
> > > > > CPPDLL project inside the zip file.

> > > > > We tried adding our own CPP DLL with a class Style & your problem
> > > doesn't
> > > > > reproduce.

> > > > > The only way I can reproduce your problem is if I don't use the
Test
> > > > > Namespace & use the
> > > > > CPPDLL namespace.

> > > > > However you can trying qualifying your class name
> > > > > Test.Style style = null;

> > > > > That should fix the problem.

> > > > > --
> > > > > Shiva J & Chris Koz
> > > > > Visual C++ Team
> > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.



Wed, 08 Jun 2005 17:17:58 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>
It isn't a bug per se. It is a by design change from 7.0 to 7.1.

We made the change because the 7.0 behavior causes bogus code/metadata to be
generated in a case like the following:

#using <mscorlib.dll>
#include <windows.h>

public __gc class Foo
{
public:
  HANDLE DoSomething (HWND hwnd);

Quote:
};

Or any other use of unmanaged types in public signatures of managed types.

For the 8.0 release we are working on a method to give you explicit control
since neither the 7.0 and 7.1 behavior are sufficient.

Ronald Laeremans
Visual C++ team


Quote:
> > I don't think this will be fixed in the 7.1 release.
> > Will probably be fixed only in the major release after that.
> OK :-(





> > > > However you can use the workaround - qualifying the class as
> Test.Style.
> > > OK, I think I'll wait for the proper fix in the release. I dont fancy
> > > running around changing loads of references to blah.blah.blah.Style.

> > I don't think this will be fixed in the 7.1 release.
> > Will probably be fixed only in the major release after that.

> > --
> > Shiva J
> > Visual C++ Team
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.

> > > Thanks for the feedback.#





> > > > > > We are not able to reproduce your problem because you have
> forgotten
> > > to
> > > > > > attach your
> > > > > > CPPDLL project inside the zip file.
> > > > > Sorry about that, please find the correct version attached.

> > > > > > However you can trying qualifying your class name
> > > > > > Test.Style style = null;
> > > > > I don't see how that would be useful other than getting around
this
> > > > problem.
> > > > > Surely an unmanaged class should not be made visible to
referencing
> > > > > assemblies. I would have thought this would have at least been
> treated
> > > as
> > > > > "internal".

> > > > This is known issue with 7.1.
> > > > However you can use the workaround - qualifying the class as
> Test.Style.

> > > > > I don't have this problem with version 7. Look at my example
> > > > > just in case we are talking at cross purposes.

> > > > --
> > > > Shiva J

> > > > Visual C++ Team
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.

> > > > > Lee.





> > > > > > > Hello,

> > > > > > > Repro:

> > > > > > > 1. Create a C# console project.
> > > > > > > 2. Create  managed C++ class library with an unmanaged class
> > called
> > > > say
> > > > > > > Style.
> > > > > > > 3. Reference the managed c++ class library from the C#
project.
> > > > > > > 4. Create a new namespace say Test and place a new C# class
> called
> > > > Style
> > > > > > in
> > > > > > > it.
> > > > > > > 5. In the main class for the C# app create a member "Style
style
> =
> > > > > null;"
> > > > > > > making sure your using the Test namespace.

> > > > > > > Result:

> > > > > > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot convert
> > null
> > > to
> > > > > > > 'Style' because it is a value type

> > > > > > > I think this is a bug. For some wierd reason Devenv is picking
> up
> > > the
> > > > > > > unmanaged Style class in the managed C++ class library. It
> didn't
> > do
> > > > > this
> > > > > > in
> > > > > > > version 7.0 (2002). I would have expected the unmanaged class
to
> > be
> > > > > > internal
> > > > > > > to the c++ class library. Anyway fnd a small example attached.
> > Note
> > > > once
> > > > > > you
> > > > > > > have downloaded it you will have to remove the .keepme
extension
> > and
> > > > > unzip
> > > > > > > it.

> > > > > > > Thoughts???

> > > > > > We are not able to reproduce your problem because you have
> forgotten
> > > to
> > > > > > attach your
> > > > > > CPPDLL project inside the zip file.

> > > > > > We tried adding our own CPP DLL with a class Style & your
problem
> > > > doesn't
> > > > > > reproduce.

> > > > > > The only way I can reproduce your problem is if I don't use the
> Test
> > > > > > Namespace & use the
> > > > > > CPPDLL namespace.

> > > > > > However you can trying qualifying your class name
> > > > > > Test.Style style = null;

> > > > > > That should fix the problem.

> > > > > > --
> > > > > > Shiva J & Chris Koz
> > > > > > Visual C++ Team
> > > > > > This posting is provided "AS IS" with no warranties, and confers
> no
> > > > > rights.



Sat, 11 Jun 2005 17:47:03 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>
Ronald,

Thanks for the clarification, I don't see why though if an unmanaged type is
not used in a managed type in terms of it's public, protected interface that
it can't just be kept private to it's assembly. Anyway thanks for the
clarification, i'll just have to run around putting a namespace around the
unmanaged classes.

Happy new year...



Quote:
> It isn't a bug per se. It is a by design change from 7.0 to 7.1.

> We made the change because the 7.0 behavior causes bogus code/metadata to
be
> generated in a case like the following:

> #using <mscorlib.dll>
> #include <windows.h>

> public __gc class Foo
> {
> public:
>   HANDLE DoSomething (HWND hwnd);
> };

> Or any other use of unmanaged types in public signatures of managed types.

> For the 8.0 release we are working on a method to give you explicit
control
> since neither the 7.0 and 7.1 behavior are sufficient.

> Ronald Laeremans
> Visual C++ team



> > > I don't think this will be fixed in the 7.1 release.
> > > Will probably be fixed only in the major release after that.
> > OK :-(





> > > > > However you can use the workaround - qualifying the class as
> > Test.Style.
> > > > OK, I think I'll wait for the proper fix in the release. I dont
fancy
> > > > running around changing loads of references to blah.blah.blah.Style.

> > > I don't think this will be fixed in the 7.1 release.
> > > Will probably be fixed only in the major release after that.

> > > --
> > > Shiva J
> > > Visual C++ Team
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.

> > > > Thanks for the feedback.#





> > > > > > > We are not able to reproduce your problem because you have
> > forgotten
> > > > to
> > > > > > > attach your
> > > > > > > CPPDLL project inside the zip file.
> > > > > > Sorry about that, please find the correct version attached.

> > > > > > > However you can trying qualifying your class name
> > > > > > > Test.Style style = null;
> > > > > > I don't see how that would be useful other than getting around
> this
> > > > > problem.
> > > > > > Surely an unmanaged class should not be made visible to
> referencing
> > > > > > assemblies. I would have thought this would have at least been
> > treated
> > > > as
> > > > > > "internal".

> > > > > This is known issue with 7.1.
> > > > > However you can use the workaround - qualifying the class as
> > Test.Style.

> > > > > > I don't have this problem with version 7. Look at my example
> > > > > > just in case we are talking at cross purposes.

> > > > > --
> > > > > Shiva J

> > > > > Visual C++ Team
> > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.

> > > > > > Lee.




message

> > > > > > > > Hello,

> > > > > > > > Repro:

> > > > > > > > 1. Create a C# console project.
> > > > > > > > 2. Create  managed C++ class library with an unmanaged class
> > > called
> > > > > say
> > > > > > > > Style.
> > > > > > > > 3. Reference the managed c++ class library from the C#
> project.
> > > > > > > > 4. Create a new namespace say Test and place a new C# class
> > called
> > > > > Style
> > > > > > > in
> > > > > > > > it.
> > > > > > > > 5. In the main class for the C# app create a member "Style
> style
> > =
> > > > > > null;"
> > > > > > > > making sure your using the Test namespace.

> > > > > > > > Result:

> > > > > > > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot
convert
> > > null
> > > > to
> > > > > > > > 'Style' because it is a value type

> > > > > > > > I think this is a bug. For some wierd reason Devenv is
picking
> > up
> > > > the
> > > > > > > > unmanaged Style class in the managed C++ class library. It
> > didn't
> > > do
> > > > > > this
> > > > > > > in
> > > > > > > > version 7.0 (2002). I would have expected the unmanaged
class
> to
> > > be
> > > > > > > internal
> > > > > > > > to the c++ class library. Anyway fnd a small example
attached.
> > > Note
> > > > > once
> > > > > > > you
> > > > > > > > have downloaded it you will have to remove the .keepme
> extension
> > > and
> > > > > > unzip
> > > > > > > > it.

> > > > > > > > Thoughts???

> > > > > > > We are not able to reproduce your problem because you have
> > forgotten
> > > > to
> > > > > > > attach your
> > > > > > > CPPDLL project inside the zip file.

> > > > > > > We tried adding our own CPP DLL with a class Style & your
> problem
> > > > > doesn't
> > > > > > > reproduce.

> > > > > > > The only way I can reproduce your problem is if I don't use
the
> > Test
> > > > > > > Namespace & use the
> > > > > > > CPPDLL namespace.

> > > > > > > However you can trying qualifying your class name
> > > > > > > Test.Style style = null;

> > > > > > > That should fix the problem.

> > > > > > > --
> > > > > > > Shiva J & Chris Koz
> > > > > > > Visual C++ Team
> > > > > > > This posting is provided "AS IS" with no warranties, and
confers
> > no
> > > > > > rights.



Fri, 17 Jun 2005 17:34:21 GMT  
 <<<Bug in Developer studio 2003 beta (Everett)>>>
Due to the C++ separate compilation model, we don't know whether it will be
referenced until link time. Which in the current implementation model is too
late to still make the decision.

Wishing you a great 2003!

Ronald


Quote:
> Ronald,

> Thanks for the clarification, I don't see why though if an unmanaged type
is
> not used in a managed type in terms of it's public, protected interface
that
> it can't just be kept private to it's assembly. Anyway thanks for the
> clarification, i'll just have to run around putting a namespace around the
> unmanaged classes.

> Happy new year...



> > It isn't a bug per se. It is a by design change from 7.0 to 7.1.

> > We made the change because the 7.0 behavior causes bogus code/metadata
to
> be
> > generated in a case like the following:

> > #using <mscorlib.dll>
> > #include <windows.h>

> > public __gc class Foo
> > {
> > public:
> >   HANDLE DoSomething (HWND hwnd);
> > };

> > Or any other use of unmanaged types in public signatures of managed
types.

> > For the 8.0 release we are working on a method to give you explicit
> control
> > since neither the 7.0 and 7.1 behavior are sufficient.

> > Ronald Laeremans
> > Visual C++ team



> > > > I don't think this will be fixed in the 7.1 release.
> > > > Will probably be fixed only in the major release after that.
> > > OK :-(





> > > > > > However you can use the workaround - qualifying the class as
> > > Test.Style.
> > > > > OK, I think I'll wait for the proper fix in the release. I dont
> fancy
> > > > > running around changing loads of references to

blah.blah.blah.Style.

- Show quoted text -

Quote:

> > > > I don't think this will be fixed in the 7.1 release.
> > > > Will probably be fixed only in the major release after that.

> > > > --
> > > > Shiva J
> > > > Visual C++ Team
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.

> > > > > Thanks for the feedback.#





> > > > > > > > We are not able to reproduce your problem because you have
> > > forgotten
> > > > > to
> > > > > > > > attach your
> > > > > > > > CPPDLL project inside the zip file.
> > > > > > > Sorry about that, please find the correct version attached.

> > > > > > > > However you can trying qualifying your class name
> > > > > > > > Test.Style style = null;
> > > > > > > I don't see how that would be useful other than getting around
> > this
> > > > > > problem.
> > > > > > > Surely an unmanaged class should not be made visible to
> > referencing
> > > > > > > assemblies. I would have thought this would have at least been
> > > treated
> > > > > as
> > > > > > > "internal".

> > > > > > This is known issue with 7.1.
> > > > > > However you can use the workaround - qualifying the class as
> > > Test.Style.

> > > > > > > I don't have this problem with version 7. Look at my example
> > > > > > > just in case we are talking at cross purposes.

> > > > > > --
> > > > > > Shiva J

> > > > > > Visual C++ Team
> > > > > > This posting is provided "AS IS" with no warranties, and confers
> no
> > > > > rights.

> > > > > > > Lee.




> message

> > > > > > > > > Hello,

> > > > > > > > > Repro:

> > > > > > > > > 1. Create a C# console project.
> > > > > > > > > 2. Create  managed C++ class library with an unmanaged
class
> > > > called
> > > > > > say
> > > > > > > > > Style.
> > > > > > > > > 3. Reference the managed c++ class library from the C#
> > project.
> > > > > > > > > 4. Create a new namespace say Test and place a new C#
class
> > > called
> > > > > > Style
> > > > > > > > in
> > > > > > > > > it.
> > > > > > > > > 5. In the main class for the C# app create a member "Style
> > style
> > > =
> > > > > > > null;"
> > > > > > > > > making sure your using the Test namespace.

> > > > > > > > > Result:

> > > > > > > > > c:\projects\bug\class1.cs(22,17): error CS0037: Cannot
> convert
> > > > null
> > > > > to
> > > > > > > > > 'Style' because it is a value type

> > > > > > > > > I think this is a bug. For some wierd reason Devenv is
> picking
> > > up
> > > > > the
> > > > > > > > > unmanaged Style class in the managed C++ class library. It
> > > didn't
> > > > do
> > > > > > > this
> > > > > > > > in
> > > > > > > > > version 7.0 (2002). I would have expected the unmanaged
> class
> > to
> > > > be
> > > > > > > > internal
> > > > > > > > > to the c++ class library. Anyway fnd a small example
> attached.
> > > > Note
> > > > > > once
> > > > > > > > you
> > > > > > > > > have downloaded it you will have to remove the .keepme
> > extension
> > > > and
> > > > > > > unzip
> > > > > > > > > it.

> > > > > > > > > Thoughts???

> > > > > > > > We are not able to reproduce your problem because you have
> > > forgotten
> > > > > to
> > > > > > > > attach your
> > > > > > > > CPPDLL project inside the zip file.

> > > > > > > > We tried adding our own CPP DLL with a class Style & your
> > problem
> > > > > > doesn't
> > > > > > > > reproduce.

> > > > > > > > The only way I can reproduce your problem is if I don't use
> the
> > > Test
> > > > > > > > Namespace & use the
> > > > > > > > CPPDLL namespace.

> > > > > > > > However you can trying qualifying your class name
> > > > > > > > Test.Style style = null;

> > > > > > > > That should fix the problem.

> > > > > > > > --
> > > > > > > > Shiva J & Chris Koz
> > > > > > > > Visual C++ Team
> > > > > > > > This posting is provided "AS IS" with no warranties, and
> confers
> > > no
> > > > > > > rights.



Sun, 19 Jun 2005 00:15:02 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. <<<<<<<Parsing help, please>>>>>>>>

2. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

3. <<<>>>Need C code advice with functions and sorting.<<<>>>

4. <><><>HELP<><><> PCMCIA Motorola Montana 33.6

5. >>>Windows Service<<<

6. proposal: <basic.h>, <pascal.h>, <fortran.h>, <cobol.h>

7. <<<< C Grammar for yacc needed >>>>

8. - - - = = =<><> W e b - U S A <><>= = = - - -

9. >>>> * Get keypress * <<<<

10. <Ctrl>+<Key>

11. <<testing>>

12. >>I need help!<<(duh)

 

 
Powered by phpBB® Forum Software