Skip to content
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

Error trying to update Repo, can't read MissingPropertySerializationConfigurationAnalyzerTest.vb #11758

Closed
paul1956 opened this issue Jul 26, 2024 · 5 comments

Comments

@paul1956
Copy link
Contributor

paul1956 commented Jul 26, 2024

.NET version

Microsoft Visual Studio Community 2022
Version 17.11.0 Preview 5.0
VisualStudio.17.Preview/17.11.0-pre.5.0+35118.90
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Did it work in .NET Framework?

N/A

Did it work in any of the earlier releases of .NET Core or .NET 5+?

N/A

Issue description

unable to create file src/System.Windows.Forms.Analyzers.VisualBasic/tests/UnitTests/System.Windows.Forms.Analyzers.VisualBasic.Tests/System/Windows/Forms/Analyzers/MissingPropertySerializationConfiguration/MissingPropertySerializationConfigurationAnalyzerTest.vb: Filename too long

After running below from ADMIN command prompt
Start-Process -Verb RunAs "git" "config","core.longpaths","true"

The error changes to
Severity Code Description Project File Line Suppression State Details
Error (active) IDE1100 Error reading content of source file

'C:\Users\PaulM\Source\Repos\Winforms\src\System.Windows.Forms.Analyzers.VisualBasic\tests\UnitTests\System.Windows.Forms.Analyzers.VisualBasic.Tests\System\Windows\Forms\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzerTest.vb' -- 'Could not find file 'C:\Users\PaulM\Source\Repos\Winforms\src\System.Windows.Forms.Analyzers.VisualBasic\tests\UnitTests\System.Windows.Forms.Analyzers.VisualBasic.Tests\System\Windows\Forms\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzerTest.vb'.'.	System.Windows.Forms.Analyzers.VisualBasic.Tests	C:\Users\PaulM\Source\Repos\Winforms\src\System.Windows.Forms.Analyzers.VisualBasic\tests\UnitTests\System.Windows.Forms.Analyzers.VisualBasic.Tests\System\Windows\Forms\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzerTest.vb	1		

Steps to reproduce

After sync Main repo no longer can commit changes.

Unable to fix using
PS C:\Users\PaulM\Source\Repos\winforms> git fetch origin
PS C:\Users\PaulM\Source\Repos\winforms> git reset --hard origin/master
error: unable to create file src/System.Windows.Forms.Analyzers.VisualBasic/tests/UnitTests/System.Windows.Forms.Analyzers.VisualBasic.Tests/System/Windows/Forms/Analyzers/MissingPropertySerializationConfiguration/MissingPropertySerializationConfigurationAnalyzerTest.vb: Filename too long
fatal: Could not reset index file to revision 'origin/master'.

@paul1956 paul1956 added the untriaged The team needs to look at this issue in the next triage label Jul 26, 2024
@paul1956 paul1956 changed the title Error trying to update Repo Error trying to update Repo, can't read MissingPropertySerializationConfigurationAnalyzerTest.vb Jul 27, 2024
@elachlan
Copy link
Contributor

I was able to resolve this issue by adding longpaths = true to my config. prior to that I had enabled long paths in windows via the registry.

@paul1956
Copy link
Contributor Author

@elachlan can you be more explicit as to what config file the line needs to be added to.

@elachlan
Copy link
Contributor

Your local git config.

Also you need to enable longpaths in windows:
https://superuser.com/questions/1807770/enable-long-paths-on-win-11-home

@paul1956
Copy link
Contributor Author

paul1956 commented Aug 1, 2024

@elachlan did all those things and it still didn't work completely. Git works, merge works but Visual Studio Community can't read MissingPropertySerializationConfigurationAnalyzerTest.vb. I moved repo directory to C:\Repo, deleted artifacts directory and then everything worked. Thanks, this should be documented if it's not possible to shorten path length.

@paul1956 paul1956 closed this as completed Aug 1, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged The team needs to look at this issue in the next triage label Aug 1, 2024
@Syareel-Sukeri
Copy link
Contributor

Verified this on latest winforms repo, the long path issue is fixed.

Before
image (1)
After
Screenshot 2024-08-16 074910

@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants