0

i'm trying to run one of my WPF application in a Hyper-V Server 2008 r2 sp1 but it crashes on startup.

I created my application with .net 4.0 and looks like it crashes before my first line of code is executed, the only helpful hint from the crash is System.TypeInitialization, a vague 54608d47 and CLR20r3 on EventType

So, i tried doing all the windows update and creating a new totally empty application with WPF .net 4.0 (it only display an empty window), but it has the very same error.

I installed .net 4 framework for Windows Core edition (from THIS link) but still have the same error.

I enabled framework 2 and 3 using from powershell those commands

DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore
DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore-WOW64
DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore
DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore-WOW64

but still same error.

I tried to update .net framework with

%WINDIR%\Microsoft.NET\Framework\v2.0.50727\ngen.exe update
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\ngen.exe update

without any good result (i got lots of file not found errors with those commands, but i think its normal in a Windows Core installation

I found out that after manually enabling the .net 2 and 3 i could run WinForms application (before those commands i had a 0xc0000135 error) and re-writing my app in WinForms is my only solution for now, even if i don't like it.

What can i try?

HypeZ
  • 111
  • 1
  • 2
  • 6
  • If you are so desperate to run a Windows Forms application on a server - why are you using Server Core? Wouldn't it be easier to just install the GUI, since you are using.. a GUI app? – pauska Feb 02 '15 at 09:18
  • because my program needs to remotely install a service on any Hyper-V server (not only core edition). If it can't install (for any possible reason) i give to the customer a little GUI to one-click install it, but i'm considering doing a command line application to do the same thing on 2008r2 core (it works on Hyper-v server 2012) – HypeZ Feb 02 '15 at 09:21
  • 1
    I think I can speak for all sysadmins on this one: If you're providing software for sysadmins to install on a Hyper-V server then sysadmins _want_ a command-line installer for it.. I would get pretty pissed if I found out that I need .NET framework on a virtualization host just to install a service.. – pauska Feb 02 '15 at 09:24
  • well, the service itself needs .NET framework too, but i understand that not everyone likes it :( – HypeZ Feb 02 '15 at 09:27
  • @HypeZ This is what MSI packaging is for. – Dan Feb 02 '15 at 10:05
  • Ok, if the service it self also needs .NET framework then by all means tell customers to install the feature or run the .net 4 installer if they're on 2008R2 or earlier, but the installer should be able to either run through MSI with property flags to control the configuration or make a setup.exe that wraps it. – pauska Feb 02 '15 at 11:20
  • as suggested by @Dan i created an msi package that have all the .NET4 requirement and install those, but i still have the same error when running any wpf application.. i even tried with different .net version (2.0, 3.0, 3.5, 4.5.1) but had no different result – HypeZ Feb 02 '15 at 11:23
  • @HypeZ Having read back, I really don't see how you expect a WPF application to work on Server Core. The whole point is that it doesn't have the GUI enabled. – Dan Feb 02 '15 at 11:26
  • well you don't have explorer.exe but it gives you a command prompt and you can also access with RDP! Winforms app works too.. but i'm starting to accept that wpf application just can't work on it – HypeZ Feb 02 '15 at 11:35

0 Answers0