找到那个出错的程序aspnet_merge.exe,位置X:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0。查看了其帮助说明,开始运行。
(1)aspnet_merge d:\project\mmc -o mmc.dll
结果:
error 1008 : The PrecompiledApp.config file is mission. Make sure the application has been precompiled with the Aspnet_compiler tool.
先要Compile是吧,OK,继续找到Compile工具,位置%Windir%\Microsoft.NET\Framework\v2.0.50727\。照旧按照帮助说明开始运行Compile。
(2)aspnet_compiler d:\project\mmc -v /mmc -u -f
结果OK。
继续执行(1),结果如下:
An error occurred when merging assemblies : ILMerge.Merge: ERROR!!: Duplicate type '_Default' found in assembly 'App_Web_knnbg0wh'。
呵呵,结果出来了,原来这个aspnet_merge默认要使用强命名,网站中不能出现同名的类,由于我的几个网站目录下都有Default页面,导致merge出错。
解决了上述同名问题后,运行,一切正常,呵呵,感觉VS的IDE的出错信息还是有很多让人摸不着头脑的,遇到这种问题只能靠手动才行了,VS还是有待改进滴~