2

I have inherited a complex MSBuild script which builds & deploys multiple solutions. When I run the script I see the following error in log:

SGEN: Cannot generate serialization assembly C:\B\268\Agents\Agents.XmlSerializers.dll because it already exists. Use /force to force an overwrite of the existing assembly.

I agree that Agents.XmlSerializers.dll exists. What I can't determine is which task caused it to be created and which one initiated the attempt to re-create it.

I have searched through the files in the build hierarchy for 'SGen' and found nothing. So I presume that SGen is called implicitly by two (or more) of the tasks in the build.

Can anyone point out what might call SGen?

Thanks.

m.edmondson
  • 30,382
  • 27
  • 123
  • 206
Badgerspot
  • 2,301
  • 3
  • 28
  • 42
  • use `/v:diag` in your msbuild command to get diagnostic verbosity and dump the output to a file. Then you will see what exactly is going on in the script. – Pawel Nov 25 '12 at 18:55

1 Answers1

-1

In the Build Output window, look for...

Task "SGen"

Right above that is the actual "sgen.exe" command.

And as Pawell said, you need full details in your build output. Inside of Studio, it's Tools - Options... - Projects and Solutions - Build and Run - MSBuild project build output verbosity: Diagnostic.

Gabe Halsmer
  • 808
  • 1
  • 9
  • 18