VS runs old version of Silverlight application instead of new one - silverlight

I've got a problem with Silverlight, or maybe more with VS2010 Ultimate. I was fooling around playing with it, when in one moment a fix that I wrote didn't fix anything. Investigating why I found out that VS is not running the new version which it just compiled, but rather an old version of application - that's why my changes don't affect it. How to fix it, and what can be the source of the problem? Maybe project configuration file got corrupted or there's something wrong with ASP.NET dev server?

Have you look at the output window? Sometimes it gives errors that aren't listed in the Error List.
Side note: I didn't see you mentioning extra libraries, but I've had this happen when a change I was making in a library wasn't reflected in another Silverlight application. For whatever reason, when I was adding a reference to the library it was copying it to the debug directory of my project and only using that version (Specific Version was off). if you're using custom libraries, you can try deleting the references and re-adding them (this works, a more permanent solution is to add the library to the solution and add it as a project reference).

I've resolved the problem which I had. The thing I did is just painfully simple - I cleared browser's cache :P

Related

Loading multiple word addins with CefGlue targetting different version of chromium?

We have a situation with word addins where we try to load our taskpane and use cefglue implementation to show web page. We use cefglue for the same. We just discovered that one of the vendor addins also loads chromium but an older version. Unfortunately our addin shows a message that it cant load chromium due to hash difference.
Now is it possible that 2 COM addins can load different version of chromium? The vendor change looks unlikely and I could see they don't use cefglue or cefsharp but have their own implementation. Has anyone in this situation before? We are thinking of moving our code base to use same version as theirs but again when they upgrade, we have to upgrade and we will have a window where this fails due to incompatible version. thanks
It seems there is no easy answer to this problem as word / excel can load only one libcef dll in memory. The redgate apphost could be a possible solution and I added a link to cefsharp remoting repo which I am still trying to make work but has some readymade code and could be a good starting point for someone trying to do the same thing. Best of luck and thanks #amaitland for pointers.

Visual Studio hangs when adding forms or opening designer

I have a major problem with a Winforms application with a large number of projects. VS 2019 threw an exception and closed a few days ago, and on reopening restored two files since then I have been unable to:
Add a new form to the vast majority of projects, whether the most basic MS template or not
Open the designer for any form that is already in the vast majority of projects
Access the navigation bars (the three combo boxes at the top of the VS work area that normally contain the project, namespace and content information) on any class referencing to WinForms in the vast majority of projects
When trying to do either of the first two things an 'Opening File' message is shown endlessly. If you try to do anything, a notification is shown that Visual Studio is busy, and that Microsoft will be notified but nothing else happens and you can only get out by using the Task Manager to kill all VS tasks.
In the case of the third one, a message is shown saying 'Refreshing Navigation Bars' but again it goes on forever. However, in this case you can click the Cancel button to cancel the loading attempt.
The navigation bars issue I believe is Resharper related. In addition CodeLens is not working at all, so the space for the number of references is generated but there is no content. This is true for ALL files in the solution, not just the form related ones.
Here is what I have tried so far:
Cleaned and Rebuilt the solution - works fine but no difference
Built and deployed the solution - works fine
Deleted the SUO file and reset
Cleared the Resharper caches
Disabled Resharper
Performed a repair install of Visual Studio
Created a new Solution and added forms etc. which was unaffected and worked fine
Opened a different solution which was also working fine
Tried the same processes with a Project in the same solution that is not part of the application (TestBed) and that works fine too, but is the only project that does
Can anyone suggest where to look now? Since new and existing solutions work OK except for this one I am assuming that it is something Solution related rather than something related to VS itself, but I have no idea what that might be. For example, what is it trying to do when it says 'Opening File' (apart from the obvious - opening a file :-)) and what could cause that to fail? Am I looking for something in the Solution file, or could it be something else?
All suggestions and assistance towards resolving this issue would be gratefully received.
Thanks to Jasimov for the only response, I appreciate your attempt to help.
I have now resolved the issue using the following steps:
Uninstall Visual Studio 2019 Community Edition
Perform a fresh install of Visual Studio 2019 Professional
Reload the main solution
Clean the solution
Rebuild the solution
Deal with some issues that were highlighted in the Output and Errors, none of which were directly forms related
Rebuild the solution
Run the application and ensure it runs as expected
Go back and select forms at random and try opening them. All now work as expected.
In addition CodeLens is now working not only properly but actually better than before giving more information more quickly. On the other hand, I have not yet reinstalled Resharper which will be the next step.
I have included all the steps I took just in case anyone else has a similar problem. I have not been able to find this exact issue anywhere else in my searches so I hope it helps someone.
UPDATE: I have since re-installed Resharper with no problems and the designers are all working fine so now back into full flow!
I had a similar issue with the web forms designer in VS2019 hanging as soon as I clicked on anything on the design surface. The same projects were OK in VS2017. Uninstalled VS2019, rebooted, reinstalled VS2019, found that the designer was now working OK. Progressively added back 3rd party toolbox components, one VSIX, and the .Net 4.8 targeting pack. Still working. Thanks for your hint about the reinstall.

How to edit Silverlight toolkit 5

