VS2010 Silverlight 4 loading wrong project module - vb.net

I have a sliverlight web application in VS2010. I have several projects in the solution,
one of them I use as a library of dialog boxes and other screens used in the other projects.
I edited one such dialog box, a child window, and added an extra row to the layout grid and
a combobox to the row. I rebuilt the soluition and my change appears in one sub-project but
not in another.
For the purpose of discussion here are the module names:
Manage - uses the child window 'add' in SilverlightClassLibrary2
Policy - uses the child window 'add' in SilverlightClassLibrary2
SilverlightClassLibrary2 - contains the child window 'add'
Note that this has been working for years until now.
My first indication of a problem was I could not hit a break point in Manage, it would
say no symbols loaded. I checked the references to SilverlightClassLibrary2 and they point
to the correct dll in the debug folder. A full recompile changes the date-time stamp of
the SilverlightClassLibrary2.dll everywhere. I deleted all dll's manually and re-compiled
and still manage has the old version of 'add' and policy has the new changes.
I'm at a loss as to where manage is getting an old copy of SilverlightClassLibrary2.dll
It is obviously looking somewhere else, this would also explain why the symbols are not
being loaded. It's not looking in the release folder, even so I re-compiled in release mode
to make sure it too had the changes. I deleted and re-added the reference (a project reference) to the SilverlightclassLibrary2.dll, still the same problem.
So where can I look to figure out what is going on with this?
SOLVED:
ahhhhhhh...it was chrome's browser cache that was giving me the old code.
As for the breakpoint issue, solved by using IE8 (i'm on xp) instead of chrome.

ahhhhhh...it was chrome's browser cache. I cleared it and now I see my changes.
Still can't hit the break point in chrome (no symbols loaded for some modules) even after clearing chrome's cache, but the breakpoints do work in IE8.
There was a suggestion to look at debug -> windows -> modules and locate the errant module and manually load symbols - but the module I want is not listed even though I navigate my app to the page in question. I use a line like this:
dim cw as new SilverlightClassLibrary2.Add
to create the child window, so perhaps this does not show up in the module list when using chrome? In IE8 the SilverlightClassLibrary2 module does show up in the list. strange.

Related

Values cannot be null. (Parameter 'baseName')

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.

Debug Design Mode in Visual Studio not breaking

So I am currently unable to open a Form and get the following error:
System.ComponenetModel.Design.ExceptionCollection was thrown.
or:
The designer loader did not provide a root component and has not indicated why
Usually the way to solve this is to open another instance of Visual Studio with the same project, attach the debugger to the other Visual Studio and try to open the form.
However, that does not seem to be working. The debugger does not break when the error is hit, and attempting to 'Break All' at any other point does not show me the source code and just the screen saying:
Your app has entered a break state, but there is no code because all threads were executing external code (typically system or framework code).
Attempting to put break points also results in:
The breakpoint will not currently be hit. No symbols have been loaded for this document
Am I missing a setting? Incorrect Setup?
I have been battling this for half a day and thoroughly search the interwebs with no luck thus far. My designer is also fairly complex and lengthy which means trial and error is an absolute last ditch option.
First attempt to resolve:
you may have tried it already. Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution.
Do a rebuild of the solution and try to debug again.
Second attept to resolve:
Start debugging, as soon as you've arrived at a breakpoint or used
Debug > Break All, use Debug > Windows > Modules. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.
In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe. The bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.
third attept to resolve:
Disable the "Just My Code" option in the Debug/General settings.
there are might be other causes to your problem, i picked them from here. you may try other solution to try resolve your issues. Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."

Save Aptana Studio 3 project explorer state on close

I'm sure there is a simple option for this but I have as yet been unable to find it. Every time I close and reopen Aptana Studio 3 it collapses all the folders in the project explorer and I have to reopen them all, is there a way to get it to leave them open and save the project explorer's state when I close the program?
Thanks.
I cannot find any way to keep the state of the Project Explorer. However, using the App Explorer, the state of your open folder will be preserved. You can also try the "Navigator" which looks just like the Project Explorer, but appears to keep state. I will add the proviso to that: It kept state when I restarted aptana, but it also developed a GUI glitch where it appears to be scrolled to the right so I only see the right half of all of my file names and I cannot fix it, so this may not be a good option if you get the same glitch.
There is also a method which does not do quite what you ask, but may be a good fix for you anyway. If you click "Link with Editor" picture (two yellow arrows) in the Project Editor, it will automatically expand your project hierarchy to match whichever open file you have active. Since your files stay open when you close Aptana, this would keep the Project Explorer expanded to whatever you are looking at even on restart. See this question
You can also set up working sets for various parts of your code that are buried in the hierarchy and use the Project Explorer to show those working sets instead of you projects. This does not save state, but it does give you easy access to common parts of your code that may be deeply buried.
Hope one of these helps you.

Custom control disappears from object browser

My question is on how custom controls should be updated.
I downloaded this owner drawn custom control, which I built, then copied the DLL to the Debug folder of the project and loaded it into the toolbox from there.
I decided to use this button on another project. I was mildly surprised to see the control was still in the toolbox but it seemed to work just fine. I decided to change this custom button's behavior. The button in the toolbox referenced the old version number. So I deleted it and loaded the newly rebuilt DLL.
Now come the problems. The first application--the one where the DLL was added to the toolbox from--still runs okay, but the second application is throwing errors, saying, Type 'CButtonLib.CButton' is not defined. When I add the button to a form, it appears okay. I can change its properties and it shows up in the code windows and in the object browser. But as soon as I try to run it and it throws the errors, it no longer appears in the object browser. References in the code window lose their intellisense.
Things I've tried include:
Copying the DLL to the project's debug and release folders and loading them into the toolbox from there.
Removing it from the toolbox altogether and just adding a reference then copying and pasting a button directly from the first project.
Copying in a form with a CButton on it from the first project.
Scouring the internet for answers
Swearing at the computer.
Nothing seems to work and I've now spent over a day trying to solve this.
I never did get to the bottom of this. In the end I simply had to recreate the entire custom control project using a different name. I suspect the way I added the original project to the toolbox of a different program – as opposed to adding it within the test project it came with – may have had something to do with it, but that's just a guess. Anyway, I can amend and update the new control without problem now, so all's well that ends well. :-)

Remove Configuration from VB2005 application

On the compile tab of the project properties:
If you look at the configuration dropdown it typically shows debug/release/active/all.
I attempted to add another option at one point in the build->configuration manager window, but decided that I didn't want to keep it. I removed it there, but it keeps showing up in the dropdown on the properties, as well as generates a folder by that name.
Does anyone know how to remove this? I can't find any "delete" or otherwise options.
You likely just removed it at one level. Check the configuration manager on your Solution, and then on each of the projects within the Solution, and make sure it's removed from each.
(By going to the drop down, clicking , then remove just as you did before)