question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodeSignTask hitting long path error when signing SiteExtension packages with runtime store

See original GitHub issue

I’m trying to sign a SiteExtension nuget package that contains dotnet runtime store

Signing fails with the following error:

 SignToolTask starting.
  DryRun: True
  Signing mode: Real
  MicroBuild signing logs will be in (Signing*.binlog): D:\github\aspnet\AspNetCore\artifacts\logs\
  MicroBuild signing configuration will be in (Round*.proj): D:\github\aspnet\AspNetCore\obj\
C:\Users\pakrymet\.dotnet\buildtools\korebuild\3.0.0-build-20181207.1\modules\KoreBuild.Tasks\CodeSign.targets(51,5): error : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\Users\p akrymet\.dotnet\buildtools\korebuild\3.0.0-build-20181207.1\KoreBuild.proj]
  SignToolTask execution finished.

After attaching to MSBuild and catching the first change exception I was able to figure out that the path that is being create is D:\github\aspnet\AspNetCore\obj\ContainerSigning\16D285869A01B4C54E3C5CDA81CE0A9B075BD2A43F824EAFB00AFB3B3FC4497F\content/store/x64/netcoreapp3.0/microsoft.aspnetcore.azureappservices.hostingstartup/3.0.0-preview-1999-0010/lib/netcoreapp3.0/Microsoft.AspNetCore.AzureAppServices.HostingStartup.dll

So even if I remove my base directory obj\ContainerSigning\16D285869A01B4C54E3C5CDA81CE0A9B075BD2A43F824EAFB00AFB3B3FC4497F\content/store/x64/netcoreapp3.0/microsoft.aspnetcore.azureappservices.hostingstartup/3.0.0-preview-1999-0010/lib/netcoreapp3.0/Microsoft.AspNetCore.AzureAppServices.HostingStartup.dll is still 270 characters long.

Not sure how to fix or workaround this.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
tmatcommented, Dec 12, 2018

I see. Cool, good to know that we can get rid of any workaround that we implement once we move to 16.0. @JohnTortugo let’s implement a workaround then and file an issue to remove it once we move to msbuild 16.0

0reactions
markwilkiecommented, Dec 12, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Best way to resolve file path too long exception
As the cause of the error is obvious, here's some information that should help you solve the problem: See this MS article about...
Read more >
Fix Destination Path Too Long Error In Windows 10/8/7
Users get the “Destination Path Too Long ” error while trying to copy, move or remove ... Keep in mind that this is...
Read more >
Maximum Path Length Limitation - Win32 apps
When using an API to create a directory, the specified path cannot be so long that you cannot append an 8.3 file name...
Read more >
Issues creating object files in long path- Tasking compiler
The error message means the Tasking Compiler is having trouble creating object files because the file names are too long or the path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found