Complete noob attempting to teach myself, getting error MSB4025

Using Exercism to teach myself C#, trying to complete the first exercise. However, when I try to run my program I get “error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.”

Code:

using System; public static class HelloWorld { public static string Hello() { throw new NotImplementedException("You need to implement this function."); } } 

I realize the code isn’t runnable, I wanted to see what it would say when I ran it. I am assuming that for whatever reason, its not recognizing the “using” command, which is a C# statement. I have installed the most current .Net Core SDK. Any ideas what is going wrong?

Edit: As requested by u/c17r

<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> </PropertyGroup> <ItemGroup> <Compile Remove="Example.cs" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" /> <PackageReference Include="xunit" Version="2.3.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> </ItemGroup> </Project> 

submitted by /u/StaticasaurusRex
[link] [comments]

Leave a Reply