VS2008 ASP.NET 3.5 - "Cannot execute a program"

414 views
Skip to first unread message

bigAPE

unread,
Jun 13, 2008, 1:43:19 AM6/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi All,

RE: Cannot execute a program - "C:\WINDOWS\Microsoft.NET\Framework
\v3.5\csc.exe"

Just installed VS2008 on an XP Pro SP3 machine with VS2005. I fire it
up and create a new ASP.NET Web App targeted at .NET 3.5. Add some
text to the default page and fire it up in Debug mode. It launches the
browser and throws the "Cannot execute a program" exception for
"csc.exe".

I have since tried to the following:

- Created a new ASP.NET Web App using the .NET 2.0 profile (worked
fine)
- Created a new ASP.NET Web App using the .NET 3.0 profile (worked
fine)
- Created a new ASP.NET Web App using the .NET 3.5 profile (failed
with Exception)
- Repaired VS2008 (no effect)
- Reinstalled VS2008 (no effect)
- Repaired .NET 3.5 Framework install (no effect)

Anyone have any suggestions... this is really annoying me now.

Al

===============================================================
Server Error in '/' Application.

Cannot execute a program. The command being executed was "C:\WINDOWS
\Microsoft.NET\Framework\v3.5\csc.exe" /noconfig /fullpaths @"C:
\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
\root\796ed787\fd4217d7\m8500evh.cmdline".

Description:
An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details:
System.Runtime.InteropServices.ExternalException: Cannot execute a
program. The command being executed was "C:\WINDOWS\Microsoft.NET
\Framework\v3.5\csc.exe" /noconfig /fullpaths @"C:\WINDOWS
\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root
\796ed787\fd4217d7\m8500evh.cmdline".

Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:
[ExternalException (0x36b1): Cannot execute a program. The command
being executed was "C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe" /
noconfig /fullpaths @"C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\root
\796ed787\fd4217d7\m8500evh.cmdline".]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle
userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName, String trueCmdLine)
+2165
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle
userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName, String trueCmdLine)
+111
Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters
options, String compilerDirectory, String compilerExe, String
arguments, String& outputFile, Int32& nativeReturnValue, String
trueArgs) +451
Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters
options, String[] fileNames) +593
Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters
options, String[] fileNames) +185
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters
options, String[] fileNames) +23
System.Web.Compilation.AssemblyBuilder.Compile() +843
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +164
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath) +267
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) +582
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean
allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean
noAssert) +111
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) +54
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context,
String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String
physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+128
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +161
===============================================================

Andrew Badera

unread,
Jun 14, 2008, 10:01:44 AM6/14/08
to DotNetDe...@googlegroups.com

Andrew Badera

unread,
Jun 14, 2008, 10:02:17 AM6/14/08
to DotNetDe...@googlegroups.com
Also, good ole aspnet_regiis -i ?

bigAPE

unread,
Jun 16, 2008, 2:43:35 AM6/16/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

>> Also, good ole aspnet_regiis -i ?

Sadly no. Tried that with no change.

>> I'm curious ... have you tried VS2008 SP1? Also, is VS2005 patched to its

I have VS2005 patched to SP1, but thought that VS2008 SP1 was in Beta
only.

Why is it always me with the annoying problems!

Al

bigAPE

unread,
Jun 17, 2008, 3:22:10 AM6/17/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

I have just uninstalled and reinstalled VS2008 and it's STILL throwing
the same error when running the default ASP.NET web app when
configured to target the 3.5 Framework.

Come on, someone must have an idea. I can't believe I'm the only
person in the world to have this problem.

Al

bigAPE

unread,
Jun 19, 2008, 6:57:06 PM6/19/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
After uninstalling every instance of Visual Studio 200x and all the
associated components then reinstalling just VS2008, it is now
working! It was obviously one of the associated components conflicting
most likely due to the way that I had installed them, and the odd Beta
or two, over time.

Pity there was no simple resolution to resolve this, but I appreciate
that its an odd one.

Al

Jayaram Krishnswamy

unread,
Jul 21, 2008, 10:16:28 AM7/21/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I was curious to find out. I have VS2008 and recently I installed the
SP1. I created ASP.NET WEB Site project
on the localhost as well as a file system based web page. In both
cases I had no problem in bringing up the page
with some text on a browser. Debug mode did not show any errors.

If you want to install SP1 you may want to read my blog:

http://hodentek.blogspot.com/2008/07/sql-server-2008-rc0-and-visual-studio.html
> System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUser­TokenHandle
> userToken, String cmd, String currentDir, TempFileCollection
> tempFiles, String& outputName, String& errorName, String trueCmdLine)
> +2165
> System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle
> userToken, String cmd, String currentDir, TempFileCollection
> tempFiles, String& outputName, String& errorName, String trueCmdLine)
> +111
> Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters
> options, String compilerDirectory, String compilerExe, String
> arguments, String& outputFile, Int32& nativeReturnValue, String
> trueArgs) +451
> Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters
> options, String[] fileNames) +593
> Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.­CompileAssemblyFromFileBatch(CompilerParameters
> options, String[] fileNames) +185
> System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerPar­ameters
> options, String[] fileNames) +23
> System.Web.Compilation.AssemblyBuilder.Compile() +843
> System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +164
> System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
> virtualPath) +267
> System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
> virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
> allowBuildInPrecompile) +582
> System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpCon­text
> context, VirtualPath virtualPath, Boolean noBuild, Boolean
> allowCrossApp, Boolean allowBuildInPrecompile) +93
> System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
> virtualPath, HttpContext context, Boolean allowCrossApp, Boolean
> noAssert) +111
> System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPa­th
> virtualPath, Type requiredBaseType, HttpContext context, Boolean
> allowCrossApp, Boolean noAssert) +54
> System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context,
> String requestType, VirtualPath virtualPath, String physicalPath) +31
> System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler­(HttpContext
> context, String requestType, VirtualPath virtualPath, String
> physicalPath) +40
> System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
> requestType, VirtualPath path, String pathTranslated, Boolean
> useAppConfig) +139
> System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionSte­p.Execute()

MichaelN

unread,
Sep 10, 2008, 10:55:17 PM9/10/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
It works for me after repairing .NET 3.5. Try that before uninstall -
reinstall VS200x
Reply all
Reply to author
Forward
0 new messages