我对VS2015有一些问题:当我打开任何项目并试图打开一个文件进行编辑时,VS2015崩溃。我尝试重新安装,所有/命令等等。
ActivityLog.xml:
<entry>
<record>430</record>
<time>2015/11/03 14:46:35.669</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.IO.FileFormatException: Input file or data stream does not conform to the expected file format specification. ---> System.IO.FileFormatException: Input file or data stream does not conform to the expected file format specification.
 at MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr)
 at MS.Internal.Text.TextInterface.Font.CreateFontFace()
 at MS.Internal.Text.TextInterface.Font.AddFontFaceToCache()
 at MS.Internal.Text.TextInterface.Font.GetFontFace()
 at System.Windows.Media.GlyphTypeface..ctor(Font font)
 at MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch)
 at MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch)
 at System.Windows.Media.Typeface.ConstructCachedTypeface()
 at System.Windows.Media.Typeface.get_CachedTypeface()
 at System.Windows.Media.Typeface.get_Symbol()
 at MS.Internal.TextFormatting.TextStore.FetchTextRun(Int32 cpFetch)
 at MS.Internal.TextFormatting.TextStore.FetchLSRun(Int32 lscpFetch, TextFormattingMode textFormattingMode, Boolean isSideways, Plsrun& plsrun, Int32& lsrunOffset, Int32& lsrunLength)
 at MS.Internal.TextFormatting.LineServicesCallbacks.FetchRunRedefined(IntPtr pols, Int32 lscpFetch, Int32 fIsStyle, IntPtr pstyle, Char* pwchTextBuffer, Int32 cchTextBuffer, Int32& fIsBufferUsed, Char*& pwchText, Int32& cchText, Int32& fIsHidden, LsChp& lschp, IntPtr& lsplsrun)
 --- End of inner exception stack trace ---
 at MS.Internal.TextFormatting.TextMetrics.FullTextLine.FormatLine(FullTextState fullText, Int32 cpFirst, Int32 lineLength, Int32 formatWidth, Int32 finiteFormatWidth, Int32 paragraphWidth, LineFlags lineFlags, FormattedTextSymbols collapsingSymbol)
 at MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
 at MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak)
 at System.Windows.Media.FormattedText.LineEnumerator.FormatLine(TextSource textSource, Int32 textSourcePosition, Double maxLineLength, TextParagraphProperties paraProps, TextLineBreak lineBreak)
 at System.Windows.Media.FormattedText.LineEnumerator.MoveNext()
 at System.Windows.Media.FormattedText.DrawAndCalculateMetrics(DrawingContext dc, Point drawingOffset, Boolean getBlackBoxMetrics)
 at System.Windows.Media.FormattedText.get_Metrics()
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.CodeLensInterLineAdornmentTaggerProvider.TextFormatCache.UpdateTextHeight()
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.CodeLensInterLineAdornmentTaggerProvider.TextFormatCache.EnsureInitialized()
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.CodeLensInterLineAdornmentTaggerProvider.CodeLensInterLineAdornmentTagger.GetTags(NormalizedSnapshotSpanCollection spans)
 at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__38.MoveNext()</description>
</entry>
我发现了一个问题。CodeLens坏了。如果我把它关掉,它就会工作。如何修复CodeLens?字体有问题(ActivityLog.txt显示了一些使用字体的方法)?
我修复了一个CodeLens。我开始通过CCleaner检查注册表错误并修复所有错误。
我遇到了类似的问题。使用wpf程序,如果你安装了一个非法的字体,使用字体错误,当我们使用属性框选择字体时,每个字体都会被使用,所以出现错误。
我发现了环境中的问题:
- win7 32(x86)
- .net4.5
- wpf
希望有人能彻底解决。