문제

When I obfuscate my assebly (DLL with custom control) written in C#. It works in both C# and VB.NET apps.

When I use the DLL from C++/CLI app, however, errors like this appear during build:

error C2365: 'ComponentOwl::BetterSplitButton::BetterSplitButton::e' : redefinition; previous definition was 'property'

The "e" refers to either internal enum member, private property name etc.

Is it possible to instruct Babel obfuscator to not generate duplicate names (I have not found such switch). Or is it avoidable from code?

도움이 되었습니까?

해결책

Babel.NET Support reproduced the problem and suggested to add command-line parameter:

--namelength 4

So the name conflict will be less probable.

They tested the non-working solution and found that obfuscated assembly has no metadata errors, but the C++/CLI compiler still complains there are two or more different symbols with the same name in a given type.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top