By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

vbc compiler error code 1

P: n/a
I'm developing a web app in .NET 2 using C#, and occasionally see this
error, apparently something to do with the theme used on the site:

Compiler Error Message: The compiler failed with error code 1.

Clicking the "Show Detailed Compiler Output" link on the error page
shows a large command line that looks like it's using the vbc compiler
to build the auto-generated theme code, but doesn't display any useful
error messages. Executing that same command line from a command prompt
does however give the error message:

vbc : Fatal error BC2000 : compiler initialization failed unexpectedly:
Project already has a reference to assembly System.Xml. A second
reference to
'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__ b77a5c561934e089\System.Xml.dll'
cannot be added.

Looking through the command line, there is only one reference to System.Xml

Any ideas what may be causing this? I can sometimes work around the
problem by deleting the contents of the Temporary ASP.NET Files folder
and forcing it to recompile, but that's not an option for when the app
is deployed.

Thanks,
Mark
Feb 23 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hello Mark,

From your description, I understand you occassionally get a compilation
error in your ASP.NET web application. And the error is raised from the
Theme's compilation.

Based on my experience, such issue is ususally caused by inconsistent
assembly set producted by ASP.NET application dynamic compilation. For
ASP.NET 2.0 web application, most content are dynamically compiled, and
different page or components may be compiled into separate dynamic
assemblies. The problem is that when application restart, there may occur
inconsistency between new dynamic compiled assemblies and the old cached
ones.

Are you getting the error right after you deploy the application or is the
application developed recently? One common setting you can check is the
<compilation debug="true/false" /in web.config. For deployment scenario,
you should always set it to "false" (release mode) so that ASP.NET runtime
will try dynamic compile application stuffs in batch mode(avoid separate
assemblies). If you haven't turn if off, try turn it off as release mode to
see whether the behavior remains.

In addition, since the error is quite general which is hard to
troubleshoot, for such issue, we would recommend that you try simplifed
the application project to a simple one that can repro the same behavior.
This will be helpful for further troubleshooting.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 23 '07 #2

P: n/a
Steven,
One common setting you can check is the
<compilation debug="true/false" /in web.config. For deployment scenario,
you should always set it to "false" (release mode) so that ASP.NET runtime
will try dynamic compile application stuffs in batch mode(avoid separate
assemblies). If you haven't turn if off, try turn it off as release mode to
see whether the behavior remains.
Thanks - I have been using debug mode so far as I'm still building the
app. I will try changing this to release mode and see if I can still
recreate the problem.

Mark
Feb 23 '07 #3

P: n/a
Thanks for your reply Mark,

Please feel free to let me know your test result or if you have further
questions on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 26 '07 #4

P: n/a
Hello Mark,

Have you got any further progress on this issue? Does the <compilation
debug setting helps on this? If you're still suffering the issue and
haven't got any clues, I would suggest you consider contact CSS for further
assistance since it may require some thorough troubleshooting over the
application.

http://msdn.microsoft.com/subscripti...t/default.aspx

Anyway, please feel free to let me know if there is still anything we can
help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 1 '07 #5

P: n/a
Steven,
Have you got any further progress on this issue? Does the <compilation
debug setting helps on this?
I am still getting some intermittent reports of this problem from one of
my beta testers. I will continue to investigate further and will post
back here with any more details.

Mark
Mar 2 '07 #6

P: n/a
Steven,

I've encountered this same problem again. The only change I've made to
my app is to remove the debug="true" setting from the web.config file.
It seemed to be running OK for a while, but is now broken again.

If I now copy & paste the details of the command line which are shown in
the error message and run it again, it now complains about multiple
references to System.Design.dll, rather than System.Xml.dll which it
mentioned before.

When I get this failure, three entries are added to the Application
event log, which I've included below. Please let me know if there's
anything else I can do to get more information about the cause of this
problem. I should also mention that I am running this web site within my
own application using the ApplicationHost.CreateApplicationHost API
rather than IIS.

Mark

===============================================

