We have a script that runs to build and deploy our web site that has a command like so: msbuild.exe C:\SOURCE\WebSites\WebSiteName\website.publishproj /p:DeployOnBuild=true /p:PublishProfile="WebSiteName Deploy" /p:VisualStudioVersion=14.0
This was all working fine until we started getting this error. aspnet_merge : error occurred: An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'UserControlClassName' found in assembly 'App_Web_usercontrolclassname.ascx.cc671b29
The user control mentioned in the error has not changed. There is not a duplicate in the code. Code involving the control doesn't seem to have changed.
One thing I noticed is that in the publish directory where there used to be one dll, there are now several with names like App_Web_5y43dp11.dll. Including a dll for the usercontrol itself, App_Web_usercontrolclassname.ascx.cc671b29.dll
Any suggestions are greatly appreciated. This has been disrupting our team for days.