Last post Sep 19, 2012 06:06 AM by mohitjain.0189
Sep 03, 2012 04:18 AM|mohitjain.0189|LINK
We recently migrated from .net 2.0 to .net 4.0. We use web deployment project to build the project. In 2.0, the project was building perfecly. After migrating to .net 4.0, when we build the project using web deployment project, the build fails with following
aspnet_merge : error occurred: An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'PopupMaster' found in assembly 'App_Web_popupmaster.master.cdcab7d2'.
PopupMaster is a master page in code.
We have thoroughly checked, that there is no duplicate class named 'popupmaster' in the project.
In our build outputs of .net 2.0, this assembly is not merged with other assemblies and it resides in bin folder.
Is there any way to mark this assembly to not merge in to the .net 4.0 merged output ?
Please provide a solution to this problem.
Sep 03, 2012 07:10 AM|christiandev|LINK
Have you tried to use 'clean solution'?
Sep 03, 2012 11:45 AM|mohitjain.0189|LINK
What do you mean by 'clean solution' ? Please specify..
Sep 03, 2012 12:39 PM|christiandev|LINK
Click on Build -> Clean Solution.
Sep 04, 2012 12:27 AM|mohitjain.0189|LINK
Thanks for your reply
Yes, We have tested that. The solution is building fine from there.
But if I want to merge assemblies and add a web deployment project to the solution. There it gives the error that Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2.
Sep 04, 2012 03:48 AM|christiandev|LINK
Does it run locally, but fail when trying to run from the 'deployed server'? if so, delete the content of the bin directory in the location you are publishing to, in case you are just overwriting the same files. There's an option to delete existinf files
when publishing, it sounds like this option may not be checked with you?
Sep 04, 2012 05:51 AM|mohitjain.0189|LINK
I have added a web deployment project in the solution. When I try to build web deployment project, it fails with error
Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2.
Sep 18, 2012 12:46 AM|gnoix|LINK
please try to delete the asp.net temporary files which is located under "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files" folder or "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"
Sep 18, 2012 02:53 AM|Dino He - MSFT|LINK
All you need to do is open up the offending aspx and aspx.cs files and update two lines:
1. In the code behind file, rename the partial class. By default Visual Studio will name the class FolderName_Pagename which should result in a unique name
2. The page declaration (first line of the page) in the aspx file. You have to make sure that both the Inherits attribute and CodeBehind reference are correct.
To avoid confusing yourself, open the files independently using the solution browser because if you open the aspx and press F7 to switch to the code behind file before updating the page declaration, you'll end up editing the page you copied rather than the
Hope be helpful!
Sep 19, 2012 06:04 AM|mohitjain.0189|LINK
it desn't help buddy....
Sep 19, 2012 06:06 AM|mohitjain.0189|LINK
It is not working...... Can you please suggest something else??