Merging assembly attributes

iblazhko-twiblazhko-tw Posts: 6
edited July 22, 2016 6:26AM in SmartAssembly
We use EntityFramework6 database-first approach, and have mappings defined in a separate assembly.

I am trying to merge this mappings assembly into main assembly, without obfuscation, here is the section of .saproj:
<Assembly AssemblyName="Product.DataAccess, Culture=neutral, PublicKeyToken=***">
  <Merging Merge="1">
    <Pruning />
    <Obfuscation Obfuscate="0" />
    <ControlFlow Obfuscate="0"/>
    <MemberRefsProxy />
    <ResourcesCompression />
  </Merging>
  <Embedding />
</Assembly>

Obfuscation itself works, but the obfuscated assembly produces error like this in runtime:
An error has occurred: Metadata information for the relationship 'XXX' could not be retrieved.
Same code works fine in an un-obfuscated build, i.e. when EF mappings are in separate assembly.

Looking at the obfuscated assembly, I cannot find EF attributes that are present in the source assembly, like these:
[assembly: EdmSchema]
[assembly: EdmRelationship(...)]

Any ideas how I can force these attributes to be merged into obfuscated assembly?
Sign In or Register to comment.