Is WPF development feasible under VM? [closed]

我只是一个虾纸丫 提交于 2019-12-23 10:30:57

问题


After reading how to keep your dev machine from slowing down, I was reminded of my good intention a year ago to build a VM for my development machine.

However, I'm developing WPF and SilverLight GUIs on Vista x64. I can run x64 versions of the OS under a VM but I'm concerned about graphic performance for WPF and especially running Expression Blend. I expect to need the GPU!

I currently have Virtual PC VM for XP 32-bit testing. Is that or a version of VMWare likely to be better for WPF, and if so, are there any version differences? I can already create VMs with my VMWare Fusion on OS/X so just using the free VMWare Player is fine - I haven't been able to find any comments about differences in GPU support between Player and Workstation.

My main Windows dev machine is only a Dell laptop (Latitude 830) with 4GB RAM but I have to work on a laptop for client visits so I'm not inclined to shell out for an additional desktop.


回答1:


Having tried it myself, I'd reocmmend avoiding using a VM for WPF development. The WPF engine relies on DirectX accelaration in order to render content, and DirectX support is incomplete on VMWare (albeit miles better than MS Virtual PC's non-existent DirectX support).

The problem you're going to face is that Visual Studio and Expression both constantly re-render your XAML while you're working on it, which requires heavy significant GPU bandwidth. Working inside a VM simply doesn't cut it and, depending on your set up, you'll either experience black/blank or unresponsive designer windows in VS 2008.

If at all possible, stick with developing on your local desktop.




回答2:


How does putting your development environment inside a VM helps your productivity?

If your development tool slow down your computer this will leave the host OS fast and snappy, but you have to work inside the slow VM where your development tools are - so I suspect you are keeping the part of the computer you use to play solitaire fast by making the part you use to work slower.

How is this productive?

Also, VMs work best when you have lots and lots of memory and the VM file is located on a different physical disk then you Windows installation - both not easily done on a laptop.




回答3:


Parallels 5 seems much faster than my Fusion VM at WPF. VS2010 loads much much faster and doesn't have all of the video glitches... This kinda sucks because I've been using Fusion for the last few years and don't want to switch, but P5 seems much better with WPF so far.




回答4:


This really shouldn't be that bad - I would expect to notice a slight difference, but for development purposes, using a local VM player will work.

The only thing you would really have trouble with is trying to develop WPF over Remote Desktop with lots of animations/videos, etc.

BTW, as a possible alternative, have the VM share a logical disk partition with most of your development tools, and when necessary, run Expression Blend locally and open the project.




回答5:


VirtualBox 3.0 added support for DirectX 8/9 in Windows - see http://www.virtualbox.org/manual/UserManual.html#guestadd-3d which may help. I haven't tried it personally yet.




回答6:


I have found just one solution at the moment: connect to VMWare via RDP. This way Microsoft Expression doesn't glitch.

(The first time I saw it I thought that Microsoft really released such an immature product)

I'll try to find out whether it's possible to turn off DirectX (or force DirectX 8) without logging in via RDC.




回答7:


I have found an even better way: deny access to d3d9.dll. Remove it or edit security rights (as I did) so that it can't be accessed. There are several tiers in WPF: 0, 1, 2.

2 messes up everything. 0 isn't as fast as 1. DisableHWAcceleration forces tier to be 0. I haven't found any way other than forbidding d3d9.dll.

Happily, it worked. Microsoft Expression got working without messiness. Though I'm not sure if the tier is really 1.



来源:https://stackoverflow.com/questions/525664/is-wpf-development-feasible-under-vm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!