PolySharp provides generated, source-only polyfills for C# language features, to easily use all runtime-agnostic features downlevel. Add a reference, set your C# version to latest and have fun! 🚀
MIT License
1.83k
stars
49
forks
source link
PoloySharp blocked by windows path length (260) limit #109
If Project foder path legth is larger then 72, Generating file might fail due to path is longer then 260.
Reproduction Steps
Create a csproj in folde like
C:\Users\dummy\project\dummyrepor\dotnetbackend\dummyrepo.somebasementrepo\
Import PolySharp
Build
Expected Behavior
Build success.
Actual Behavior
Got Build Error:
CS0016 could not write to output“C:\Users\dummy\project\dummyrepor\dotnetbackend\dummyrepo.somebasementrepo\obj\Debug\netstandard2.0\generated\PolySharp.SourceGenerators\PolySharp.SourceGenerators.PolyfillsGenerator\System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.g.cs” ........
Hey, if you are using Windows 10 or 11, you can enable "Long Paths" using Group Policies or the Registry. Keep in mind that there a legacy applications that rely on the Path limit so this wont work for those.
Description (optional)
If Project foder path legth is larger then 72, Generating file might fail due to path is longer then 260.
Reproduction Steps
Expected Behavior
Build success.
Actual Behavior
Got Build Error: CS0016 could not write to output“C:\Users\dummy\project\dummyrepor\dotnetbackend\dummyrepo.somebasementrepo\obj\Debug\netstandard2.0\generated\PolySharp.SourceGenerators\PolySharp.SourceGenerators.PolyfillsGenerator\System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.g.cs” ........
System info
Additional context (optional)
Can we remove the repeated PolySharp.SourceGenerators in the path to reduce path length ?