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

时间:2013-10-02 14:39:24

标签: c# winforms

这是代码:

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)
        {

        }


    }
}

在此之前,我有一些更多的代码,我删除它,我没有任何错误。 但是,一旦我做了BUILD&gt;重建解决方案我收到一个错误:

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:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.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-Sharp\Scan\Scan\Scan\Scan.csproj   Scan

1 个答案:

答案 0 :(得分:0)

您显示的代码非常好。编译没有任何问题。您只需重新启动Visual Studio即可。它将解决您的问题。

通常,当您遇到这样的问题时,我会采取以下问题排查步骤:

  1. 尝试重建您的项目/解决方案
  2. 尝试“清理”您的项目/解决方案
  3. 重新启动Visual Studio
  4. 以管理员身份运行Visual Studio
  5. 有关此问题的详细信息,请参阅以下link