Bug / missing: obfuscation

The [assembly: obfuscation] does not react to the parameter PublicMembers := true.

And in the documentation is stated:

This metadata is stored in the .fx file, so that the binary files (such as .dlls, .jars, or .a files) that will eventually be distributed to your end-users only contain the obfuscated names. When targeting .NET or Java (which does not emit .fx files by default), you will want to enable the Create .fx File option in project settings, to enable this.

I can not find this setting anywhere.

Thanks, logged as bugs://80597

Obfuscate:
you want PublicTypes, not PublicMembers. (Docs have just been updated to reflect this)

VS or Water?

Water has it here:

Seems VS doesn’t show it, i’ll log. For now: add <CreateFXFile>True</CreateFXFile> to the project file.

Where do I add it in the project file?

Works :smile:

in the top property group.

I do not get an .fx after compile file in Visual Studio

My project file:
buildITDb.elements (4.4 KB)

@ck: I see the problem; it is created in the Obj folder, but not copied to the bin folder.

@ck:
I copied the .fx file to the bin folder, but with a project reference only the obfuscated members are visible.
I tried to reference the .fx file instead, but that is not accepted by Visual Studio.

@ck: This problem is unrelated.
I have the same problem again; I did now recompile without obfuscation, and the dependent project doesn’t see the namespaces (see my mail to you and Marc).

This one started as soon as I compile the dll with obfuscated public types. The exe did not see the namespaces anymore (as was expected). Copying the fx file to the bin folder did not help. And it does still not see the namespaces after I recompiled the dll without obfuscation.

Removed the reference, compiled (errors of cause), made a project reference again, an now it works again.

Summary of the problems left:

  1. Fx file is not copied to the bin (map file is also not copied)
  2. If I use a project reference, the fx file is not used
  3. If I try to reference the fx file itself, I get:
    image

Thanks, logged as bugs://80600

3 isn’t really a bug per se (the error should just be better); you should reference the dll on .NET.

1 question though; you explicitly mention fx files used not working for project references; does that mean it works if it’s a regular reference?

I didn’t try that …

But no, referencing the dll (copied the fx file to the bin first) does also not work.

bugs://80600 got closed with status fixed.

Both should be fixed.

bugs://80597 got closed with status fixed.

1 Like

Fix confirmed; fx file is copied and is used for references.

1 Like

Just found another bug: Go to reference does not work when the reference is obfuscated (but mapped by the fx file).
In the output window is logged: Could not find external type

Thanks, logged as bugs://80643