I read that .NET Core 2.0
SDK support C# 7.2
by default but the features of C# 7.1
and 7.2
are disabled and we have to enable them.
I install both SDK and C# extension for vs-code, but when I compile my code I got this error:
Program.cs(118,2): error CS1513: } expected [/home/smn/Desktop/myTest.csproj]
The build failed. Please fix the build errors and run again.
I also add these line to my .csproj
file:
<PropertyGroup"> <LangVersion>7.2</LangVersion> </PropertyGroup>
try this too:
`<PropertyGroup">
<LangVersion>latest</LangVersion>
</PropertyGroup>`
and also try this too:
`<PropertyGroup
Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup
Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<LangVersion>latest</LangVersion>
</PropertyGroup>`
What should I do?!
We presented a petition to the legislature to change the law. She filed a petition for divorce. We ask you to hear our petition. Verb The organization petitioned the government to investigate the issue.
On Change.org, people everywhere are empowered to start campaigns, mobilize supporters, and work with Decision Makers to drive solutions. Learn the best ways to gain support for your cause and make change! We'll take you through the step by step process from starting your petition to declaring victory.
We are excited to announce that through the generosity of donations of equity from more than 50 of our investors, led by Reid Hoffman and including Bill Gates, Sir Richard Branson, Ray Dalio, Evan Williams, Jerry Yang, Sam Altman, and Arianna Huffington, Change.org is transitioning to 100% nonprofit ownership by the ...
If you have not been able to solve this yet, you should try to remove the erroneous quote (") in the PropertyGroup tag, which appears in all the examples you gave.
<PropertyGroup">
This works for me:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<LangVersion>7.2</LangVersion>
</PropertyGroup>
</Project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With