My task is to make a simple application that connects to the internet (using Wininet) and downloads a text file. It then displays the data in a listBox widget. The requirement was to make a GUI based application, so I used Windows Forms in Visual Studio Express 2010.
The application runs fine on my PC, however I realized that it runs only on my PC. I installed .Net 4 and Visual Studio 2010 redistributables on another PC and it worked fine there. Now, the person for whom I'm making this wants maximum compatibility on windows PCs. I'm totally stuck here.. should I switch to an older version of VSE?
From what I could search, using /MT instead of /MD would cause the application to link statically, however my app also uses /CLR and these are incompatible.
Any ideas?
Note: I've previously made a similar app (downloading and displaying) with console output and it works perfectly fine everywhere.
Dependens on what is meant by "maximum compatibility on windows PCs". If you can bundle the required redistributables, your program should run (as you found on the second PC), as long as the windows on the PC is capable of executing the binaries (e.g. not a 32 bit PC trying to execute 64 bit binaries)
I have been in your situation.
I can give you my free .NET-application-runner (RunNetApp.exe) that automatically installs .NET Framework 4 before running your application for the first time. If the framework is already installed on target machine, it only runs your application.
I also suggest changing application's framework to ".NET Framework 4 Client Profile". It's setup is about 40MB (in comparison to 200MB of full ".NET framework 4").
Is it helpful?
Related
The WPF Performance Suite is described here:
http://msdn.microsoft.com/en-us/library/aa969767.aspx#installing_the_wpf_performance_suite
-> how can I install it on Windows 8?
(the Windows 7 SDK can't be installed and the Windows 8 SDK contains Performance tools such as GPUView but not the WPF profilers "Perforator" and "Visual Profiler".
I googled several hours for it but didn't find anything.
Ok, I have it running under Windows 8, but afaik only for framework 4.
Download the tools (link borrowed from Athari above)
Install and it test. Select visual profiler and attach to a process. If it doesn't appear to work, download this patch from MS.
After installing the patch I now have it working again. This is on Windows 8 pro running on a Dell XPS 17 i7 based machine.
it comes as a pack of Windows Performance Toolkit (WPT) v5 for Windows 8
http://social.msdn.microsoft.com/Forums/en-US/wptkv5/thread/090ed47a-f253-4c5a-8dc8-a7923e839815
here is the download
http://www.microsoft.com/en-us/download/details.aspx?id=30652
I managed to get everything downloaded and working under Windows 10 with a .NET 4.5 WPF app.
Follow instructions from Microsoft at Where to Download WPF Performance Suite? (Perforator, Visual Profiler). You need to install both the app, and its timezone patch.
You must run the WPF profile app before you run the target app.
Try running the target app as Administrator. It needs elevated privileges, or else it will not appear in the Select Process dialog.
If you cannot run the target app as Administrator, then you can still use
Actions..Launch Process to launch it.
Visual Studio 2015 comes with "Timeline", which by my estimation roughly provides the same features as Visual profiler. It can profile WPF on .net4+, including 4.5, 4.6.
It can be started by
To profile a WPF application in Visual Studio 2015 CTP 5, open the Performance and Diagnostics hub from the Debug -> Start Diagnostic Tools Without Debugging (ALT+F2) menu. Select the Application Timeline tool and click Start (You can also run the CPU Usage tool alongside the Application Timeline tool).
(Source: https://blogs.msdn.microsoft.com/wpf/2015/01/16/new-ui-performance-analysis-tool-for-wpf-applications/)
I've got a problem with an wpf application.
I programming a wpf application with sharpdevelop 4.1.8000, it complied successful and is running well on the development machine.
When I copy the files from bin\debug to other machines (include the third part dll I used in project), the tool can't startup. I got a exception, the exception component is System.Windows.Markup.XamlParse. I don't know why this happened.
So I need your help. By the way, the development machine is win7 x64 enterprise, the version of .net framework is 4.0. The deployment machine were win7 x64, too.
Check your xaml namespaces, did you reference something that is in the GAC of your develop machine but bot present on the other client. Happened to me using a behaviour from System.Windows.Interactivity, worked on my dev machine because i had Blend installed but which wasn´t the case on the client.
I have a Silverlight application that I can run from Internet Explorer 8.
When I attempt to host it in a Winforms browser control as described here: Silverlight Hosted in Winforms it display a web page that says "To view this content, please install" and has a "Click now to install" button.
Unfortunately, SL4 is already installed. However I did try to follow the instructions. But was prompted, of course, that SL4 was already installed on my system.
I seems that at one spot IE/Silverlight cannot see that Silverlight runtime is installed, but at anoter spot it can see it. This has become a significant roadblock.
The client OS is Win 7 64-bit. I have no idea if other versions of OS are exhibiting the same problem.
Silverlight (the plugin) is 32-bit only. You can not run it from a 64-bit application.
If you can [easily] force the application to run in a 32-bit context, then you're in luck -- change the "target" of the VS project from "Machine Independent" to "x86".
The above situation describes exactly what I ran into when trying to run SL (32-bit) in a Windows Sidebar Gadget (default 64-bit on Windows 7 64-bit); this is somewhat interesting, it implies that all (or at least almost all of) the components behind IE are 64-bit ready. The "holdup" and why IE normally only runs in 32-bit is that it's a chick-and-egg problem with all the plugins, BHOs, and ActiveX components used. However, the (IE) Browser Host will happily run as 64-bit.
I've made a small tool application with Visual Studio 2010 which to distribute it, I zip these files from the Release folder:
Data
MainData.mdf
MainData_log.ldf
DataBackup.exe
DataBackup.exe.config
FluidKit.dll
then unzip them on the target machine (no installation).
When I run it on a Windows 7 machine with .NET 4 installed, it runs fine.
When I run it on a Vista machine with .NET 3.5 installed, it gives me this default error message:
In order to run this appication, you
need to install the following version
of .NET: v.4.0.21006 To learn how to
install this version, contact the
distributor of this application.
When I run it on an XP machine with .NET 3.0 installed, it gives me an error that doesn't that the application cannot start but doesn't mention installing .NET.
Is there anyway that I can intercept these messages to e.g. give a nice-looking, custom message with install instructions and a link to the .NET 4 download?
I think that the only solution is to make a small non-.NET application that checks if the .NET Framework is installed, and if so, launches your .NET application. For the framework detection part, see for example here: http://www.codeproject.com/KB/dotnet/DetectDotNet.aspx
Check out the Application.DispatcherUnhandledException Event... maybe you could globally catch the exception and inform your user in there about having to install .NET 4.0. Probably this can help you determine what .NET platform versions are installed, and maybe even avoid using the .NET 4 features if you see that the client machine does not have it.
I have done a WPF appliction using VS 2008 SP1 in Windows XP SP3. I copy the exe and dlls to my Windows 7 RC build 7100 machine. But the exe is not working. When I doubleclick on the exe, a message comes like 'Application stop working. windows is gathering the information'. Why this happends?
I am overriding the OnStartup function in App.xaml.cs to create single instance of application. and also I am using DllImports for kernel32.dll, powrprof.dll, advapi32.dll and user32.dll. I use a Date control from the WPFToolkit
Have you tried to run in Backwards Compatibility Mode, by Right clicking the exe and going to the Compatiblity tab and trying different settings?
Also, did you test in more than one Windows 7 machine, to actually confirm its due to the Operating System difference and not due to a possible Framework installation problem?
Given that you are importing kernel32.dll, powerprof.dll, advapi32.dll, and user32.dll, my first guess is that you are running into a DLL-Hell problem. There is no concurrent versioning of those DLL's like there is with .NET assemblies. Make sure that the signatures you are importing have not been broken in the version of Windows 7 you are using.