PathTooLongException Xamarin Droid Project

前端 未结 2 1265
夕颜
夕颜 2021-02-13 15:40

I Created a Xamarin.Forms project with a long path, and while building it I get this error:

\"System.IO.PathTooLongException: The specified path, file nam

相关标签:
2条回答
  • 2021-02-13 16:13

    Probably the easiest temporary solution is to move your project to a drive's root folder to decrease the length of the path.

    0 讨论(0)
  • 2021-02-13 16:26

    Try adding this msbuild property in your project that will shorten the file/folder names on the obj directory

    <PropertyGroup>
        <UseShortFileNames>True</UseShortFileNames>
    </PropertyGroup>
    

    Or this to change the output folder to a one closer to the C:\

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <IntermediateOutputPath>C:\MyFolder\MyProj</IntermediateOutputPath>
    </PropertyGroup>
    

    Hope it helps.

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