Event Type: Error
Event Source: Microsoft (R) Visual Basic Compiler
Event Category: None
Event ID: 1000
Date: 05/03/2007
Time: 07:53:57
User: N/A
Computer: DS4174
Description:
The description for Event ID ( 1000 ) in Source ( Microsoft (R) Visual
Basic Compiler ) cannot be found. The local computer may not have the
necessary registry information or message DLL files to display messages
from a remote computer. You may be able to use the /AUXSOURCE= flag to
retrieve this description; see Help and Support for details. The
following information is part of the event: vbc.exe, 8.0.50727.42,
4333eadd, vbc.exe, 8.0.50727.42, 4333eadd, 0, 0006843c.
Data:
0000: 41 00 70 00 70 00 6c 00 A.p.p.l.
0008: 69 00 63 00 61 00 74 00 i.c.a.t.
0010: 69 00 6f 00 6e 00 20 00 i.o.n. .
0018: 46 00 61 00 69 00 6c 00 F.a.i.l.
0020: 75 00 72 00 65 00 20 00 u.r.e. .
0028: 20 00 76 00 62 00 63 00 .v.b.c.
0030: 2e 00 65 00 78 00 65 00 ..e.x.e.
0038: 20 00 38 00 2e 00 30 00 .8...0.
0040: 2e 00 35 00 30 00 37 00 ..5.0.7.
0048: 32 00 37 00 2e 00 34 00 2.7...4.
0050: 32 00 20 00 34 00 33 00 2. .4.3.
0058: 33 00 33 00 65 00 61 00 3.3.e.a.
0060: 64 00 64 00 20 00 69 00 d.d. .i.
0068: 6e 00 20 00 76 00 62 00 n. .v.b.
0070: 63 00 2e 00 65 00 78 00 c...e.x.
0078: 65 00 20 00 38 00 2e 00 e. .8...
0080: 30 00 2e 00 35 00 30 00 0...5.0.
0088: 37 00 32 00 37 00 2e 00 7.2.7...
0090: 34 00 32 00 20 00 34 00 4.2. .4.
0098: 33 00 33 00 33 00 65 00 3.3.3.e.
00a0: 61 00 64 00 64 00 20 00 a.d.d. .
00a8: 66 00 44 00 65 00 62 00 f.D.e.b.
00b0: 75 00 67 00 20 00 30 00 u.g. .0.
00b8: 20 00 61 00 74 00 20 00 .a.t. .
00c0: 6f 00 66 00 66 00 73 00 o.f.f.s.
00c8: 65 00 74 00 20 00 30 00 e.t. .0.
00d0: 30 00 30 00 36 00 38 00 0.0.6.8.
00d8: 34 00 33 00 63 00 0d 00 4.3.c...
00e0: 0a 00 ..

===============================================

Event Type: Information
Event Source: Microsoft (R) Visual Basic Compiler
Event Category: None
Event ID: 1010
Date: 05/03/2007
Time: 07:53:59
User: N/A
Computer: DS4174
Description:
The description for Event ID ( 1010 ) in Source ( Microsoft (R) Visual
Basic Compiler ) cannot be found. The local computer may not have the
necessary registry information or message DLL files to display messages
from a remote computer. You may be able to use the /AUXSOURCE= flag to
retrieve this description; see Help and Support for details. The
following information is part of the event: 00000000, 0.
Data:
0000: 4e 00 6f 00 20 00 72 00 N.o. .r.
0008: 65 00 73 00 70 00 6f 00 e.s.p.o.
0010: 6e 00 73 00 65 00 0d 00 n.s.e...
0018: 0a 00 ..

===============================================

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1310
Date: 05/03/2007
Time: 07:53:59
User: N/A
Computer: DS4174
Description:
Event code: 3007
Event message: A compilation error has occurred.
Event time: 05/03/2007 07:53:59
Event time (UTC): 05/03/2007 07:53:59
Event ID: 9a63765c24d3406ea85c0fcdc06409b2
Event sequence: 106
Event occurrence: 19
Event detail code: 0

Application information:
Application domain: 90b4942e-4-128171026806530168
Trust level: Full
Application Virtual Path: /
Application Path: C:\test\Web Site\
Machine name: xxxx

Process information:
Process ID: 1580
Process name: Service.exe
Account name: NT AUTHORITY\SYSTEM

Exception information:
Exception type: HttpCompileException
Exception message: External component has thrown an exception.

Request information:
Request URL: http://test/Default.aspx
Request path: /Default.aspx
User host address: xxx.xxx.xxx.xxx
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM

Thread information:
Thread ID: 16
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.Perf ormBuild()
at
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(String
themeName)
at
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(HttpContext
context, String themeName)
at System.Web.UI.Page.InitializeThemes()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,
Boolean& completedSynchronously)
Custom event details:

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Mar 5 '07 #7

P: n/a
Thanks for your followup Mark,

If so, I'm afraid the problem should be quite specific to the application's
structure and code logic. For such issue, so far what we can help is try
simplify the project and isolate the issue so as to reproduce the same
problem behavior through a very simple project. This would be helpful for
continue troubleshooting. Otherwise, some production environment debugging
or dump analysis maybe necessary to troubleshoot such kind of problem which
is usually offered from CSS.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 6 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.