VM下的WPF开发是否可行?

时间:2021-08-14 23:30:58

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.

在阅读了如何防止您的开发机器减速之后,我想起了一年前为我的开发机器构建VM的好意。

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!

但是,我正在Vista x64上开发WPF和SilverLight GUI。我可以在VM下运行x64版本的操作系统,但我担心WPF的图形性能,尤其是运行Expression Blend。我希望需要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.

我目前有用于XP 32位测试的Virtual PC VM。这个或VMWare的版本可能更适合WPF,如果是这样,是否有任何版本差异?我已经可以在OS / X上使用我的VMWare Fusion创建虚拟机了,所以只需使用免费的VMWare播放器就可以了 - 我无法找到有关播放器和工作站之间GPU支持差异的任何评论。

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.

我的主要Windows开发机器只是一台配备4GB内存的戴尔笔记本电脑(Latitude 830),但我必须在笔记本电脑上进行客户访问,所以我不打算购买额外的台式机。

7 个解决方案

#1


5  

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).

自己尝试过后,我会重新建议避免使用VM进行WPF开发。 WPF引擎依赖于DirectX加速来呈现内容,而VMX上的DirectX支持是不完整的(尽管比MS Virtual PC不存在的DirectX支持更好)。

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.

您将面临的问题是Visual Studio和Expression在您处理XAML时不断重新渲染XAML,这需要大量的GPU带宽。在VM内部工作根本不会削减它,并且根据您的设置,您将在VS 2008中遇到黑/空或无响应的设计器窗口。

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

如果可能的话,坚持在本地桌面上进行开发。

#2


1  

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

如何将开发环境置于VM中有助于提高工作效率?

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.

如果您的开发工具减慢了计算机速度,这将使主机操作系统快速而快速,但您必须在开发工具所在的慢速VM中工作 - 所以我怀疑您保留了用于快速播放单人纸牌的计算机部分通过使您使用的部件工作更慢。

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.

此外,当您拥有大量内存并且VM文件位于与Windows安装不同的物理磁盘上时,VM最有效 - 在笔记本电脑上都不容易完成。

#3


1  

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.

Parallels 5似乎比我在WPF上的Fusion VM快得多。 VS2010的加载速度要快得多,而且没有所有的视频故障...这有点糟糕,因为我过去几年一直在使用Fusion并且不想切换,但到目前为止P5看起来好多了WPF 。

#4


0  

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.

这真的不应该那么糟糕 - 我希望注意到一点点差异,但出于开发目的,使用本地VM播放器将起作用。

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

您真正遇到的唯一问题是尝试使用大量动画/视频等在远程桌面上开发WPF。

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.

BTW,作为一种可能的替代方案,让VM与大多数开发工具共享逻辑磁盘分区,并在必要时在本地运行Expression Blend并打开项目。

#5


0  

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.

VirtualBox 3.0在Windows中添加了对DirectX 8/9的支持 - 请参阅http://www.virtualbox.org/manual/UserManual.html#guestadd-3d,这可能有所帮助。我还没有尝试过。

#6


0  

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

我目前只发现了一个解决方案:通过RDP连接到VMWare。这样Microsoft Expression就不会出现故障。

(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.

我将尝试找出是否可以在不通过RDC登录的情况下关闭DirectX(或强制DirectX 8)。

#7


0  

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.

我找到了一个更好的方法:拒绝访问d3d9.dll。删除它或编辑安全权限(就像我一样),以便无法访问它。 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.

2弄乱了一切。 0没有1.禁用HWA加速强制层为0.除了禁止d3d9.dll之外,我还没有找到任何其他方法。

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

令人高兴的是,它奏效了。 Microsoft Expression在没有混乱的情况下工作。虽然我不确定该等级是否真的是1。

#1


5  

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).

自己尝试过后,我会重新建议避免使用VM进行WPF开发。 WPF引擎依赖于DirectX加速来呈现内容,而VMX上的DirectX支持是不完整的(尽管比MS Virtual PC不存在的DirectX支持更好)。

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.

您将面临的问题是Visual Studio和Expression在您处理XAML时不断重新渲染XAML,这需要大量的GPU带宽。在VM内部工作根本不会削减它,并且根据您的设置,您将在VS 2008中遇到黑/空或无响应的设计器窗口。

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

如果可能的话,坚持在本地桌面上进行开发。

#2


1  

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

如何将开发环境置于VM中有助于提高工作效率?

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.

如果您的开发工具减慢了计算机速度,这将使主机操作系统快速而快速,但您必须在开发工具所在的慢速VM中工作 - 所以我怀疑您保留了用于快速播放单人纸牌的计算机部分通过使您使用的部件工作更慢。

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.

此外,当您拥有大量内存并且VM文件位于与Windows安装不同的物理磁盘上时,VM最有效 - 在笔记本电脑上都不容易完成。

#3


1  

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.

Parallels 5似乎比我在WPF上的Fusion VM快得多。 VS2010的加载速度要快得多,而且没有所有的视频故障...这有点糟糕,因为我过去几年一直在使用Fusion并且不想切换,但到目前为止P5看起来好多了WPF 。

#4


0  

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.

这真的不应该那么糟糕 - 我希望注意到一点点差异,但出于开发目的,使用本地VM播放器将起作用。

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

您真正遇到的唯一问题是尝试使用大量动画/视频等在远程桌面上开发WPF。

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.

BTW,作为一种可能的替代方案,让VM与大多数开发工具共享逻辑磁盘分区,并在必要时在本地运行Expression Blend并打开项目。

#5


0  

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.

VirtualBox 3.0在Windows中添加了对DirectX 8/9的支持 - 请参阅http://www.virtualbox.org/manual/UserManual.html#guestadd-3d,这可能有所帮助。我还没有尝试过。

#6


0  

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

我目前只发现了一个解决方案:通过RDP连接到VMWare。这样Microsoft Expression就不会出现故障。

(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.

我将尝试找出是否可以在不通过RDC登录的情况下关闭DirectX(或强制DirectX 8)。

#7


0  

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.

我找到了一个更好的方法:拒绝访问d3d9.dll。删除它或编辑安全权限(就像我一样),以便无法访问它。 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.

2弄乱了一切。 0没有1.禁用HWA加速强制层为0.除了禁止d3d9.dll之外,我还没有找到任何其他方法。

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

令人高兴的是,它奏效了。 Microsoft Expression在没有混乱的情况下工作。虽然我不确定该等级是否真的是1。