locked
BIztalk and SGEN compiling error RRS feed

  • Question

  • Hi All,

     

    I am getting following compiling  error

     

    SGEN : error : Cannot generate serialization assembly  because it already exists. Use /force to force an overwrite of the existing assembly.

     

     

    Then i set Generate Serialization Assembly to false.

    Everything is  working  fine.

     

     

    Any Idea?

    Monday, January 10, 2011 10:53 AM

Answers

  • I had a project recently that would do this. I had to delete the generated .XmlSerializers.dll file every time during the build. I think I eventually added a Delete task in my msbuild file to do this automatically. http://msdn.microsoft.com/en-us/library/7wd15byf.aspx.

    That checkbox would work too. In my case it was a reference to SalesForce from a .NET project that kept generating it. I did not need to regenerate because the schema never changed. In your case, use the checkbox if the schema never changes.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, January 11, 2011 1:32 AM
    Moderator

All replies

  • Hi Poojith

    Use this link to solve your problem

    http://blog.l-mobile.com/article/vs2008-cannot-generate-serialization-assembly

     

    Regards

    Deepak Sanghi


    Deepak Sanghi Happy Biztalking.........
    Monday, January 10, 2011 10:59 AM
  • Hi Poojith,

    The XML Serializer Generator(Sgen ) creates an XML serialization assembly for types in a specified assembly in order to improve the startup performance of a XmlSerializer when it serializes or deserializes objects of the specified types in case you wondering what it is. Your problem can be solved by going to the path C:\WINDOWS\assembly and uninstall the corresponding Project name dll from there. And then rebuild the Project.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     


    BizTalk
    Monday, January 10, 2011 11:45 AM
    Moderator
  • Hi Steef,

     

    The project dlls were not there in GAC. While  i compile it Generates the  Dll in current  working directory instead in Release/Debug folder.

     

    Groet,

    Poojith

    Monday, January 10, 2011 12:46 PM
  • Hi,

    Well in that case you need to check project/solution settings in VS. When you build your project than in Configuration Properties check the Output Path .

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Monday, January 10, 2011 1:24 PM
    Moderator
  • I had a project recently that would do this. I had to delete the generated .XmlSerializers.dll file every time during the build. I think I eventually added a Delete task in my msbuild file to do this automatically. http://msdn.microsoft.com/en-us/library/7wd15byf.aspx.

    That checkbox would work too. In my case it was a reference to SalesForce from a .NET project that kept generating it. I did not need to regenerate because the schema never changed. In your case, use the checkbox if the schema never changes.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, January 11, 2011 1:32 AM
    Moderator