如何在没有Framework 3.5的PC上安装WPF应用程序 [英] How to install WPF application to a PC without Framework 3.5

查看:82
本文介绍了如何在没有Framework 3.5的PC上安装WPF应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对如何在没有Framework 3.5的情况下将WPF应用程序部署到PC中存在疑问. 如果一台PC仅安装Windows XP和sp3,是否可以设计一个可以直接在该PC上安装WPF应用程序的安装程序包?

情况是这样的:

我设计了一个简单的WPF应用程序.我想获取其安装程序包. 海关拿到包裹后,即使他们的PC没有安装Framework3.5,他们也可以直接安装该应用程序.

是否有可能? 如果有可能,我该怎么做?

//------------------------------------------------ -----------

我发现Matt提供了一个http://forums.microsoft.com/EmbeddedWindows/ShowPost.aspx?PostID=3967493&SiteID=47>解决方案 这是唯一的解决方案吗?

I have a question about how to deploy WPF application into a PC without Framework 3.5. If a PC just installs Windows XP and sp3, Is it possible to design a setup package that can install WPF Application directly on this PC?

The situation is like this:

I designed a simple WPF Application. And I want to get its setup package. When the customs get the package, they can install the application directly, even if their PCs do not have Framework3.5 installed.

Is it possible? If it is possible, how can I do this?

//-----------------------------------------------------------

I found Matt give a http://forums.microsoft.com/EmbeddedWindows/ShowPost.aspx?PostID=3967493&SiteID=47>solution Is it the only solution?

只要您测试应用程序以确保不会减少太多,就可以从GAC中删除不使用的.NET程序集.大多数.NET程序集都是Win32 API之上的包装器,因此可以在不影响操作系统的情况下将其删除.

