Lesson 2 - Troubleshooting

Please leave a comment if you’re having issues with Lesson 2 - getting the code up and running in Visual Studio. Make sure to post a screenshot if you can!

1 Like

Hi Hilary,

I am observing the following error after building the solution in visual studio.
see image >> Screenshot by Lightshot

Could not write to output file ‘C:\Users\g33kl\source\repos\APIChecksWithRestSharp\APIChecksWithRestSharp\APIChecksWithRestSharp.xml’

Kindly advise.

Hi Hillary,

Please disregard above issue I previously observed.
I was able to locate and update path to XML documentation for the solution.
As a result, I am able to build the solution successfully.

Thank you.

1 Like

Excellent! Glad you were able to find the solution

I ignored Hilary’s strong suggestion to use Visual Studio at my own risk :see_no_evil:, and tried to run the API in Visual Studio Code. I succeeded.

How I did it:

  • I had .NET 6 already installed (use the command dotnet --info in the terminal to check this) so I decided to use repo GitHub - g33klady/ApiChecksWithRestSharp_2022Updates: Updates with Dotnet 6 and Visual Studio 2022
  • Visual Studio Code seem to be unable to work with Solution files. But it can work with project files.
    1. dotnet build gave exacltly the 17 warings that Hilary had.
    2. dotnet run --project APIChecksWithRestSharp/APIChecksWithRestSharp.csproj
      Check where the .csproj file is located and adapt this command if needed. I got to see the app in my browser :slight_smile:

I don’t know yet if I can do everything later in the course. But I am optimistic, so let’s proceed.

1 Like

You are very brave :smiley: Thank you for helping others along, I look forward to seeing how you do!

Hello, just started your RestSharp course! I’ve done the setup stuff on VS 2022, almost without incident - it’s just the certificate side, I’ve got an insecure site instead of the nice https-enable site in our video. Any suggestions please?

RestSharp - cert issue

I think it depends on the browser you’re using @simienrigler . Firefox is more forgiving of the security stuff

Thanks, just after posting I’d noticed Edge was happy too. Onwards … :slight_smile:

1 Like

Excellent! Excited for your learning journey!