none
why the *.edmx file is broken into 3 separate files when we compile the project? RRS feed

  • Question

  • When we and a new entity data model into our project a *.edmx file is generated which contains the XML related to the conceptual,  physical data models, XML for the mapping of these two models .

    When we compile the project the *.edmx file is used to generate three other files

    *.csdl, *.ssdl, *.msl (if i am not wrong) 

    each of these files contains a part of the XML found in the *.edmx file.

    My question is 

    1) why the *.edmx file is broken into 3 separate files ?

    runtime could have used the *.edmx file directly to make things work ... ?


    farooq.hnf

    • Moved by KareninstructorMVP Wednesday, July 23, 2014 4:38 PM For better response moved from C# forum
    Wednesday, July 23, 2014 3:50 PM

Answers

  • Hello,

    >>1) why the *.edmx file is broken into 3 separate files ?

    Please check if you set Metadata Artifact Processing to Copy to Output Directory             :

    The selection “Copy to Output Directory” would break edmx file to 3 separate files. If this does not what you want, set it to “Embed in Output Assembly”.

    >> runtime could have used the *.edmx file directly to make things work ... ?

    Yes, you could find the connection string is changed as it references three files by directory path + file name.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 24, 2014 8:04 AM
    Moderator

All replies

  • Wednesday, July 23, 2014 4:31 PM
  • When we and a new entity data model into our project a *.edmx file is generated which contains the XML related to the conceptual,  physical data models, XML for the mapping of these two models .

    When we compile the project the *.edmx file is used to generate three other files

    *.csdl, *.ssdl, *.msl (if i am not wrong) 

    each of these files contains a part of the XML found in the *.edmx file.

    My question is 

    1) why the *.edmx file is broken into 3 separate files ?

    runtime could have used the *.edmx file directly to make things work ... ?


    farooq.hnf

    Thursday, July 24, 2014 3:21 AM
  • thanks darnold 


    farooq.hnf

    Thursday, July 24, 2014 3:21 AM
  • Hello,

    >>1) why the *.edmx file is broken into 3 separate files ?

    Please check if you set Metadata Artifact Processing to Copy to Output Directory             :

    The selection “Copy to Output Directory” would break edmx file to 3 separate files. If this does not what you want, set it to “Embed in Output Assembly”.

    >> runtime could have used the *.edmx file directly to make things work ... ?

    Yes, you could find the connection string is changed as it references three files by directory path + file name.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 24, 2014 8:04 AM
    Moderator