0 votes

Before purchase I wanted to be sure Mail.dll can be successfully used in building Microsoft Store Apps. However trying to build an app package in Visual Studio 2017 with the required .Net Native toolchain results in the error:

MCG0037: MCG0037:InvalidCSharpIdentifierName Struct '    ' in assembly
'Assembly(Name=Mail, Version=3.0.19162.1801, Culture=neutral,
PublicKeyToken=6dc438ab78a525b3)' has a field with name ' ' that is
invalid. This could be because the name is obfuscated or the field is
auto-implemented by the compiler. Please make sure the field name
follows C# identifier conventions.

The only reference in the solution to Mail.dll is a single call in the shared .Net Standard 2.0 project.

by (410 points)

1 Answer

+1 vote
 
Best answer

This is most likely because of obfuscation.

We already send you a link to Mail.dll which was obfuscated with relaxed settings - this should help.

You need to add following dependencies from nuget:

System.Security.Cryptography.Algorithms (>= 4.3.1)
System.Security.Cryptography.Pkcs (>= 4.5.0)
System.Security.Cryptography.X509Certificates (>= 4.3.2)
System.Security.Cryptography.Xml (>= 4.5.0)
System.Text.Encoding.CodePages (>= 4.5.0)
by (297k points)
selected by
Got both the link and a later list of the requisite nuget packages that also had to be added into the shared project to support the less obfuscated mail.dll. Worked fine with the .Net Native toolchain!! Thanks
...