none
Not a valid Win32 FileTime. Parameter name: fileTime

    Question

  • Hi,

        I've been using Visula Studio 2008 Professional for almost 2 yrs already. Just this week, I am currently receiving a "System.ArgumentOutOfRangeException: Not a valid Win32 FileTime. Parameter name: fileTime" error on all WINDOW FORM PROJECTS that I am creating and have created... I don't know if this was brought by the .net 4.0 update but up to know, I haven't resolved this... I am running vs2k8 on both Windows 7 x86 and Windows 2003 x64.

    Hoping to receive feedback.

    Thank you!

     

     

    Thursday, January 12, 2012 10:31 AM

All replies

  • Any feedback from the viewers? :)

     

    Thursday, January 12, 2012 3:19 PM
  • can you post any sample code there may be some problem like any declaration might changed to 64 bit. You should check whether you are compiling any cpu or x86 or x64 etc. If you provide sample code it might helpful

     

    I hope it might helped you.


    Regards, Fahd Anwar
    Thursday, January 12, 2012 6:15 PM
  • Hi JMPryde,

    When did the error raise? during design time? debug time? compiling time? or running time?

    Suppose it is an IDE issue, please consider following actions you may try:

    1.       If we disable Add-ins (e.g. “Tools” | “Add-in Manager”) and run “devenv.exe /safemode”, do we still have the problem? This can eliminate the possibility that third party Add-ins are causing problems.

    2.       If we use “devenv.exe /resetsettings”, does it solve the problem? It restores Visual Studio default settings.

    3.       If the problem remains, we can use Visual Studio Setup Wizard (via Control Panel) to repair Visual Studio. It can restore the Visual Studio Installation into its original state.

    4.       If you are using other SDKs, e.g. Windows SDK, Windows Mobile SDK, DirectX SDK, etc,. Try to reinstall them. It may be the problem from SDK installation.

    Hope the information helps.

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 13, 2012 2:13 AM
    Moderator
  • Hi Yi,

     

        Following your suggestions, unfortunately, did not resolve the issue.  Again, this only happens on Window Form Projects.  You can just create a window form project and put a messagebox on the Form_Load method. Once you build it, the error will be displayed. Below is the complete error/exception:

     

    Error 1 The "GenerateResource" task failed unexpectedly.

    System.ArgumentOutOfRangeException: Not a valid Win32 FileTime.

    Parameter name: fileTime

       at System.DateTime.FromFileTimeUtc(Int64 fileTime)

       at System.IO.FileSystemInfo.get_LastWriteTimeUtc()

       at System.IO.FileSystemInfo.get_LastWriteTime()

       at Microsoft.Build.Tasks.GenerateResource.GetNewestUncorrelatedInputWriteTime()

       at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath)

       at Microsoft.Build.Tasks.GenerateResource.Execute()

       at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) WindowsFormsApplication1

     

    Again, thank you!

    Friday, January 13, 2012 4:39 AM
  • i think you should repair your visual studio installation because i am sure that simple windows form project works smoothly. Have you check your code on another machine?

    I hope this might helped you.


    Regards, Fahd Anwar
    Friday, January 13, 2012 5:14 AM
  • Hi JMPryde,

    I can't repro this issue on my side, it works as expected on my side. In addition, VS2008 doesn't support .Net 4, therefore, I don't think any .Net4 upgrade will take effect on VS2008.

     

    Based on above information, it seems the filetime of the source file is invalid when the msbuild is checking the last build information. I upload my just created project into my sky drive and you can check if it is work on your side: https://skydrive.live.com/#cid=2826CF1126A90490&id=2826CF1126A90490%21205

     

    If we create a new user account, do we have the problem? This can help to isolate user profile corruption related causes.

     

    If it is possible, could you prepare a clean installed PC or a VM to check if this issue can be reproed in a fresh OS installed machine.

     

    Regards,

    Yi   


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 13, 2012 5:21 AM
    Moderator
  • Hello,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions? 

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, January 18, 2012 2:27 AM
    Moderator
  • It is very likely you hit the same issue,

    http://connect.microsoft.com/VisualStudio/feedback/details/635940/invalid-command-line-switch-for-link-exe-when-building

    You might apply the workarounds (uninstall Citrix stuffs or change your project file).


    Lex Li (http://lextm.com)

    Friday, August 10, 2012 5:22 AM