הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Question
Tuesday, October 19, 2010 8:06 PM | 1 vote
Hello,
I added a table to my program and it generated two errors and not it will not build. I have added quite a few tables and this has never happened before. The reeors are:
1. public sub new ' has multiple definitions with identical signatures
2. 'Protected Overrides Sub OnCreateMainForm()' has multiple definitions with identical signatures.
I have deleted the table that I added and tried undoing everything having to do with it but nothing works.
Can you tell me how to fix this proble so the the program will build
Thank you,
Dan
All replies (8)
Tuesday, August 23, 2011 5:03 AM ✅Answered | 3 votes
Hello DanFSD,
I had the exact same issue. It happened when I moved my project file from Windows 7 development PC to a pc running Win XP Pro. However or why ithappened, I dont know, but what I did was delete the duplicate file(Application1.Designer.vb), then before trying to build again, I chose to clean solution, clean project, then rebuild solution, then rebuild project, then tried to buikd, and it worked perfectly with no errors.
Kevin
Tuesday, October 19, 2010 9:13 PM | 1 vote
read through your code. there must be at least 2 sub new's with identical signatures as it says. i.e.
public sub new()
end sub
+
public sub new()
end sub
have identical signatures, as do
public sub new(parameter as object)
end sub
+
public sub new(parameter as object)
end sub
+ the same applies to your OnCreateMainForm sub
if you doubleclick the error in the error window it'll take you to the error in your code
Tuesday, October 19, 2010 11:01 PM
Hi Paul,
I don't see any duplicates. Below is the code on Application.Designer.vb. The error messages link to the lines where I have highlighted in red with squigly underline. I was going to attach a screen shot but can't see how to attach a file.
Thanks for the help.
Dan
'
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.3615
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.IBC_2006.Form2
End Sub
End Class
End Namespace
Wednesday, October 20, 2010 2:52 AM
Hello,
I have now found that there are now duplicates of Application.Designer.vb under Application.myapp. One is named Application.Designer.vb and the other is named Application1.Designer.vb. If I comment out the code on one of them them build works without errors.
However, if I delete one of them, I get a warning "The custom tool Application.Designer.vb failed while processing the file 'My Project.Application.myapp." but it still builds.
If I click on the warning, a messsage window appears with "The last attempt to run the custom tool 'My Project.Application.myapp' failed. Would you like to re-run the custom tool?" If I click NO, the program builds. If I click YES, it adds the duplicate Application1.Designer.vb again the the errors are back.
I am running VB.net 2008. Can you tell me how to eliminate the errors and the warning?
Thank you,
Dan
Tuesday, September 15, 2015 1:11 AM | 1 vote
hello.
I know this is posted years ago. But I got the same error And my solution is to delete the
Application.Designer.vb and not the Application1.Designer.vb
you can find that in solution Expoler >> My Project >> Application.myapp >> ...
and also I deleted the last thing that I made in my vb Project,
i posted this because I didnt find any answer of my problem and then I just experiment on my own. hehe
hope this help
Tuesday, January 24, 2017 11:46 PM
I really really thank you so much Joievv and appreciate you help.
you saved a project of 8 months.
Thanks again :)))
Friday, May 11, 2018 9:37 PM
This is years ago now but I had the same problem. Based on your suggestion I did a Clean and then a Rebuild and it fixed the issue for me.
Thanks!
Tuesday, November 5, 2019 7:36 AM
What I did was open myProject.vbproj in notepad and remove all tags that include Application.Designer.vb on it, I remove 2 tags in all. Since I am using VS 2019 and I can't find Application.app in the explorer.