2

这是代码:

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 > Rebuild Solution 我得到一个错误:

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
4

1 回答 1

0

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

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

  1. 尝试重建您的项目/解决方案
  2. 尝试“清理”您的项目/解决方案
  3. 重新启动 Visual Studio
  4. 以管理员身份运行 Visual Studio

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

于 2013-10-02T14:47:24.257 回答