1

My VS 2022 Community Edition seems to not recognize the SDK project file format in a .NET 6 solution which works fine for my team mates. Solution explorer is empty, the existing files get shown only by activating the "Show all files" option. I can "Include in project" them which leads to the class names being included in the csproj file, which should NOT be the case with SDK project files. The csproj file header is (correctly)

<Project Sdk="Microsoft.NET.Sdk">

What am I missing?

1 Answer 1

0

After deleting and cloning the repository again, it worked. The solution folder name contained a blank which got replaced by %20 in the git clone link. When I cloned it for the first time, I didn't replace the %20 for the locally created folder which by default has the same name like in the link.

I would have expected Visual Studio to just scan the current directories for known file types, but obviously it didn't like the main folder to be named like My%20Solution.

Sign up to request clarification or add additional context in comments.

1 Comment

Had the same problem. A repo with spaces clones to a local directory with spaces escaped as %20, by default, which causes this problem. Cloning to a local directory without %20 in the name resolves it. E.g. MySolution instead of My%20Solution. (I think the answer would be clearer if you add what worked for you.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.