简体   繁体   中英

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. 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.

IT looks like you hade an Unicode (UTF-16) encoded file that was opened as UTF-8 or ANSI.

Try to save your source file as UTF8.

It looks like the tool that Microsoft used to add the copyright header wasn't Unicode friendly.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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