Until today one of our applications was running correctly in Visual Studio code (the majority of devs use Visual Studio 2019). However, after a pull from git this morning we are getting the following error when building the project.
dotnet build
C:\Program Files\dotnet\sdk\3.0.100\Roslyn\Microsoft.CSharp.Core.targets(59,5): error : Process terminated. System.Runtime.InteropServices.COMException (0x80131239): Method signature has invalid calling convention. (0x80131239) [<MyDiirectory>\<MyProject>.csproj]
C:\Program Files\dotnet\sdk\3.0.100\Roslyn\Microsoft.CSharp.Core.targets(59,5): error : at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseLocalDeclarationStatement(SyntaxToken awaitKeywordOpt) [<MyDiirectory>\<MyProject>.csproj]
C:\Program Files\dotnet\sdk\3.0.100\Roslyn\Microsoft.CSharp.Core.targets(59,5): error : at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParsePossibleDeclarationOrBadAwai tStatement(ResetPoint& resetPointBeforeStatement) [<MyDiirectory>\<MyProject>.csproj]
C:\Program Files\dotnet\sdk\3.0.100\Roslyn\Microsoft.CSharp.Core.targets(59,5): error : at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParsePossibleDeclarationOrBadAwaitStatement() [<MyDiirectory>\<MyProject>.csproj]
The actual csproj file is nothing out of the ordinary:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.ComponentModel.Annotations">
<HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.2.0\ref\netcoreapp2.2\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Report\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="SolrNet.Core" Version="1.0.19" />
</ItemGroup>
I've tried the following:
Has anyone come across this problem, specifically in Visual Studio code? As I say it works fine on Visual Studio 2019.
User contributions licensed under CC BY-SA 3.0