Create and Run Simple C# Console Applications - Install and Configure Visual Studio Code

Tell us what’s happening:

Describe your issue in detail here.
I have been unable to install Visual Studio Code with the C# dev kit sucessfully. I have tried at least 6 times of installing, testing, not working, then uninstalling and searching the web for answers that don’t solve my problem or are so technical that i don’t even know where to begin or if they are even addressing my problem.
Here is what happens when i try to create a new console in C#. i get this error message:

Blockquote

The .NET Core SDK cannot be located: Error running dotnet --info: Error: Command failed: dotnet --info
System.Text.Json.JsonReaderException: ‘0x00’ is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.Utf8JsonStreamReader.Read() at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadStringDictionary(Utf8JsonStreamReader& reader) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadLocalizationCatalog(Stream localizationStream, JsonReaderOptions readerOptions) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadWorkloadManifest(String manifestId, Stream manifestStream, Stream localizationStream, String manifestPath) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir) at Microsoft.DotNet.Workloads.Workload.List.WorkloadInfoHelper..ctor(Boolean isInteractive, VerbosityOptions verbosity, String targetSdkVersion, Nullable1 verifySignatures, IReporter reporter, IWorkloadInstallationRecordRepository workloadRecordRepo, String currentSdkVersion, String dotnetDir, String userProfileDir, IWorkloadResolver workloadResolver)
at Microsoft.DotNet.Cli.WorkloadCommandParser.GetWorkloadsVersion(WorkloadInfoHelper workloadInfoHelper)
at Microsoft.DotNet.Cli.CommandLineInfo.PrintInfo()
at Microsoft.DotNet.Cli.Program.ProcessArgs(String args, TimeSpan startupTime, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String args)

.NET SDK:
Version: 8.0.100
Commit: 57efcf1350

Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71
RID: win-x64

.NET SDKs installed:
8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
dotnet command - .NET CLI | Microsoft Learn

Download .NET:
.NET Downloads (Linux, macOS, and Windows)

System.Text.Json.JsonReaderException: ‘0x00’ is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.Utf8JsonStreamReader.Read() at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadStringDictionary(Utf8JsonStreamReader& reader) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadLocalizationCatalog(Stream localizationStream, JsonReaderOptions readerOptions) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestReader.ReadWorkloadManifest(String manifestId, Stream manifestStream, Stream localizationStream, String manifestPath) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider) at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir) at Microsoft.DotNet.Workloads.Workload.List.WorkloadInfoHelper..ctor(Boolean isInteractive, VerbosityOptions verbosity, String targetSdkVersion, Nullable1 verifySignatures, IReporter reporter, IWorkloadInstallationRecordRepository workloadRecordRepo, String currentSdkVersion, String dotnetDir, String userProfileDir, IWorkloadResolver workloadResolver)
at Microsoft.DotNet.Cli.WorkloadCommandParser.GetWorkloadsVersion(WorkloadInfoHelper workloadInfoHelper)
at Microsoft.DotNet.Cli.CommandLineInfo.PrintInfo()
at Microsoft.DotNet.Cli.Program.ProcessArgs(String args, TimeSpan startupTime, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String args)
. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.

my issue is perhaps not what needs to be done, for instance i think this has somethign to do wtih the enviornmenta variables on listed in my PATH, but i don’t know what values to place in that section.
the bottom line is, i cannot load any C# projects or run any C# code or write any C# code because of this issue. Not sure if anyone else is experiencinging this. I am 99 percent sure this has to be an error on my part so if anyone can help, that would be amazing.

thanks!
dan

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Create and Run Simple C# Console Applications - Install and Configure Visual Studio Code

Cool. Nothing. Thanks for the help guys!

Did you try installing .net Core SDK yet?