-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IO.PathTooLongException - VS2022 #8629
Comments
Just to confirm: Are you building from the same directory path in VS2022 as you did in VS2019? Do you still have VS2019 installed? The same solution on the same machine in the same directory path builds successfully in VS2019 and fails in VS2022? |
Good afternoon
Are you building from the same directory path in VS2022 as you did in
VS2019? *Yes*
Do you still have VS2019 installed? *Yes*
The same solution on the same machine in the same directory path builds
successfully in VS2019 and fails in VS2022? *Yes*
Thank you and Regards
On Tue, 04 Apr 2023 at 16:18, Jonathan Dodds ***@***.***> wrote:
Just to confirm: Are you building from the same directory path in VS2022
as you did in VS2019? Do you still have VS2019 installed? The same solution
on the same machine in the same directory path builds successfully in
VS2019 and fails in VS2022?
—
Reply to this email directly, view it on GitHub
<#8629 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOCPAENZLEFFCZO4HWBTHLW7QUS5ANCNFSM6AAAAAAWSVZQWY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Regards
Marius Els
+27 82 389 9499
"...as for me and my house, we will serve the Lord."- Joshua 24:15 b
|
Is this defect gaining any traction? Was posted over a year ago, and it's definitely still happening! Why in the world is it considering fully-qualified assembly information to be part of a 'file path' in the first place? It's isn't the name of a file! It's an ASSEMBLY REFERENCE. Would you please fix this? Otherwise we're all having to manually turn e.g. Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" into e.g. which works fine as long as it is not a GAC'd assembly reference, and we give it a HintPath so that it finds it! |
Enclose code in backticks (`):
Or use use entitles ( <Reference Include="Microsoft.Office.Interop.Excel"> |
I happened to notice on the main MSBuild github repo site (in the primary ReadMe.md) for "building" -- step number 2 says "Ensure long path support is enabled at the Windows level.". Anyway, one might easily see this being a regression in VS 2022 if part of building the code requires long path support to be enabled for Windows, so I'm sure no one will be able to reproduce if actually building/working on the code. : ) I guess the question is whether the team ran into the issue themselves and resolved by enabling long path support, or if that setting was always required and then the "version" and "culture" info started to be appended to paths and it still just happened to work because devs working on MSBuild already have long path support enabled..? |
Requiring 'long path support' to work around a defect like this is not the right 'solution'. Can you imagine the pain point that would be, on a corporation with thousands of developers, to have to fiddle with each of their registries? And how about build agents in the cloud - do they all automagically have this feature enabled? I doubt it. Bottom line is this is definitely a defect. Again, an assembly reference is not part of a file path. The fact that it is being treated as if it were, and being subject to the constraints of file path lengths, is what needs to be fixed, rather than working around it by enabling long file path support. |
So we can look at this to check what is going on could you please share a binlog? Details on sharing binary logs More information on binary logs |
@maridematte Ok, how do I do that? I have captured a .binlog file, but it is not allowed to post it here. Details
File type not allowed: .binlog |
To share binlogs we recommend opening a feedback ticket with the developer community, link this github issue and ask the issue to be routed to the MSBuild team. This way your binlog is shared privately with us, since it can contain sensitive information. |
@maridematte That is extremely clunky. I go to Visual Studio and select to 'report a problem' and it won't let me sign in. Details
Error signing in: 'ERR_SIGN_IN: System.Exception: ERR_USER_PROFILE_NULL: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at Could you provide me an email address to email the binlog file to? 'Your' system is really awful for doing this. |
That is not great. You can try changing the extension to |
@maridematte Please see the attached file renamed to a .txt extension. Thanks |
@maridematte Any progress on this? |
I recently installed VS2022 and attempted to build a solution that currently builds successful in VS2019, and got the below error:
Using
Not too sure why this issue is creeping back into MSBuild as I'm sure it was resolved in VS 2019
The text was updated successfully, but these errors were encountered: