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.
Error:
C:\Users\Shaky\App Data\Local\Temp.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 " ' ".
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.
And this repeats over and over like 202 times.
As per https://lautzofdotnet.wordpress.com/tag/unexpected-character/ you need to do the following:
Browse to the file in question in the Appdata\temp 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.
Note: The file can usually be found in C:\Users\\{userName}\AppData\Local\Temp
This will also fix the problem if anyone encounters it in Xamarin forms for Android, delete the respective file (Example:"MonoAndroid,Version=v7.1.AssemblyAttributes.cs ") out of the temp folder
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