问题描述
所以我有 2 次奇怪的系统崩溃,我应该说是重新启动.我试图排除故障,但我找不到任何问题.在我进入 VS 2017 练习了一下之后不久,就发生了这种情况.
So I had 2 weird system crashes, shall I say restarts. I tried to troubleshoot but i could't find any problem. Soon after I went into VS 2017 to practice a bit and this occurs.
错误:
C:UsersShakyApp DataLocalTemp.NET Framework,Version=v 4 .5.2.程序集 Attributes.cs(1,1,1,1):错误 CS 1056:意外字符'
C:UsersShakyApp DataLocalTemp.NET Framework,Version=v 4 . 5 . 2 . Assembly Attributes.cs(1,1,1,1): error CS 1056: Unexpected character '
请注意,它没有说是哪个字符,它只是说'".
Note that it doesn't say which character, it just says " ' ".
这会一遍又一遍地重复 202 次.
And this repeats over and over like 202 times.
我不得不用空格分隔框架版本号,因为由于语法错误,它不允许我通过文件路径,我搜索了如何做到这一点,没有找到,我认为这是我第一次发布.
I had to separate framework version numbers with space because it doesn't let me pass the file path due to bad grammar, I searched how to do it, didn't find, this is my first time posting i think.
这会一遍又一遍地重复 202 次.
And this repeats over and over like 202 times.
推荐答案
根据 https:///lautzofdotnet.wordpress.com/tag/unexpected-character/ 您需要执行以下操作:
As per https://lautzofdotnet.wordpress.com/tag/unexpected-character/ you need to do the following:
浏览到 Appdata emp 文件夹中的相关文件,您将至少查看有问题的文件(我的情况.NETFramework,版本=4.5.2.AssemblyAttributes.cs).我也有几个不同 .NET 版本的其他类似文件.
Browse to the file in question in the Appdata emp folder and you’ll see at at least the file in question (my case .NETFramework,Version=4.5.2.AssemblyAttributes.cs). I also had a few other similar files for different .NET versions.
只需将它们从临时文件夹中删除即可.当你重新编译时,它们将被重新创建,但我没有收到任何错误,并且一切正常.
Just delete them out of the temp folder. When you recompile, they will get recreated, but I received no errors and all is working well.
注意:该文件通常可以在 C:Users\{userName}AppDataLocalTemp
Note: The file can usually be found in C:Users\{userName}AppDataLocalTemp
这篇关于Visual Studio 2017 意外字符'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!