Path too long error when building a windows azure service

后端 未结 7 1762
星月不相逢
星月不相逢 2020-12-04 19:42

I have been trying to publish my service to windows azure. The service consists of a single webRole, however I have added remote login functionality published it and built i

相关标签:
7条回答
  • 2020-12-04 20:03

    Same problem happened to me when I try Packaging an Umbraco project for Azure (https://github.com/WindowsAzure-Accelerators/wa-accelerator-umbraco/wiki/Deployment), I found the solution is to: Copy and rename the long-name path and folder to "C:\someshortname".

    (solution was suggested by this: link)

    0 讨论(0)
  • 2020-12-04 20:05

    I ran into the same problem with a new solution.

    Note that, unlike Eugenio Pace's response suggests, the error occurs only when deploying to Azure (and not when running the project in the Azure Compute Emulator).

    Try adding the following line to the first property group of your Windows Azure Visual Studio Project file (*.ccproj):

    <ServiceOutputDirectory>C:\Azure\</ServiceOutputDirectory>
    

    The trailing slash (for whatever path you select) appears to be required. This folder will be deleted each time you create a package if it exists.

    This setting seems to redirect the working folder for the package to a shorter base path, preventing the path too long error.

    Credit goes to: http://govada.blogspot.com/2011/12/windows-azure-package-build-error.html

    0 讨论(0)
  • 2020-12-04 20:05

    When you run a cloud service on the development fabric, the development fabric uses a temporary folder to store a number of files including local storage locations, cached binaries, configuration, diagnostics information and cached compiled web site content.

    By default this location is: C:\Users\\AppData\Local\dftmp

    Credit goes to Jim Nakashima of Microsoft : https://blogs.msdn.microsoft.com/jnak/2010/01/14/windows-azure-resolving-the-path-is-too-long-after-being-fully-qualified-error-message/

    In order to change the temporary folder, a user environment variable has to be created :

    It is named _CSRUN_STATE_DIRECTORY

    Give it a value of short named directory like :

    c:\AzureTemp
    

    Don't forget to restart Visual Studio in order to have the environmennt variables to be read again

    It fixed many compilations problem !

    0 讨论(0)
  • 2020-12-04 20:07

    The better solution may be to create a symbolic link to your project folder. This doesn't require moving files or changing system variables. Open up the command prompt as an administrator and run this:

    mklink /D C:\Dev C:\Users\danzo\Source\Workspaces
    

    Obviously you can change "C:\Dev" to whatever you want it to be and you'll need to change the longer path above to the root directory of your soltions/projects folder.

    0 讨论(0)
  • 2020-12-04 20:11

    Perhaps the local folder used to store temporary development fabric is too long. See Windows Azure - Resolving "The Path is too long after being fully qualified" Error Message.

    0 讨论(0)
  • 2020-12-04 20:16

    I was having this problem as well when deploying a Node.js project to Azure.

    To fix it, I had to change my "TEMP" and "TMP" user environment variables to something shorter than their default values.

    In my case, they were pointing by default to %USERPROFILE%\AppData\Local\Temp, changing them to C:\Temp solved it.

    Make sure you restart Windows after.

    0 讨论(0)
提交回复
热议问题