I recently built a new application using WPF, so that I can learn the new technology. Now that I am trying to deploy the application, it appears as if it is running fine on a Vista system, but on a Windows XP SP2 machine with the .Net fx 3.5SP1, it's not able to load the PresentationFramework.dll file.
I did some further investigation into this and discovered that there is a slight build difference between the PresentationFramework.dll files on my xp test machines vs. what is on my Vista development machine.
What I'm curious about is if anyone else has run into this issue as well, and what they did to remedy the situation so that they could develop on Windows Vista, but deploy the developed application to both Vista and XP clients.
Thanks.
I need to add to this a bit... on the vista machine and on the client machine, I've got .Net Fx 3.5 SP1. I had done a bit of digging, and found out that the PresentationFramework.dll file is the same, except the last set of versioning numbers.
Has anyone found a decent work around for this issue?
Sorry that I left this stagnant, but I figured out the issue I was running into. Turned out that there was corruption in the Windows XP box I was using as a test bed.
I was working between stackoverflow and another forum for the package I was writing the Add-in for. When I learned of the answer, this is what I posted, in case I ran into issue in the future.
I thought that I'd post this here, so
that I would have reference, and also
in case anyone else would need
reference to it for the future... I'm
working on another Dinerware Add-on
using WPF, and although it was running
fine on my development machine, every
time I'd go to run it on a test
machine (a machine ghosted like it was
in the field at a customer's
location), I kept getting weird
processing errors.
I did hours of searching online, only
to come up empty handed until I ran
across this article:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6e5de3d8-fc02-4504-b00f-7a2192d24a48/
which gives a link to the download of
the WIC (Windows Imaging Components),
located here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=8e011506-6307-445b-b950-215def45ddd8&displaylang=en
For some reason, what is/was happening
is that the Windows Imaging components
have become corrupt against what my
application is looking for. TO fix
the issue, you have to:
1) navigate to
%windir%\$NtUninstallWIC$\spuninst\
and run the spuninst.exe file in
there. That will remove the Windows
imaging components. 2) after you have
completely removed the components, you
will then re-install them using the
second link from above.
So far, I've not run into any further
issues.
What a crazy thing that
was?!?!?!?!?!?!!
Hopefully, if someone else runs into this issue, I may be able to help them out quick by >putting this out there.
As I said on that forum... hopefully this helps someone else out that runs into this issue in the future.
I've done a bit more experimentation and built a test WPF project and used a Setup and Deployment project instead of a WiX installer. for some reason, the application is working fine when its installed with the Setup and Deployment installer, but when using WiX, it's having issues...
Beginning to think the issue has to do with WiX, and not the .Net Fx version/build
You can have this problem sometimes with templates and Blend, although I thought it had been fixed in the latest Blend. Basically when Blend "pulls in" information for making a new template, it can sometimes copy in Aero only stuff from Vista, which means the control you then create is then reliant on Vista :-(
I did think this was fixed though, although you may have been bitten by it if the project has taken a while to put together.
Make sure that .NET Version on your Vista and XP machine are same.
Related
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.
First, let me start off by stating that I will be more than happy to post whatever code or other information I need to in order to help resolve this issue. Unfortunately, at this time, I am just not sure what I need to post.
I have a WPF application that uses the Microsoft Ribbon library. I know the ribbon control has been rolled into the 4.5 framework but since I am still deploying to some XP machines, I am forced to use the 4.0 framework. I mention this only in case there is some obscure issue with the old library.
In the application, I have a RelayCommand that is bound to one of the ribbon buttons that does not enable itself correctly (or at all for that matter). The code that is in place to determine if the command can execute is the exact same as the code for a few other buttons. These other buttons behave correctly. Even worse, the behavior is correct on my machine but not on any of the other machines that I have tried it on. It doesn't appear to be isolated to XP or Windows 7. Even worse, I have placed a regular button in the interface that calls the CanExecute method for the command and it reports a value of True even when the button is disabled.
I am at a complete loss of where to start looking. Perhaps someone can steer me in a direction of where to begin.
Thanks in advance to anyone who is able to assist me in my desperate state.
* EDIT *
On a whim, I installed .NET 4.5 on the machine that was not functioning correctly as this was a glaring difference between the development (my) machine and the other machines. To my surprise, this corrected the issue. That said, are there updates to the .NET 4.0 framework that are applied by installing version 4.5? As I mentioned above, I am targeting some XP machines so I cannot install 4.5. Perhaps there are some other updates that can be installed without installing 4.5?
I had VS2010 running fine with Silverlight development. Then I installed Expression Blend 4. Now when I run VS2010 and try to debug a silverlight app I get an error saying "Unable to start debugging. The silverlight developer runtime is not installed. Please install a matching version." I've tried uninstalling silverlight tools, and reinstalling them from scratch (the latest april version). But I still get the same message. So basically I'm now unable to do VS2010 SL development. I'm on the verge of just rolling back to my last system restore point and giving up on Blend. But if I do that I'd be worried that Product Activation would never allow me to reinstall it in the future, since the MSDN download page implies I'm only ever allowed to install it on a single machine. Any help appreciated.
Thanks
I had the same problem after installing Expression Studio 4. I installed the Developer version of Silverlight at: http://go.microsoft.com/fwlink/?LinkID=188039
and the problem seems to be resolved.
Hope that helps.
Try reinstalling or reparing the Silverlight_Tools for Silverlight 4.
You tried that.
The product activation system isn't that draconian it has to allow for things like hardware failures etc which would require re-installs.
Thanks for the suggestions. I solved it this way: Since I'm running under parallels, I rolled back to a snapshot taken before I'd installed Blend. Then I rebooted Windows. Then I reinstalled Blend (happily with no draconian activation problems!), and everything worked.
So why did it work the second time and not the first time? The first time I installed Blend, I'd shut down VS2010, explorer etc, but not rebooted. Perhaps some hidden VS-related process was still running. Installing Blend in that situation screwed everything up, and removing and reinstalling stuff didn't fix it. Obviously the Blend installer should have spotted the dangerous process and taken remedial action, but it didn't. Perhaps MS recommends you reboot before installing new software? That would be a bit of a nuisance, and I've never needed to before. My real lesson from this is to work in a VM and take regular snapshots.
Thanks again.
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.
I made a WPF app that uses Web Services. It is failing on all computers except the dev machine with the message -- System.MissingMethodException. I guess the point where it fails is the point where it tried to access the Remote webservice (website).
Has anyone had any experience with WPF and webservices? Should I spend 2 more days porting it to .Net Winforms, or should I keep trying to make it run?
The problem is, in Vista all I see is 'This application has experienced an error and will shut down' and in XP I just a system error dialog and I can't point out where the error is.
My guess is that there is some DLL which is on my PC and not on other people's PC which has the missing method causing the error.
I made this using .Net 3.5.
Any ideas?
Indeed, you have identified the most probable cause of your problem: a mismatch between the installed libraries on your dev machine and the prod machines.
You can use the fuslogvw.exe to enable Fusion to log binding errors.
Also check whether you have installed the same (versions of) .NET framework everywhere (SP1?)
Did you use SP1? Is SP1 installed on the target machine?
Getting a full stack trace would allow you to diagnose this further.