Create a new project pointing to .NET3.5.
Add an entity model from database that has functions that returns complex type.
On Finish we see asserts looking like following:
```
---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
didn't find XmlSchemaElement for qname urn:schemas-microsoft-com:windows:storage:mapping:CS:ComplexTypeMapping in type urn:schemas-microsoft-com:windows:storage:mapping:CS:TFunctionImportMappingResultMapping
at Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.GetTypeNameForNode(AttributePath attributePath)
at Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(String proposedString, AttributePath attributePath)
at Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(String proposedString, EFAttribute attribute)
at Microsoft.Data.Entity.Design.Model.DefaultableValue`1.set_Value(T value)
at Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(CommandProcessorContext cpc)
at Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(CommandProcessor processor)
at Microsoft.Data.Entity.Design.Model.Commands.CommandProc......
<truncated>
---------------------------
Abort Retry Ignore
---------------------------
```
If you ignore this one you see one more:
```
---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
didn't find XmlSchemaType for given attribute path
at Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(String proposedString, AttributePath attributePath)
at Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(String proposedString, EFAttribute attribute)
at Microsoft.Data.Entity.Design.Model.DefaultableValue`1.set_Value(T value)
at Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(CommandProcessorContext cpc)
at Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(CommandProcessor processor)
at Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke()
at Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.InvokeSingleCommand(CommandProcessorContext cpc, Command cmd)
at Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportTypeMappingCommand.InvokeInternal(CommandProcessorContext cpc)
a......
<truncated>
---------------------------
Abort Retry Ignore
---------------------------
```
Stack trace for first one:
```
> Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.GetTypeNameForNode(Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.AttributePath attributePath) Line 198 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(string proposedString, Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.AttributePath attributePath) Line 66 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(string proposedString, Microsoft.Data.Entity.Design.Model.EFAttribute attribute) Line 86 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.DefaultableValue<string>.Value.set(string value) Line 204 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 85 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.InvokeSingleCommand(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc, Microsoft.Data.Entity.Design.Model.Commands.Command cmd) Line 386 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportTypeMappingCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 204 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateMatchingFunctionImportCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 282 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard.RunFinished() Line 465 C#
```
Stack Trace for second one:
```
> Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(string proposedString, Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.AttributePath attributePath) Line 69 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(string proposedString, Microsoft.Data.Entity.Design.Model.EFAttribute attribute) Line 86 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.DefaultableValue<string>.Value.set(string value) Line 204 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 85 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.InvokeSingleCommand(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc, Microsoft.Data.Entity.Design.Model.Commands.Command cmd) Line 386 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportTypeMappingCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 204 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateMatchingFunctionImportCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 282 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard.RunFinished() Line 465 C#
```
I see these 2 same asserts multiple times then it goes on to create the model. The model has following error. We don't support function imports with complex return types in .NET3.5, so this function import shouldn't be created at all.
```
Error 1 Error 146: Return type is not valid in FunctionImport 'GetStudentGrades'. The FunctionImport must return a collection of scalar values or a collection of entities. c:\users\mugdhak\documents\visual studio 2013\Projects\ConsoleApplication19\ConsoleApplication19\Model1.edmx 1 1 ConsoleApplication19
```
The edmx corresponding to this error is:
```
<FunctionImport Name="GetStudentGrades" ReturnType="Collection(SchoolModel.GetStudentGrades_Result)">
<Parameter Name="StudentID" Mode="In" Type="Int32" />
</FunctionImport>
```
Also the line number doesn't correctly point to the line with error. This seems like regression from VS12.
Add an entity model from database that has functions that returns complex type.
On Finish we see asserts looking like following:
```
---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
didn't find XmlSchemaElement for qname urn:schemas-microsoft-com:windows:storage:mapping:CS:ComplexTypeMapping in type urn:schemas-microsoft-com:windows:storage:mapping:CS:TFunctionImportMappingResultMapping
at Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.GetTypeNameForNode(AttributePath attributePath)
at Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(String proposedString, AttributePath attributePath)
at Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(String proposedString, EFAttribute attribute)
at Microsoft.Data.Entity.Design.Model.DefaultableValue`1.set_Value(T value)
at Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(CommandProcessorContext cpc)
at Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(CommandProcessor processor)
at Microsoft.Data.Entity.Design.Model.Commands.CommandProc......
<truncated>
---------------------------
Abort Retry Ignore
---------------------------
```
If you ignore this one you see one more:
```
---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
didn't find XmlSchemaType for given attribute path
at Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(String proposedString, AttributePath attributePath)
at Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(String proposedString, EFAttribute attribute)
at Microsoft.Data.Entity.Design.Model.DefaultableValue`1.set_Value(T value)
at Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(CommandProcessorContext cpc)
at Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(CommandProcessor processor)
at Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke()
at Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.InvokeSingleCommand(CommandProcessorContext cpc, Command cmd)
at Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportTypeMappingCommand.InvokeInternal(CommandProcessorContext cpc)
a......
<truncated>
---------------------------
Abort Retry Ignore
---------------------------
```
Stack trace for first one:
```
> Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.GetTypeNameForNode(Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.AttributePath attributePath) Line 198 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(string proposedString, Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.AttributePath attributePath) Line 66 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(string proposedString, Microsoft.Data.Entity.Design.Model.EFAttribute attribute) Line 86 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.DefaultableValue<string>.Value.set(string value) Line 204 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 85 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.InvokeSingleCommand(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc, Microsoft.Data.Entity.Design.Model.Commands.Command cmd) Line 386 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportTypeMappingCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 204 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateMatchingFunctionImportCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 282 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard.RunFinished() Line 465 C#
```
Stack Trace for second one:
```
> Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.IsValidStringForSchemaType(string proposedString, Microsoft.Data.Entity.Design.Model.Validation.AttributeContentValidator.AttributePath attributePath) Line 69 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Validation.EscherAttributeContentValidator.IsValidAttributeValue(string proposedString, Microsoft.Data.Entity.Design.Model.EFAttribute attribute) Line 86 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.DefaultableValue<string>.Value.set(string value) Line 204 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportScalarPropertyCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 85 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.InvokeSingleCommand(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc, Microsoft.Data.Entity.Design.Model.Commands.Command cmd) Line 386 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateFunctionImportTypeMappingCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 204 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.Model.dll!Microsoft.Data.Entity.Design.Model.Commands.CreateMatchingFunctionImportCommand.InvokeInternal(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext cpc) Line 282 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.Command.Invoke(Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor processor) Line 165 C#
Microsoft.Data.Tools.Design.XmlCore.dll!Microsoft.Data.Entity.Design.Model.Commands.CommandProcessor.Invoke() Line 255 C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard.RunFinished() Line 465 C#
```
I see these 2 same asserts multiple times then it goes on to create the model. The model has following error. We don't support function imports with complex return types in .NET3.5, so this function import shouldn't be created at all.
```
Error 1 Error 146: Return type is not valid in FunctionImport 'GetStudentGrades'. The FunctionImport must return a collection of scalar values or a collection of entities. c:\users\mugdhak\documents\visual studio 2013\Projects\ConsoleApplication19\ConsoleApplication19\Model1.edmx 1 1 ConsoleApplication19
```
The edmx corresponding to this error is:
```
<FunctionImport Name="GetStudentGrades" ReturnType="Collection(SchoolModel.GetStudentGrades_Result)">
<Parameter Name="StudentID" Mode="In" Type="Int32" />
</FunctionImport>
```
Also the line number doesn't correctly point to the line with error. This seems like regression from VS12.