Ошибка компиляции: warning MSB3026 - C#
Формулировка задачи:
Выдало VS12 ошибку:"1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3390,5): warning MSB3026: Не удалось скопировать "obj\Debug\Program5_Upr.exe" в "bin\Debug\Program5_Upr.exe". Начинается повторная попытка 1 в 1000 мс. Процесс не может получить доступ к файлу "bin\Debug\Program5_Upr.exe", так как этот файл используется другим процессом."
Очень странно для меня, всё доп окна закрыты, код рабочий, запускался, удалил пару пробелов в цикле и стало ошибку выдавать. Пробовал вернуть всё назад и перезапустить VS не помогло, можете подсказать почему так происходит?
Form1.cs
Form1.Designer.cs
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 Program5_Upr
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{ int i=0;
while (i == 0)
{
for (int c = 0; c < 253; c++)
{
this.BackColor = Color.FromArgb(c, 253 - c, c);
Application.DoEvents();
System.Threading.Thread.Sleep(4);
}
for (int c = 253; c > 0; c--)
{
this.BackColor = Color.FromArgb(c, 253 - c, c);
Application.DoEvents();
System.Threading.Thread.Sleep(4);
}
}
}
}
}namespace Program5_Upr
{
partial class Form1
{
/// <summary>
/// Требуется переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// Обязательный метод для поддержки конструктора - не изменяйте
/// содержимое данного метода при помощи редактора кода.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.AutoSize = true;
this.button1.BackColor = System.Drawing.Color.White;
this.button1.Location = new System.Drawing.Point(134, 84);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(112, 99);
this.button1.TabIndex = 1;
this.button1.Text = "Нажми меня";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(386, 284);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "My Programm";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
}
}
Что-то совсем беда...
Может кто-нибудь помочь?
Да чтож такое....Перенёс программу, первый раз запустила, всё ок, повторно запускаю, ошибка....Что происходит, видимых окон доп не открыто....
Решение задачи: «Ошибка компиляции: warning MSB3026»
textual
Листинг программы
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 Programm_4_Color
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
while (Visible)
{
for (int c = 0; c < 254 && Visible; c++)
{
this.BackColor = Color.FromArgb(c, 255 - c, c);
Application.DoEvents();
System.Threading.Thread.Sleep(4);
}
for (int c = 254; c >= 0 && Visible; c--)
{
this.BackColor = Color.FromArgb(c, 253 - c, c);
Application.DoEvents();
System.Threading.Thread.Sleep(4);
}
}
}
}
}