簽出 EFCore 源碼,用 build.cmd 命令進行編譯,總是出現下面的錯誤:C:\Dev\github\EntityFrameworkCore\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs(526,28): error CS1010: Newline in constant用 VS2017 打開 F1Context.cs 文件,會出現下面的提示:Some bytes have been replaced with the Unicode substitution character while loading file C:\Dev\github\EntityFrameworkCore\src\EFCore.Specification.Tests\TestModels\ConcurrencyModel\F1Context.cs with Chinese Simplified (GB2312) encoding. Saving the file will not preserve the original file contents.被 VS2017 轉碼后,F1Context.cs 中出現亂碼new TestDriver
{
Name = "Marc Gen?,
TeamId = Team.Ferrari,
CarNumber = null,編譯錯誤就是因為亂碼引起的。請問如何解決這個問題?
1 回答

qq_笑_17
TA貢獻1818條經驗 獲得超7個贊
打開 Control Panel
-> Clock, Language, and Region
,進入 Region
-> Administrative
,將 Language for non-Unicode programs
由 Chinese(Simplified, China)
改為 English(United States)
,問題解決。
- 1 回答
- 0 關注
- 607 瀏覽
添加回答
舉報
0/150
提交
取消