You can delete .NET assemblies you don't use from the GAC as long as you test your app to make sure that you don't trim down too much. Majority of .NET assemblies are wrappers on top of Win32 API so they can be removed without affecting the OS.

  • 通过在开发计算机上的Visual Studio解决方案资源管理器中查看引用"节点,可以获取正在使用的程序集的列表.所有依赖项都存在(如果程序集A依赖程序集B,则列表中的A和B都在列表中),但是有一些属于运行时本身的程序集,例如Accessibility.dll,请参见下面的列表.
  • 确保使用gacutil.exe(可从Visual Studio命令提示符处调用)删除程序集.启动嵌入式映像并安装.NET后,必须运行gacutil.只需从Visual Studio复制SDK \ v2.0 \ bin文件夹
  • gacutil.exe/l可用于列出所有已安装的程序集. 我曾经尝试在未安装.NET的WinPE上运行WPF应用程序.我只是从.NET手动安装CLR +大约30个dll.这是所有必需文件的列表 2006/10/19下午05:13 10,752 Accessibility.dll 2006/09/18下午01:32 66,728 big5.nlp 2006/09/18下午01:32 82,172 bopomofo.nlp 2006/11/01下午10:34 17,920 Culture.dll 2006年11月1日10:34 PM 9,728fusion.dll 2006/09/18下午01:32 116,756 ksc.nlp 2006年11月1日10:34 326,656 mscorjit.dll 2006年10月19日05:14 PM 4,366,336 mscorlib.dll 2006年11月1日10:34 PM 330,752 mscorrc.dll 2006年11月1日10:34 PM 5,632,512 mscorwks.dll 2006/09/18下午01:32 59,342 normidna.nlp 2006/09/18下午01:32 45,794 normnfc.nlp 2006/09/18下午01:32 39,284 normnfd.nlp 2006/09/18下午01:32 66,384 normnfkc.nlp 2006/09/18下午01:32 60,294 normnfkd.nlp 2006年9月18日01:32 PM 83,748 prc.nlp 2006年9月18日01:32 PM 83,748 prcp.nlp 2006年11月2日04:36 3,915,264 PresentationCore.dll 2007年2月23日06:06 184,320 PresentationFramework.Aero.dll 2007年2月23日06:06 126,976 PresentationFramework.Classic.dll 2006年11月2日4:36 AM 4,972,544 PresentationFramework.dll 2007/02/23下午06:06 376,832 PresentationFramework.Luna.dll 2006年9月18日01:32 262,148 sortkey.nlp 2006/09/18下午01:32 20,320 sorttbls.nlp 2006/10/19下午05:14 413,696 System.configuration.dll 2006/10/19下午05:14 3,035,136 System.dll 2006年10月19日05:14 704,512 System.Drawing.dll 2006/10/19下午05:14 5,414,912 System.Windows.Forms.dll 2006/10/19下午05:14 2,039,808 System.XML.dll 2007/02/23下午06:06 32,768 UIAutomationProvider.dll 2007/02/23下午06:06 86,016 UIAutomationTypes.dll 2006年11月2日04:36 1,167,360 WindowsBase.dll 2006/09/18下午01:33 28,288 xjis.nlp
  • You can get the list of which assemblies you are using by looking at References node in Visual Studio solution explorer on your development machine. All dependencies are there (If assembly A depends on assembly B, both A and B mist be in the list) but there are some assemblies belonging to the runtime itself such as Accessibility.dll see the list below.
  • Make sure you use gacutil.exe (can be called from Visual Studio command prompt) to remove the assemblies. You have to run gacutil after you boot up your embedded image and have .NET installed. Just copy the SDK\v2.0\bin folder from Visual studio
  • gacutil.exe /l can be used to list all assemblies installed. I used to try to run WPF application on WinPE with no .NET installed. I just manually install the CLR + about 30 dlls from .NET. Here is the list of all files required 10/19/2006 05:13 PM 10,752 Accessibility.dll 09/18/2006 01:32 PM 66,728 big5.nlp 09/18/2006 01:32 PM 82,172 bopomofo.nlp 11/01/2006 10:34 PM 17,920 Culture.dll 11/01/2006 10:34 PM 9,728 fusion.dll 09/18/2006 01:32 PM 116,756 ksc.nlp 11/01/2006 10:34 PM 326,656 mscorjit.dll 10/19/2006 05:14 PM 4,366,336 mscorlib.dll 11/01/2006 10:34 PM 330,752 mscorrc.dll 11/01/2006 10:34 PM 5,632,512 mscorwks.dll 09/18/2006 01:32 PM 59,342 normidna.nlp 09/18/2006 01:32 PM 45,794 normnfc.nlp 09/18/2006 01:32 PM 39,284 normnfd.nlp 09/18/2006 01:32 PM 66,384 normnfkc.nlp 09/18/2006 01:32 PM 60,294 normnfkd.nlp 09/18/2006 01:32 PM 83,748 prc.nlp 09/18/2006 01:32 PM 83,748 prcp.nlp 11/02/2006 04:36 AM 3,915,264 PresentationCore.dll 02/23/2007 06:06 PM 184,320 PresentationFramework.Aero.dll 02/23/2007 06:06 PM 126,976 PresentationFramework.Classic.dll 11/02/2006 04:36 AM 4,972,544 PresentationFramework.dll 02/23/2007 06:06 PM 376,832 PresentationFramework.Luna.dll 09/18/2006 01:32 PM 262,148 sortkey.nlp 09/18/2006 01:32 PM 20,320 sorttbls.nlp 10/19/2006 05:14 PM 413,696 System.configuration.dll 10/19/2006 05:14 PM 3,035,136 System.dll 10/19/2006 05:14 PM 704,512 System.Drawing.dll 10/19/2006 05:14 PM 5,414,912 System.Windows.Forms.dll 10/19/2006 05:14 PM 2,039,808 System.XML.dll 02/23/2007 06:06 PM 32,768 UIAutomationProvider.dll 02/23/2007 06:06 PM 86,016 UIAutomationTypes.dll 11/02/2006 04:36 AM 1,167,360 WindowsBase.dll 09/18/2006 01:33 PM 28,288 xjis.nlp

希望有帮助

马特

推荐答案

Visual Studio 2008 SP1添加了对.NET Framework的客户端配置文件"子集的支持.如果您要定位的Windows XP SP3计算机尚未安装任何版本的.NET Framework,这将安装精简版的Framework和WPF应用程序所需的程序集. Microsoft提供了一个引导程序安装程序,它将在客户端计算机上安装/更新.NET Framework,然后链接到您的安装程序以安装您的应用程序.以下是一些入门指南:

Visual Studio 2008 SP1 adds support for the "Client Profile" subset of the .NET Framework. If the Windows XP SP3 machines you're targeting don't have any version of the .NET Framework installed already, this will install a slimmed-down version of the Framework with the assemblies you need for a WPF app. Microsoft provides a bootstrapper installer that will install/update the .NET Framework on the client machine, then chain to your installer to install your application. Here are some links to get started:

  • Overview of the .NET Client Profile
  • Walkthrough: Deploying a .NET Framework Client Profile Application by using Windows Installer
  • Walkthrough: Deploying a .NET Framework Client Profile Application by using ClickOnce

这篇关于如何在没有Framework 3.5的PC上安装WPF应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