Quantcast
Channel: BizTalk 2010 – SANDRO PEREIRA BIZTALK BLOG
Viewing all articles
Browse latest Browse all 51

Cannot generate serialization assembly {AssemblyName}.XmlSerializers.dll because it already exists. Use /force to force an overwrite of the existing assembly.

$
0
0

For some reason after having migrated a BizTalk 2006/Visual Studio 2005 solution to BizTalk 2010/VS 2010 using Visual Studio Conversion Wizard, I got the following error:

"Cannot generate serialization assembly {AssemblyName}.XmlSerializers.dll because it already exists. Use /force to force an overwrite of the existing assembly"

SGEN-Cannot-generate-serialization-assembly-XmlSerializers

The migration of this project was divided into two parts:

  • First part is to migrate the project as is to the new environment in order to discontinue the old platform;
  • The second part is to improve the project with new functionalities available in the new version (migrate SOAP adapter to WCF and so on);

CAUSE

The XML Serializer Generator 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.

However, some time if you have a traditional Web Service reference in your BizTalk Project this error may suddenly appear. It seems that when you try to build the solution the SGEN process is having some trouble deleting the original XMLSerializers.dll and in result will give you that error.

SOLUTION 1

This problem can be solved by:

  • Going to the path “%windir%\Microsoft.NET\assembly\” (.NET 4.0) or “C:\WINDOWS\assembly” (if you use previous version of .NET) and uninstall the corresponding Project name DLL from there.
  • And then rebuild the Project.

Limitation: each time you deploy the DLL to the GAC, the next time you need to build the project you first need to uninstall the DLL from the GAC

SOLUTION 2

You also can solve this error by choosing not to generate a Serializiation assembly from the Project Properties.

  • Right-click in the project name and select “Properties” option
  • On the left tree option choose “Build” tag
  • Under the Output properties, from the drop box “Generate serialization assembly” select “Off”

Visual-Studio-Project-Properties-Generate-serialization-assembly-off



Viewing all articles
Browse latest Browse all 51

Trending Articles