If the program works, maybe you can ignore this issue.
To solve it, try adding ref:
public ref class Dummy
{
. . .
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In C++ we have a nested class, where we have an outer class and the inner enum class as Public (like below code snippet)
Using PlatformToolSet as V100(VS2010) we have generated C++ Dll and adding it as a reference in C# library. From the C# project using this reference, inner enum class values are visible in the object browser.
When we build the same code with PlatformToolSet as V143(VS2022) and use this C++/CLI dll as a reference in C# project, the inner enum class values are not visible in the object browser.
Added the snippet from C++/CLI class library where the DummyInner enum is visible but the values inside the DummyInner is not visible in the C#.
Code Snippet :
public class Dummy
{
public:
enum class DummyInner
{
None = 0,
EnumA,
EnumB,
EnumC,
EnumD,
EnumE
};
};
This issue happens only with VS2022 with V143 PlatformToolSet and the same code is working fine with the Vs2010 (V100) PlatformToolSet.
Please provide your suggestions.
If the program works, maybe you can ignore this issue.
To solve it, try adding ref:
public ref class Dummy
{
. . .
}