none
VS 2013 Compilation Failing If Directory Changes

    Question

  • I don't want to muddy the waters so I will try to keep it as simple as I can. I have a VS2013 solution that compiles 35+ projects without error when the directory is named "Proj" but not if I rename it to another directory. I noticed this when I created a branch for a new software version and one of the projects would fail. Using Diagnostic verbose, the solution has 0 errors and nothing in the log to indicate what project is failing. If I rename the directory back to "Proj", it compiles fine. I am completely stumped!

    Shawn (Mail@ShawnAugust.Com)

    Wednesday, April 5, 2017 3:04 AM

All replies

  • I renamed project to "Prj" and it compiled. I renamed it to a longer path and it failed again as it could not find a few files within the Service References directory. Apparently, there must be a file length restriction? The one that failed was 266 characters?

    Shawn (Mail@ShawnAugust.Com)

    Wednesday, April 5, 2017 3:25 AM
  • I renamed project to "Prj" and it compiled. I renamed it to a longer path and it failed again as it could not find a few files within the Service References directory. Apparently, there must be a file length restriction? The one that failed was 266 characters?

    Shawn (Mail@ShawnAugust.Com)

    A  266 character path exceeds the allowable length unless you have opted into the Win10 feature to remove  MAX_PATH limitation.  See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath

    • Edited by RLWA32 Wednesday, April 5, 2017 4:41 AM
    Wednesday, April 5, 2017 4:40 AM
  • I renamed project to "Prj" and it compiled. I renamed it to a longer path and it failed again as it could not find a few files within the Service References directory. Apparently, there must be a file length restriction? The one that failed was 266 characters?


    Shawn (Mail@ShawnAugust.Com)

    A  266 character path exceeds the allowable length unless you have opted into the Win10 feature to remove  MAX_PATH limitation.  See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath

    How is this resolved in .NET 4.6.2? https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2


    Shawn (Mail@ShawnAugust.Com)

    Wednesday, April 5, 2017 2:31 PM
  • If you read https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath again you will note that certain Win32 API functions support a path that exceeds MAX_PATH if the prefix \\?\ is used.


    However, a program must be specifically coded to take advantage of the feature.
    Wednesday, April 5, 2017 2:46 PM
  • If you read https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath again you will note that certain Win32 API functions support a path that exceeds MAX_PATH if the prefix \\?\ is used.


    However, a program must be specifically coded to take advantage of the feature.

    This was resolved after a VS2017 upgrade. I guess it uses a different Win32 API for compilation.


    Shawn (Mail@ShawnAugust.Com)

    Tuesday, April 11, 2017 12:10 PM
  • @SAgosto, Glad to know that you have resolved this issue. You mark your answer which is benefit to other communities who has the same problem. Thanks.

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 12, 2017 1:25 AM