从 github 上下载 Entity Framework 2.2.2 的源代码, 运行 build /t:Package
生成 nuget 包,出现6个错误:
C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(527,28): error CS1010: Newline in constant [C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(527,39): error CS1003: Syntax error, ',' expected [C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(527,28): error CS1010: Newline in constant [C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(527,39): error CS1003: Syntax error, ',' expected [C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(527,28): error CS1010: Newline in constant [C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(527,39): error CS1003: Syntax error, ',' expected [C:\Dev\github\EntityFrameworkCore-2.2.2\EntityFrameworkCore-2.2.2\src\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
97 Warning(s)
6 Error(s)
请问如何解决?
是 F1Context.cs 文件 527 行 的拉丁字母引起的
Name = "Marc Gené"
用 Sublime Text 打开 F1Context.cs 文件并以 utf-8 编码保存后问题解决