Use of git with Visual Studio 2022 and C#

Richard Johnson 0 Reputation points
2024-06-14T07:07:29.7166667+00:00

Maybe someone can help?

I've create a little .Net core C# desktop project in VS2022 and save it to git.

When I then clone this repo onto another PC, the designer has disappeared and I get errors when I try to build (project.assets.json is missing).

For info, VS2022 is 'out of the box' and the .gitignore is the default VS2022 recommendation. The NuGet package restore options are both on - i.e. allow download of missing packages and automatically check for missing packages.

Any ideas?

Developer technologies C#
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-06-14T09:45:39.3633333+00:00

    Hi @richard johnson , Welcome to Microsoft Q&A,

    For details, you can refer to the tutorial given on the official website:

    Visual Studio subscriptions with GitHub Enterprise

    About the Git experience in Visual Studio

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-06-14T15:25:44.5033333+00:00

    Either you missed a file, or the second pc does not have the correct workload installed. First just clone to a new location on the original pc to check for missing files. Then compare installed workloads. also as suggested above, be sure no files from the bin or object folder are checked in.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.