Inconsistent Build Response in a typical VB.NET Solution

已鎖定 Inconsistent Build Response in a typical VB.NET Solution

  • 2011年11月27日 下午 06:05
     
     

    A particular VB.NET project is actually throwing 'Build Failed' But when I try rebuilding again it says 'Rebuild Succeeded'. It keeps alternating this behavior. 

    Kind of random. Any vbc.exe issue of long locking the PDB or xml files?

所有回覆

  • 2011年11月27日 下午 06:07
     
     

    When xml documentation is enabled every build is failing because the XML files possibly gets locked by visual studio process (devenv). I haven't seen this happening with C# projects.

    occurs in Visual Studio 2010. Any workarounds or fixes?

  • 2011年11月28日 上午 03:55
    版主
     
     

    Hi Deepak,

    Welcome to the MSDN Forum.

    What error does occur when building failed? Would you like to post the error details here? We need more details to locate where it is wrong.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 2011年11月28日 上午 06:58
     
     

    When xml documentation is enabled every build is failing because the XML files possibly gets locked by visual studio process (devenv). I haven't seen this happening with C# projects.

    occurs in Visual Studio 2010. Any workarounds or fixes?

    As it is abnormal what you tell, there should be an abnormal situation which you have created, that does not depend to VB but too the programmer who did it.

    So please give relative information, not that you saw it never happen in C#, probably nobody ever saw it happen in a car as well.

     

     


    Success
    Cor
  • 2011年11月30日 上午 10:57
     
     
    Even in the same system I could create a C# flavor app which does not succumb to this issue. Let me try and see if I can get the error details in my next post.
  • 2011年11月30日 下午 02:13
     
     
    Here is the error message that comes: C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3061: Unable to delete file "C:\LavanyaDeepak\LD Portal\LD.Interfaces.xml". Access to the path 'C:\LavanyaDeepak\LD Portal\LD.Interfaces.xml' is denied. C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3061: Unable to delete file "C:\LavanyaDeepak\LD Portal\LD.Entities.xml". Access to the path 'C:\LavanyaDeepak\LD Portal\LD.Entities.xml' is denied. Even immediate next rebuild-all it goes off. Again immediate rebuild all gets this error? Why is this alternating behavior only with VBC/VS?
  • 2011年12月1日 上午 05:21
    版主
     
     

    Hi Deepak,

    From the error message, it seems that VS have no permission to delete the file when execute "build" command. So please try to move the file from C drive to another drive which is non-system drive, and try again.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 2011年12月2日 下午 08:12
     
     
    Just do another rebuild all and the error does not come. Here is the sequence. 10.05 AM: Rebuild All (Failed) 10.07 AM: Passed 10.09 AM: Failed 10:11 AM: Passed
  • 2011年12月5日 下午 12:27
    版主
     
     

    Hi Deepak,

    Where do you refer to the XML file?

    From the sequence, it seems that the operation is alternately from success to failure. So please try to manually delete the xml immediately after VS build successfully to check whether it will fail or success. And then find out who locked that file.

    When you build successful, do you run your application?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 2011年12月12日 下午 03:38
    版主
     
     

    Hi Deepak,

    Any updates?

    If you need further more assistance, please feel free to let me know.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.