none
CSC Compile timeouts RRS feed

  • Question

  • I have recently moved my solutions from VS2010 to VS2013. When I test otherwise unmodified code on a Windows 2003 Server I start to get errors of this kind:

    'Error occurred while compiling the script: Timed out waiting for a program to execute. The command being executed was "C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /noconfig /fullpaths @"C:\Documents and Settings\(user)\Local Settings\Temp\4wrw3tay.cmdline".'

    The code has not changed, the server is the same. The only difference is that the code now is compiled in VS2013 and installed on the server by an msi built by InstallShield LE (earlier in VS2010 I used setup projects, *.vdproj).

    I experience this error in 2 different situations:

    1. XslLoadException in System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver 
    2. When calling a web service through and old-fashioned web reference proxy. ExternalException in System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

    I have been able to work around issue 2 by building and including the Xml Serialization assembly for the dll consuming the webservice. But so far I have no remedy for issue 1

    Assistance urgently needed
    Thx



    • Edited by Lars K Wednesday, February 5, 2014 7:55 PM
    Wednesday, February 5, 2014 7:48 PM

Answers

  • Hi Lars,

    Does this issue occur every time when you call the XslCompiledTransform.Load on that server? 

    If it occurs every time when you call the Load method, I will suggest you try to capture process monitor log when running vs2010 compiled version and vs2013 compiled version on the server 2003. And then check if you can find anything different when csc.exe is executed. To capture process monitor log, please check: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx 

    When you check the log, focus on the following points:

    1. Check if there is any "Access Denied" in result column.

    2. Check what is user runs csc.exe in property window.

    If the issue occurs randomly, I will suggest you try to follow mentioned in http://blogs.msdn.com/b/antosha/archive/2006/07/16/xslcompiledtransform-slower-than-xsltransform.aspx


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, February 7, 2014 8:45 AM

All replies

  • Hi Lars,

    >XslLoadException in System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver 

    I searched for this XslCompiledTransform.LoadInternal method, but find nothing about this in MSDN reference. I think it’s a protected method used by Framework. So I recommend you post thread on Microsoft Connect to meet our product term for help.

    I will post it for you, what you need to do is to take care of it and follow up.

    https://connect.microsoft.com/VisualStudio/feedback/details/816748/csc-compile-timeouts.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, February 6, 2014 2:38 AM
    Moderator
  • Hello Hetro and thx for your reply

    Yes, XslCompiledTransform.LoadInternal is indeed internal to System.Xml.dll. This is the point where the exception is actually thrown. But this happens at point in my code where I load the xslt style sheet like so

    var settings = new XsltSettings(false, true);
    var xslt = new XslCompiledTransform();
    xslt.Load([some stylesheet XmlElement], settings, new XmlUrlResolver());

    So you see that I am using the public Load() method on the XslCompiledTransform class and this is where the exception is thrown. So I am not sure this is a connect issue as you say.

    In the case of both my problems I believe the core problem is that the .NET framework need to compile something on the fly.

    • For the Xlt it needs to compile the xslt
    • For the web service consumer, it needs to compile the xml serializations for the types in the web service wsdl.

    It is this compilation that fails with a timeout. To further clarify:

    1. I get this when the code - in VS2013 - has been
      - Compiled
      - Included in an MSI built by InstallShield LE
      - Installed on a Windows Server 2003 x64
    2. I do not get this when running the code in debug from Visual Studio (VS2010 and VS2013 alike) on my Win 7 machine
    3. I do not get this when the MSI mentioned in point 1 is installed on a Windows Server 2008 x64
    4. Even on the (same) Windows Server 2003 I do not get this when the code - in VS2010 - has been
      - Compiled
      - Included in an MSI built by a Visual Studio Setup project (vdproj)
      - Installed on the (same) Windows Server 2008 x64



    • Edited by Lars K Thursday, February 6, 2014 1:03 PM
    Thursday, February 6, 2014 1:02 PM
  • Hi Lars,

    Does this issue occur every time when you call the XslCompiledTransform.Load on that server? 

    If it occurs every time when you call the Load method, I will suggest you try to capture process monitor log when running vs2010 compiled version and vs2013 compiled version on the server 2003. And then check if you can find anything different when csc.exe is executed. To capture process monitor log, please check: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx 

    When you check the log, focus on the following points:

    1. Check if there is any "Access Denied" in result column.

    2. Check what is user runs csc.exe in property window.

    If the issue occurs randomly, I will suggest you try to follow mentioned in http://blogs.msdn.com/b/antosha/archive/2006/07/16/xslcompiledtransform-slower-than-xsltransform.aspx


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, February 7, 2014 8:45 AM
  • Hi

    Thx for the replies. Instead of spending more time on this issue I have decided to move forward and upgrade the server(s) in question to Win Server 2008 R2.

    I do not experience the problem on Win Server 2008 R2 x64.

    There is obviously a problem on Win Server 2003, but I will leave it to the good folks at Microsoft to sort it out for any following sufferers :-)

    Monday, February 17, 2014 2:39 PM