I am getting following error while browsing wpf application from windows 8.Its working in other machines .Do we need to do any configuration changes.
As mentioned here, the problem may happen because the target framework used on the dev machine is not installed on your client machine. Try installing .Net2.0 by clicking "Install .Net Framework" button.
Related
I am trying to build MSIX setup for my WinForms application built on .net6. I want to give auto-update feature when the user clicks the "Update" button. I think originally developer didn't have control over updating MSIX and there was only way it was updated automatically when the application is restarted.
But there is a recent article on taking full control over MSIX updates I tried to follow it but I am facing the exception 'System.InvalidOperationException' while running the below line of code.
Package package = Package.Current;
I am using visual studio 2022 & WinForms application running on .net 6. I have kept other configurations as described in the above article but it is not working as expected. (I have tried in .net core 3.1 and it is working with it)
Package.Current only works in a packaged context, so you need to make sure to actually debug/launch the packaging project. An InvalidOperationException indicates that you are running your project unpackaged.
Make sure to select "Set as Startup Project" on the packaging project, likely named "MyApp (Packaging)" in the Solution Explorer. Then you can launch/debug your project as you normally do.
I have a WPF using .net core 5, I want to create an installer with "Visual Studio Installer Projects".
I followed the usual steps and install the created installer on my machine.
The problem is when I want to run the app from the shortcut on my desktop, I get always this error message :
The message box will close and nothing happen whether I click 'yes' or 'no'.
Any idea what can cause this problem ?
You have to add the prerequisites. In your case the correct .NET Version.
If you would like your installer to be able to install the necessary runtime for a framework-dependent .NET Core 3.1 app, you can do this using prerequisites. From the properties dialog of your installer project, open the Prerequisites... dialog and you'll see the following entries:
The .NET Core Runtime... option should be selected for console applications, .NET Desktop Runtime... should be selected for WPF/WinForms applications.
I'm currently developing a windows modern app using Foundation for Apps and cordova. The app crashes in many ways during navigation, sometimes even immediately after running it.
The crash is this one
And i can't manage to debug it in any way.
I've tried setting up a window.onerror and a WinJS.Application.onerror catch all function with no results. Apparently the crash happens at a lower level. I've also inspected the event viewer but no info are available.
What happens is apparently similar to this question: How to debug unhandled win32 exception in WinJS Win8 store app which is unfortunately unsolved.
What are my options here?
I had the same issue with Visual Studio 2015, Windows 10 and cordova 5.1.1 when I transfer the project to another dev environment. It only occurs at the Windows-x64 app build configuration for the local machine.
After successful building, the app window launches shortly and after that, the win32 exception like the screenshot from sPoz came up. It was reproducible every time.
I try to repair Visual Studio and also I checked the environment variable from my solution as it is described in this Microsoft Article. But I had no luck.
Nothing helped, but simply open the config.xml file and change the Windows Target Version from "Windows 10" to "Windows 8.1" solved the problem and I could run the app with no error:
After that I can turn back to "Windows 10" and everything is fine. This was reproducable on two dev machines.
I do not exactly know if the moved project was the source of the problem and maybe the rewritten config.xml triggers any rebuild mechanism.
Most likely you are hitting an issue related to DOM Ex WWAHost.exe error on Windows 8.1 (apparently fixed on Win10). There is a workaround that should work for most apps; before you click around and get the WWAHost.exe exception, close the DOM Explorer window. This should enable you to debug by hitting breakpoints, etc. If you need to use DOM Ex against a Windows target, you might need try debugging against a remote device (see Kenneth's suggestion here: Why is Cordova Windows 8 app causing an unhandled win32 exception occurred in wwahost.exe?)
What are you using to develop the app ? The Visual Studio Tools for Apache Cordova ? Or Cordova with CLI ?
If you are using the plugin, you must launch the generated WP project to debug. The debug of WP app is not supported currently with the plugin.
I was getting same error during development of cordova windows tablet application, using Visual Studio Enterprise 2015. So far, I was doing try to close DOM-Explorer and use breakpoints and javascript console. After that, while searching javascript intellisense issues with Visual Studio, I figured out that my problem was fixed. What I did to get rid of this problem is that:
Open Tools > Options
Select Text Editor > Javascript > Intellisense > References
Add following references ( angular.intellisense.js, domWeb.js, domWindows_8.1.js ).
I don't know what are the correct reference files, but with these 3 reference files added, my problem has been solved.
I am trying to build a setup-msi using visual studio for my wpf application.
The issue i am facing is that i force primary output from wpf project to the setup project
and the dependencies are calcaluted automatically.
I run the msi locally (on the machine i built the wpf app) and everything works fine.
The problems start when i try to install it on different machines.
On other machines i run the installation process and it finishes justfine
but when i try to run the application i get exceptions about assemblies that could not be found.(e.g System.Web , Version=4,0,0,0 could not be found etc)
I really suck building setup projects but can anybody give a hand?
P.S.: I also tried installShield... same results.
I would guess that the target machine only had .NET Framework 4.0 Client Profile installed. System.Web is in .NET Framework 4.0 Extended, which is installed with the full 4.0 Framework but not with the Client Profile.
Are you bootstrapping .NET 4 in your setup?
Check for the presence of "Microsoft .NET Framework 4 Client Profile" and "Microsoft .NET Framework 4 Extended" in Add/Remove Programs (XP) or Programs and Features (Vista/7) on the machines where the application ran fine and those where it gave that error.
Edit: .NET Framework Deployment Guide for Developers. That should help you figure out how best to deploy it.
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.