slentz

Ok so I am writing a prototype of a program for school. The program does not have to be fully functional. The program only needs to be able to open new forms and they must have a working exit function. I am receiving an error about the manifest resource name. The error states Resources 'Form1.resx' and 'FrmMain.resx' have the same manifest resource name 'slentz.menus.FrmMain.resources'.

I have looked over the code many times and can't seem to find what could be the problem. Any help is greatly appreciated. Thank you in advance.

Here is the code:

using System;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;

namespace slentz.menus

{

/// <summary>

/// Summary description for Form1.

/// </summary>

public class FrmMain : System.Windows.Forms.Form

{

private System.Windows.Forms.MainMenu mainMenu1;

private System.Windows.Forms.MenuItem menuItem1;

private System.Windows.Forms.MenuItem mnuExit;

private System.Windows.Forms.MenuItem menuItem5;

private System.Windows.Forms.MenuItem menuItem6;

private System.Windows.Forms.MenuItem mnuFindCustomer;

private System.Windows.Forms.MenuItem mnuLogOn;

private System.Windows.Forms.MenuItem mnuLogOff;

private System.Windows.Forms.MenuItem mnuAddCustomer;

private System.Windows.Forms.MenuItem mnuDeleteCustomer;

private System.Windows.Forms.MenuItem mnuEditInvoice;

private System.Windows.Forms.MenuItem mnuNewInvoice;

private System.Windows.Forms.MenuItem mnuFindInvoice;

/// <summary>

/// Required designer variable.

/// </summary>

private System.ComponentModel.Container components = null;

public FrmMain()

{

//

// Required for Windows Form Designer support

//

InitializeComponent();

//

// TODO: Add any constructor code after InitializeComponent call

//

}

/// <summary>

/// Clean up any resources being used.

/// </summary>

protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Dispose();

}

}

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FrmMain));

this.mainMenu1 = new System.Windows.Forms.MainMenu();

this.menuItem1 = new System.Windows.Forms.MenuItem();

this.mnuLogOn = new System.Windows.Forms.MenuItem();

this.mnuLogOff = new System.Windows.Forms.MenuItem();

this.mnuExit = new System.Windows.Forms.MenuItem();

this.menuItem5 = new System.Windows.Forms.MenuItem();

this.mnuAddCustomer = new System.Windows.Forms.MenuItem();

this.mnuFindCustomer = new System.Windows.Forms.MenuItem();

this.mnuDeleteCustomer = new System.Windows.Forms.MenuItem();

this.menuItem6 = new System.Windows.Forms.MenuItem();

this.mnuNewInvoice = new System.Windows.Forms.MenuItem();

this.mnuEditInvoice = new System.Windows.Forms.MenuItem();

this.mnuFindInvoice = new System.Windows.Forms.MenuItem();

//

// mainMenu1

//

this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {

this.menuItem1,

this.menuItem5,

this.menuItem6});

//

// menuItem1

//

this.menuItem1.Index = 0;

this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {

this.mnuLogOn,

this.mnuLogOff,

this.mnuExit});

this.menuItem1.Text = "Application";

//

// mnuLogOn

//

this.mnuLogOn.Index = 0;

this.mnuLogOn.Text = "Log On";

this.mnuLogOn.Click += new System.EventHandler(this.mnuLogOn_Click);

//

// mnuLogOff

//

this.mnuLogOff.Index = 1;

this.mnuLogOff.Text = "Log Off";

//

// mnuExit

//

this.mnuExit.Index = 2;

this.mnuExit.Text = "Exit";

this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);

//

// menuItem5

//

this.menuItem5.Index = 1;

this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {

this.mnuAddCustomer,

this.mnuFindCustomer,

this.mnuDeleteCustomer});

this.menuItem5.Text = "Customer";

//

// mnuAddCustomer

//

this.mnuAddCustomer.Index = 0;

this.mnuAddCustomer.Text = "Add Customer";

this.mnuAddCustomer.Click += new System.EventHandler(this.mnuAddCustomer_Click);

//

// mnuFindCustomer

//

this.mnuFindCustomer.Index = 1;

this.mnuFindCustomer.Text = "Find Customer";

this.mnuFindCustomer.Click += new System.EventHandler(this.mnuFindCustomer_Click);

//

// mnuDeleteCustomer

//

this.mnuDeleteCustomer.Index = 2;

this.mnuDeleteCustomer.Text = "Delete Customer";

this.mnuDeleteCustomer.Click += new System.EventHandler(this.mnuDeleteCustomer_Click);

//

// menuItem6

//

this.menuItem6.Index = 2;

this.menuItem6.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {

this.mnuNewInvoice,

this.mnuEditInvoice,

this.mnuFindInvoice});

this.menuItem6.Text = "Invoice";

//

// mnuNewInvoice

//

this.mnuNewInvoice.Index = 0;

this.mnuNewInvoice.Text = "New";

this.mnuNewInvoice.Click += new System.EventHandler(this.mnuNewInvoice_Click);

//

// mnuEditInvoice

//

this.mnuEditInvoice.Index = 1;

this.mnuEditInvoice.Text = "Edit";

//

// mnuFindInvoice

//

this.mnuFindInvoice.Index = 2;

this.mnuFindInvoice.Text = "Search..";

//

// FrmMain

//

this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);

this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));

this.ClientSize = new System.Drawing.Size(358, 143);

this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;

this.Menu = this.mainMenu1;

this.Name = "FrmMain";

this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

this.Text = "Volksport Audimotive";

}

#endregion

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main()

{

Application.Run(new FrmMain());

}

private void mnuExit_Click(object sender, System.EventArgs e)

{

this.Close();

}

private void mnuLogOn_Click(object sender, System.EventArgs e)

{

FrmLogOn form;

form = new FrmLogOn();

form.Show();

}

private void mnuAddCustomer_Click(object sender, System.EventArgs e)

{

FrmAddCustomer form;

form = new FrmAddCustomer();

form.Show();

}

private void mnuDeleteCustomer_Click(object sender, System.EventArgs e)

{

FrmDeleteCustomer form;

form = new FrmDeleteCustomer();

form.Show();

}

private void mnuNewInvoice_Click(object sender, System.EventArgs e)

{

FrmNewInvoice form;

form = new FrmNewInvoice();

form.Show();

}

private void mnuFindCustomer_Click(object sender, System.EventArgs e)

{

FrmFindCustomer form;

form = new FrmFindCustomer();

form.Show();

}

}

}




Re: Visual C# Express Edition Files with same manifest resource name

Figo Fei - MSFT

Hi,

To resolve this error, rename the affected resource files. Thank you






Re: Visual C# Express Edition Files with same manifest resource name

slentz

I tried to rename the affected resource files but this did not solve the problem. Please help!!



Re: Visual C# Express Edition Files with same manifest resource name

slentz

I copied the code over to a new form and the issue was resolved. Thanks for your help!