有时,当我制作 BUILD >重建解决方案时,我会收到错误:由于内部故障,他的构建意外停止,为什么?



这是代码:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.IO;
namespace CheatEngineMemoryScan
{
    public partial class Form1 : Form
    {

        List<string> Processes = new List<string>();
        public Form1()
        {
            InitializeComponent();
            Process[] processlist = Process.GetProcesses();
            foreach (Process theprocess in processlist)
            {
                string t = string.Format("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id);
                Processes.Add(t);
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
        }

    }
}

在此之前,我还有一些代码,我删除了它,我没有任何错误。但是一旦我做了重建解决方案>构建,我就会收到一个错误:

Error   1   The build stopped unexpectedly because of an internal failure.
Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe "C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe" launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded. If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with the MSBUILD_EXE_PATH environment variable.
   at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
   at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
   at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
   at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
   at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
   at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker) D:C-SharpScanScanScanScan.csproj   Scan

你显示的代码差不多了。编译没有任何问题,你只需要重新启动Visual studio。它将解决您的问题。

通常,当您遇到此类问题时,我会采取以下故障排除步骤:

  1. 尝试重新生成项目/解决方案
  2. 尝试"清理"您的项目/解决方案
  3. 重新启动视觉工作室
  4. 以管理员身份运行 Visual Studio

有关此问题的更多信息,请参阅以下链接

最新更新