Describe the bug
Once the reference is created the aaspe generates an empty dataSpecificationContent XML element . This cause an error while opening a AASX as:
Expected an XML element within the element dataSpecificationContent representing the property DataSpecificationContent of an instance of class EmbeddedDataSpecification, but encountered a self-closing element {elementName} at: submodels/*[0]/submodelElements/*[0]/embeddedDataSpecifications/*[0]
The aasx XML:
<embeddedDataSpecifications>
<embeddedDataSpecification>
<dataSpecification>
<type>ModelReference</type>
<keys>
<key>
<type>Submodel</type>
<value>submodel01</value>
</key>
<key>
<type>Referable</type>
<value>idShort</value>
</key>
</keys>
</dataSpecification>
HERE: <dataSpecificationContent />
</embeddedDataSpecification>
</embeddedDataSpecifications>
To Reproduce
Create a reference to Submodel and idShort.
Expected behavior
The action will not produce empty dataSpecificationContent element.
Screenshots
AASX structure:

Additional context
The workaround is to Fix AASX in aaspe before exiting. It's annoying, because once you forget it, you need to investigate a bit what needs to be fixed in XML.
Describe the bug
Once the reference is created the aaspe generates an empty dataSpecificationContent XML element . This cause an error while opening a AASX as:
Expected an XML element within the element dataSpecificationContent representing the property DataSpecificationContent of an instance of class EmbeddedDataSpecification, but encountered a self-closing element {elementName} at: submodels/*[0]/submodelElements/*[0]/embeddedDataSpecifications/*[0]The aasx XML:
To Reproduce
Create a reference to Submodel and idShort.
Expected behavior
The action will not produce empty dataSpecificationContent element.
Screenshots

AASX structure:
Additional context
The workaround is to Fix AASX in aaspe before exiting. It's annoying, because once you forget it, you need to investigate a bit what needs to be fixed in XML.