I recently discovered memory leaks in our Silverlight application and I have managed to find the source - Context Menu. From what I have searched this is a known issue and there are patches available to fix this. I downloaded the Silverlight ToolKit Source Code and made changes to the class I was having issues with and copied the new DLL to the Silverlight5.0 folder in program files but now I am get XAML Parse Exception errors. I understand this is due to one library being from a different source.
But how do i fix it? I have tried changing references but that didn't help. I tried going back by re-installing Silverlight 5 toolkit but I still get the error.
I haven't found a proper article yet on how to edit and use Silverlight toolkit source code.
why dont you just add 'Silverlight ToolKit Source Code' as another project in your solution and link it to your main project by reference ? parse exception can occur by you messing something up or the toolkit may be a bit buggy too but with attached toolkit as a project you can edit and try easily, quickly and you will not be influencing other apps using silverlight
I had the same problem. I think you didn't copy all used *.dll from the new built toolkit solution into your working project.
I mean, you have to check all references of your working project, all references depending on the toolkit solution have to be renewed to your newly built toolkit project.
The problem is that there are some *.dll's which are linked to each other, when you replace only one of them, the compiler can't ind the other one.
Build entire toolkit solution
Delete old references in your working project
Place all used *.dll's from the toolkit solution into your project
Add new references
Build

Why does VS.NET attempt to include Microsoft.Windows.Design.Extensibility for WPF and ClickOnce?

I built a WPF application in VS.NET 2008 using ClickOnce deployment. It ran great on any machine that had VS.NET installed, but my business users received an error: "Unable to install or run the application. The application requires that assembly Microsoft.Windows.Design.Extensibility Version 3.5.0.0 be installed in the Global Assembly Cache (GAC) first."
I was surprised to discover that this dll is not part of the standard .NET 3.5 SP1 client installation, but somehow, my application thought it was needed. I checked my Publish tab for the project and it showed up as a prerequisite.
Oddly enough, I was able to just remove this (and all of the other Microsoft.Windows.Design.* dlls) and it just worked everywhere. I removed them from my project entirely, and everything was fine.
Can someone explain why the VS.NET 2008 project wizard forced these to be included in the project, and more importantly, why ClickOnce thought they needed to be on the client machine to run?
This is just a curiosity question, but I'm sure I'm not the first to be bitten by it. Hopefully, this post will at least save someone else the headache.
Try to remove all references to *.Design.dll. In my case it was WPFToolkit.Design.dll.
This is old and the OP is gone, but I ran into this today, so I thought I'd mention that my solution was removing a reference to one of the WPFToolkit references that ends with .Design.
I had referenced System.Windows.Controls.Input.Toolkit, but also had a reference to System.Windows.Controls.Input.Toolkit.Design, which should not have been there. Removed it, and all was right with the world again.
A way to find out the code that is loading the assembly is explained here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/755272f6-0e79-4a6d-ae50-4412d0f2bc4c
I found that I was using the SelectionCommands.Clear property which is inside the Microsoft.Windows.Design.Interaction namespace inside the Microsoft.Windows.Design.Extensibility Version dll.
Beats be why this dll isn't included in the .NET 3.5 install.

VS2008 crashes with "Fatal Execution Engine Error"

Has anybody found a fix for Visual Studio crashing with this error (eventlog)?
.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A2E1132) (0)
It does this when I start debugging with a problem in the xaml. Visual Studio will then silently disappear.
I've looked at SO and MS Connect but haven't found a fix or workaround. I often read that you should disable all addins but I don't have any.
EDIT: Yes, I have SP1 and the following fixes installed:
Version 9.0.30729.1 SP
KB944899 KB945140 KB945282 KB946040 KB946308 KB946344 KB946581 KB947171 KB947173 KB947180 KB947540 KB947789 KB947888 KB948127 KB953256 KB956453 KB957912 KB958017
Every time I've seen this, it's because you end up with two different versions of WPF loaded at the same time (i.e. one from GAC and one from Reference Assemblies).
In the .csproj file, is there a line called something to the effect of "Allow XAML to be Compiled in Same AppDomain"? (Sorry I can't actually remember the real name) - Blend likes to put this in and it causes problems.
I have had crashing problems with VS2008's WPF designer too. I workaround by avoiding the designer and editing the XAML by hand.
Thanks to Paul I found a very strange workaround (I verified it a few times)
open the solution
unload the project (context menu)
edit the csproj (context menu), don't make any changes
reload the project (contect menu)
If I do that before I start the debugger VS will not crash.
I just found another strange way of getting around this problem. I load the solution and before opening any xaml page, I rebuild the project. The xaml pages loads fine afterward and VS2008 does not crash.
Have you updated your VS install to SP1? There are a number of crashes fixed in the SP1 patch.
If you have installed SP1, try installing the following patch as well. It's a further fix for debugger related issues in VS 2008 SP1
http://support.microsoft.com/kb/957912
I had the same problem when trying to edit an ASP.NET MVC master page or view. I found this link. I had MBUnit Gallio installed on my machine with VS2008 integration. The problem went away when I uninstalled Gallio.
I just solved this problem (well the symptom anyway) by creating a new solution and adding all the projects in the "problem" solution into this new solution. After doing this and discarding the old solution, everything works fine.
I had the same problem after installing devart code compare V2.80.11 - earlier versions did not have this problem. After removing devart the problem went away. Reinstalled and problem came back.
I like devart code compare so I intalled it without VS2008 integration. Everything works fine now.

Resources