简体   繁体   English

在.NET Framework中进行调试时损坏的文件

[英]Corrupt files when debugging into .NET framework

When debugging into the .NET framework using Visual Studio 2008 Professional, the source files appear corrupted somehow, and the yellow debug line doens't hit the correct lines in the source. 当使用Visual Studio 2008 Professional调试到.NET框架时,源文件以某种方式似乎已损坏,黄色的调试行不会在源代码中出现错误。 For example, a source file might start like this: 例如,源文件可能像这样开始:

// Copyright (c) Microsoft Corporation. All rights reserved.

namespace System.Web.Mvc { 
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using System.Globalization; 

Any ideas? 有任何想法吗?

This is really annoying and I haven't been able to find a solution on Google. 这真的很烦人,我一直无法在Google上找到解决方案。

IT looks like you hade an Unicode (UTF-16) encoded file that was opened as UTF-8 or ANSI. 它看起来像您拥有一个以UTF-8或ANSI打开的Unicode(UTF-16)编码文件。

Try to save your source file as UTF8. 尝试将您的源文件另存为UTF8。

It looks like the tool that Microsoft used to add the copyright header wasn't Unicode friendly. 看来Microsoft用于添加版权标头的工具不是Unicode友好的。

The bad characters are the UTF-8 form of the Byte Order Mark (BOM, 0xFEFF) that (if it appears) should be at the start of file. 不良字符是字节序标记(BOM,0xFEFF)的UTF-8格式(如果出现),应位于文件的开头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM