0

我遇到了一个问题,我似乎无法在本网站的任何地方找到解决方案。也许我只是在搜索错误的术语,所以现在我通过一个直接的问题把它交给你有能力的人。这里是:

每当我使用 Visual Studio 2012 Ultimate 制作应用程序并进行调试构建或发布构建然后尝试在 IDE 外部运行时,它会在大约 5 到 15 秒后崩溃,而不会显示任何错误消息/异常。我已经尝试过使用 C# 和 VB 应用程序。据我所知,我所有的 .NET 框架都是最新的。我在 VS2012 Ultimate 之前安装了一个 Visual Studio 2008 Professional 实例,一切正常。安装 VS2012 Ultimate 后,我创建的任何东西都无法正常运行。从那以后,我卸载了 VS2008 Professional 和 VS2012 Ultimate,运行 CCleaner,然后完全重新安装了 VS2012 Ultimate。问题仍然存在。另外,我的一个朋友带来了一个 .exe(他没有 .

我正在运行 64 位 Windows 7 家庭高级版。可以提供的任何帮助表示赞赏。

为简单起见,我创建了一个空白表单,代码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

    namespace Spoon
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
        }
    }

非常感谢大家的帮助。

更新 ** 这是 VS2012 Ultimate 运行时即时窗口的输出。

构造此框架的内容时遇到异常。此信息也记录在“C:\Users\GoombaMaster\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml”中。

Exception details:
System.IO.FileNotFoundException: Unable to find the specified file.
   at MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr)
   at MS.Internal.Text.TextInterface.FontFace.TryGetFontTable(OpenTypeTableTag openTypeTableTag, Byte[]& tableData)
   at MS.Internal.FontCache.FontFaceLayoutInfo.GetFontTable(OpenTypeTableTag openTypeTableTag)
   at MS.Internal.FontCache.GsubGposTables..ctor(FontFaceLayoutInfo layout)
   at MS.Internal.FontCache.FontFaceLayoutInfo.ComputeTypographyAvailabilities()
   at System.Windows.Media.Typeface.CheckFastPathNominalGlyphs(CharacterBufferRange charBufferRange, Double emSize, Double scalingFactor, Double widthMax, Boolean keepAWord, Boolean numberSubstitution, CultureInfo cultureInfo, TextFormattingMode textFormattingMode, Boolean isSideways, Boolean breakOnTabs, Int32& stringLengthFit)
   at MS.Internal.TextFormatting.SimpleRun.CreateSimpleTextRun(CharacterBufferRange charBufferRange, TextRun textRun, TextFormatterImp formatter, Int32 widthLeft, Boolean emergencyWrap, Boolean breakOnTabs)
   at MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, CharacterBufferRange charString, TextRun textRun, Int32 cp, Int32 cpFirst, Int32 runLength, Int32 widthLeft, Int32 idealRunOffsetUnRounded)
   at MS.Internal.TextFormatting.SimpleTextLine.Create(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth)
   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 System.Windows.Media.FormattedText.get_Height()
   at Microsoft.VisualStudio.Text.Formatting.Implementation.TextInfoCache.GetTextInfo(TextRunProperties key)
   at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedTextSourceFactoryService.Create(ITextSnapshot sourceTextSnapshot, ITextSnapshot visualBufferSnapshot, Int32 tabSize, Double baseIndentation, Double wordWrapWidth, Double maxAutoIndent, Boolean useDisplayMode, IClassifier aggregateClassifier, ITextAndAdornmentSequencer sequencer, IClassificationFormatMap classificationFormatMap, Boolean isViewWrapEnabled)
   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight, Boolean preserveViewportTop)
   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot)
   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Initialize()
   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextEditorFactoryService.InitializeTextView(IWpfTextView view)
   at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Init_InitializeWpfTextView()
   at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Init_OnActivation()
   at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Microsoft.VisualStudio.TextManager.Interop.IVsCompoundAction.OpenCompoundAction(String pszDescription)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()

我希望这能有所帮助。

4

1 回答 1

0

似乎对我所有的 .NET 框架进行了简单的修复就解决了这个问题。它让我相信被引用的 .dll 需要被删除和修复!看来我不能投票赞成评论,但如果可以的话,我会的。

于 2013-07-02T03:25:32.257 回答