Aspnet_merge.exe "has exited. Solution to the error code 1

Source: Internet
Author: User

Aspnet_merge.exe "has exited,CodeThe solution to an error of 1 is very important '', that is, the detailed output information can only be viewed in the output column'', not the error information column.

When a website is published in vs2005, the DLL file generated does not generate a rule like vs2003. The generated DLL file name contains a random number and cannot generate a DLL file for a project.

Therefore, every time the website is changed, it is necessary to upload the whole site upon release. It is not used to it and is very uncomfortable;

Just like vs2003, I heard that Microsoft has released the webdeployment project plug-in to solve this problem. The installation is very simple.

Download URL:
Http://download.microsoft.com/download/c/c/ B /ccb4877f-55f7-4478-8f16-e41886607a0e/WebDeploymentSetup.msi

But always report when publishing
"Aspnet_merge.exe" has exited and the error code is 1
In addition, the released dll has not been merged. It is still the same as before, a lot;

I checked it online, some of them said it was about Chinese encoding, and some said it was about an array index exceeding the limit. I can't solve it myself, but where can I find this error;

Fortunately, some people said on the Internet that they would generate and run the VS 2005 tool-options-project and solution-, set "msbuild project generation output details", and select "details ". After the Web deployment projects project is created again, the information in the "output" box becomes very rich. In this way, you can view the errors;

Sure enough, the error stops again.
An error occurred when merging assemblies: ilmerge. Merge: Error !! : Duplicate type 'web _ left' found in assemb' app _ web_k7ytr'

It means that the web_left class already exists. I went to the project to search for this string, and it appeared four times. Twice it was in the class definition in the CS file, the other two are the inherits calls of the page;

Needless to say, this isProgramThe member did not make any changes when copying the page, even the CS reference was not changed; I changed it immediately and generated it again;

Again, the prompt is the same as the previous one, but the class name is different. It seems that there are a lot of the same errors. Alas, you have to change it and then generate it. Find the error location according to the prompt and change it; generation was slow. After an afternoon, all the changes were completed;

Finally, it is generated successfully! Haha; all the DLL generated by CS is merged into a DLL;

In the header of the page, the CS reference is changed
<% @ Page Language = "C #" autoeventwireup = "true" inherits = "web_govopen_article, builderweb" enableeventvalidation = "false" viewstateencryptionmode = "never" %>
Note that the referenced DLL name at inherits does not contain a random number;

I also read this information in the "output" Window of vs2005.
Command:
C: \ windows \ Microsoft. net \ framework \ v2.0.50727 \ aspnet_compiler.exe-V/website-P "D: \ Project Phase II \ Website"-u-F-d "D: \ Project Phase II \ builderweb \ webroot \\"
The task "aspnetcompiler" is using "aspnet_compiler.exe" in "c: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_compiler.exe.pdf ".

I'm familiar with it. The original scheme was generated using aspnet_compiler.exe. I used it as a command line;

Next
Running aspnet_merge.exe...
Command:
C: \ Program Files \ msbuild \ Microsoft \ webdeployment \ v8.0 \ aspnet_merge.exe "D: \ Project Phase II \ builderweb \ webroot"-O builderweb-debug-copyattrs
The task "aspnetmerge" is using "C: \ Program Files \ msbuild \ Microsoft \ webdeployment \ v8.0 \ aspnet_merge.exe.exe 的aspnet_merge.exe ".

Ask, the function of aspnet_merge.exe is to merge DLL files;

It is precisely because the CS document referenced by aspx has the same class name, so an error will be reported during the merge. Previously, the classes are separated in different DLL. The duplicate name problem is not exposed, and the merge will cause a problem;

Now we can understand this "error with code 1.

 

This article from the csdn blog, source: http://blog.csdn.net/yangyifan0/archive/2008/01/08/2029797.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.