some troubles with WPF and Windows XP - wpf

is .net framework 3 compatible with xp? i install visual studio 9.0 (.net 3.5) on win XP. when i compile a WPF project and try to run it, this error occurs:
cannot initialize application ...... at address 0x<some digits>
(antivirus protection is off)
after first fail of wpf, all other project types (windows application, console &...) after compiling don't run.
where is problem?

WPF and .NET 3.5sp1 are supported on XP. You can create WPF applications with run on Windows XP.
It sounds like you have some other issue on your XP system. If other project types (ie: console) are failing, this is most likely some other, more serious issue.
Edit:
The System Requirements for .NET 3.5sp1, including WPF, are listed here. Basically, you need to have XPsp2 or better if you're using 32bit Windows XP, but both 32bit and 64bit XP are supported fully.

Related

when should I use VS2015 platform toolset V140_XP?

I want to switch from VS2010 to VS2015 but the documentation about V140_XP is not clear to me. I have two questions about it:
I use static library(/MT). so I don't need vcruntime140.dll or any other previous runtime library. Should I set platform toolset to V140_XP to run my application in windows XP or not?
Will my application run OK on windows 7 and later if I don't set platform toolset to XP?
You only need the v140_XP toolset if you're targetting Windows XP machines (which in new applications you should not be doing).
All later versions of Windows (Vista and up) are supported by the v140 toolset, but applications built with the v140 toolset will not run under XP.

Can a wpf application developed with vs2008 be installed on windows 8?

I have a wpf application and want to make it run on a win 8 Lenovo tablet 2(waiting for delivery).
Can I simply execute the application or I must use VS2010/2012?
Thanks in advance.
You can execute the application normally in any machine in any windows version that has the relevant .Net Framework version installed.

Is prism using legacy code?

We are using prism for developing WPF applications. The newest(4.1) version supports only windows 7 and windows server 2008 as per the following link
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28950
This begs a question. As far as I know specific operating system support is only required for assemblies with legacy code. If the assembly is completely written in .NET it just need the .NET frame work support as this itself is a "virtual machine".
If this is true is prism contains legacy code?
The Prism 4.1 Deveoper's Guide provided here says the following:
This guidance was designed to run on the Microsoft Windows 7, Windows Vista, or Windows Server 2008 operating system. This version has been smoke tested on Windows XP Professional and Windows Server 2003, but it has not been exhaustively tested. WPF applications built using this guidance require the .NET Framework 4.0 and Silverlight applications require Silverlight 5.
All this means is that they haven't tested it on XP, but you needed XP SP 3 and above for the last release (the minimum for .NET 4.0), so my guess is it will likely work for new projects.
No need to panic.

WPF one executable file from project

I have a WPF project with one external library. Is it possible to make one executable file "*.exe" from this project to run on windows systems even without .net? and how to insert that library into .exe file?
You will need to have the .net framework installed on the clients pc. What this says is that since .Net has been preinstalled on Windows since XP SP1, you should target your application to the runtime that is available on the system you wish to install it on. And since you are targeting WPF you will need to make sure that you have available .net 3.5 or greater. You may want to look into the Client installation of the framework since it is smaller. And you may want to look at this Stackoverflow question
i.e. from above link
Windows .Net Framework
Win 7 SP1 4
win 7 3.5.1 ( can be updated to .Net Framework 4 through windows updates )
windows vista 3.0 ( can be updated to .Net Framework 4 through windows updates )
windows XP Sp 1 2.0
You must have .net installed to use a wpf application. You can use clickonce to make the install experience more friendly to the user, if he doesn't the right version of the .net framework installed.
As for the external third party library, see my answer here for the same issue.

Application done in Windows XP SP3 not working in Windows 7

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.

Resources