I accidentally uploaded an image to "My resources" which had the same name as another image in my resources and since then VB is showing up over 100 errors, but I don't know what I can do to resolve it and restore the program?
It's a very large program that I have been working on for months and really don't want to have to restart!
I have looked online and even found posts on here, but it doesn't work.
I have deleted the repeating image name, in my resources, but still doesn't resolve it. Whenever I go onto "My Project" > "Resources" it comes up with "There is already another resource with the name "Back_button."
But I removed it?
This is the error that comes up for all of the images/items that were in my resources:
"Beach_Text" is not a member of 'Top_of_the_Class.My.Resources'.
I also have a warning:
The designer cannot process the code at line 74: Me.btnInstructions.Image = Global.Top_of_the_Class.My.Resources.Resources.Instructions_button
The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.
I hope this makes sense and I know others have asked similar questions, but I have tried them methods. I just want my program back :(
Many thanks.
I had the same problem. I didn't wanted to restart my whole program and also I didn't used version control. If I went to the resources tab there was an error saying: There is already another resource with the name "Donkey_Kong". I pressed on ctrl-shift-F and searched for Donkey_kong and deleted every posible resource and code with the name Donkey_Kong in it. After I did that the error dissapeared and it was solved.
I had a picture with the name Donkey_Kong and a sound file with the name Donkey_Kong. Changed the names and continued :)
I had the same problem ("There is already another resource with the name "Salary")
Removed two lines of codes with the same resource name and
I went to Project--->Properties of my project--> went to resources tab and DELETED all files/images... with the same name "Salary" and the problem was fixed (All my codes were still there)
Related
When trying to open the form deisgn it says values cannot be null. (Parameter 'baseName'). I still can run the system without error. Dont know how to fix it and have to change some gui design. Help me its for my school tnx
I had this problem this morning and a few hours later I decided to just start over and copy the code from the old project to the new empty project. Everything is working in the new copy of the project. I copied from old to new by drag-n-drop. I copied all the UserControls before I copied anything that uses them, and built, then copied over the remaining things, and went through all the errors caused by the change in name of the top-level Namespace.
(All of the Namespace errors were in the .Designer.vb files. I have posted elsewhere "never edit those files by hand unless you know what you are doing." This case was one of the rare exceptions.)
I had the OP's problem that when I tried to open a Form in the designer, I got the message
Value cannot be null. (Parameter 'baseName')
It didn't matter if I tried to open the Form in Solution Explorer or by pressing Shift-F7 in the Form's code window. However, sometimes Shift-F7 resulted in a wait cursor followed by silence - no error message.
Like the OP, the project did run without errors (well, same bugs as before but you know what I mean).
Another symptom: If I launched VS and tried to open the Form designer before Intellisense was initialized, instead of the other error, the window that should show the layout of the Form showed this instead:
File path: full path of the file I was trying to open
Frame GUID: 2c01570-c72c-11d0-88c3-00ac0c9110049
Frame mode: VSFM_MdiChild
Error code: 0x80131500
There are no MDI containers in my project. It's a reference to VS 2019.
The same error occurred in every Form and UserControl in the project.
The same error occurred in any new Form or UserControl that I added to the project.
The error did NOT OCCUR in any and all other projects built in VS 2019 with a target of .Net 5.0
The error DID OCCUR with the same project on another machine running a clean install of a later version of VS 2019.
Attempts to Clean Solution or Clean Project failed, with a generic error message, it was something like "Clean Project failed."
Nothing about these problems appeared in any event logs.
Every time the problem happened, when I shut VS, one process was left running (per TM).
Here are some other things I did to try to suss it:
Ran a repair install on VS 2019 and reboot.
Opened each and every VS-generated file in another project and compared them line-for-line (most are text) against the corresponding files in the broken project. No data-independent differences.
Searched exhaustively with 3 search engines and many terms for someone else that posted about this error. This is the only post I found.
Deleted, renamed, or moved files that are automatically generated by VS, including some Json files, XMLs, and caches.
What I did not try:
Roll back the code to the most recent commit.
Uninstall VS 2019 completely, reboot, install VS 2019 as if an initial installation.
Just had the same experience. I took me a while before I got everything to work again, but the clue in my case was that I had added a new item to my project, and for some reason I had managed to delete the file name in the process so the only thing left was 3 new files with only the extensions .resx, .cs and .Designer.cs
I quickly deleted the ".cs" file but forgot the rest.
Suddenly I was unable to open my main form in the designer - and the “Value cannot be null. (Parameter 'baseName')” started to appear. It was only affecting my main form.
I tried almost everything described above except the reinstalling part.
But then I deleted ".Designer.cs" and ".resx" from within visual studio (Solution Explorer), and then the problem went away.
I started getting this error after using a hack to support generics forms (e.g. MyForm). The designer generated a file:
MyForm.resx
which worked for design time (even with the form being generic) but crashed at runtime. My hack was to rename the .resx file:
MyForm`1.resx
However that is when the Designer stopped working. It stopped working for ALL forms/user controls in entire solution (not just the generic I was experimenting with). I assume there is some kind of process that crawls all the resx files whenever you open any Designer and that is the source of the Exception.
I was able to work around the issue by:
Renaming the resx back to its non generic title (i.e. MyForm.resx)
Restarting visual studio.
I've made a program for my assingment, and code it entirely from home. Obviously I need to submit it and work on it from college, i've got about 13 hours until it's due and I cannot for the life of me figure out what these errors mean, I'm guessing its something to do with the paths of the files. To make it clear, the program does not open and it is not the original copy. I do have other copies and I have tried the same approach with the exact same luck. Thank you in advance.
Okay, an update. As I said, I copied it from home, and pasted it in the folder location that it is calling below, however, it's calling an older version of the game which has no relevence to the game(number guessing game), from a location two files up from the actual vb files. Is there a way i can change what the project opens?
In your second picture just drag 'Form1.vb' to the solution Explorer. That way it can recognize your form. I have encountered this problem before and I just did what I said above.
Mediocre VB.Net student here, but not a total noob. I've been getting this error: "The source file is different from when the module was built. Would you like the debugger to use it anyway?"
I chose Form1.vb on the "Find Source: Form1.vb" open file dialog box that followed. After that, my program has been acting very weirdly. For example, I have codes inside the sub that handles Button1 click, and then I moved those codes somewhere. Now when debugging, when I click that button, it executes the codes that I just removed a minute ago!
I'm scared because I don't to waste the 2 months of hard work that I've already spent on this project. Too friggin stupid to remember to backup the whole thing. Stackoverflow, please don't fail me now.
As you have explained i think the scenario is your modified code is not build correctly.. once rebuild the entire solution.
Please be sure work in debug mode, and then try Clean solution and then "Rebuild All".
refer following links may also help you..
the source file is different from when the module was built
Warning given when debugging source code in visual studio 2010
I was working on a Form and then Access crashed. When I tried to open it, I was prompted with an error which I didn't recognize how to fix right away. Something like
Form1 doesn't exist , if the invalid form name is in a macro ...
At the time, I couldn't figure it out, so I hit "Compact and Repair", closed and re-opened access a few times. Then there was another message, don't exactly remember but soemhting like "To continue, all VBA code must be deleted." I said Ok, because I have a few back up copies. But that didn't fix anything.
Then I figured out how to fix the original error. "Form1" was my default form to open on startup, so I changed it. So everything works, I copy the code back in, but obviously the code doesn't work. The error message is:
Compile Error user defined type
on the DAO.QueryDef
Then I follow MS Help and check the references, and when I click on Tools -> References, I get
Error acessing the System Registry.
So, any thoughts that include not messsing with the Registry?
Ok, so the real problem was the
Compile Error: User-Defined Type Not Defined
iDevelop was right, the file was corrupted. I had to make a new access file (they were .accdb not .mbd , but some concept), and import all objects without the code.
To make sure wasn't corrupted, I copy pasted it into Notepad first, and then into the new file. (Just as an extra precaution). And then it worked.
I am still getting the error:
Error accessing the System Registry.
when I go into Tools-> references,
but, I think it is probably related to my permissions, so maybe it is intended.
I get intermittent errors in my log files
System.Web.HttpException
Message: The file '/Stylesheet.aspx' does not exist.
I dont have this file in my code base. This error seems to be caused by .net not by any user trying to directly access this file.
Any thoughts?
I might start by using WinGrep on my project, and see where that text shows up in my code. Once you find it you will probably know what to do to fix it.
Maybe some DLL or custom control you've lost track of is trying to load this whenever its parent is loaded?
You could use VS or a tool like SadMan Search to do a quick search of all text within all files in the code base to see where it's being referenced and find the "source".