简体   繁体   English

Visual Studio 2008中的.NET 2.0安装项目

[英].NET 2.0 Setup Project in Visual Studio 2008

I developed a win forms app targeting .net 2.0. 我开发了一个针对.net 2.0的win表单应用程序。 All of this is in Visual Studio 2008 sp1. 所有这些都在Visual Studio 2008 sp1中。

I did this because I didn't really need 3.0+ features in the app. 我这样做是因为我在应用程序中并不需要3.0+功能。 and I didn't want the clients to have to install a gigantic framework when they could just install a semi-huge one. 我不希望客户在安装一个巨大的框架时必须安装一个巨大的框架。

Well, when I create a setup project for the app, build it, install it, it wants me to install .net 3.5. 好吧,当我为应用程序创建一个安装项目,构建它,安装它,它希望我安装.net 3.5。 I am targeting 2.0 in both the windows app and the setup project. 我在Windows应用程序和安装项目中都以2.0为目标。

Is it possible to make the setup project with only a prerequisite of 2.0 in VS 2008? 是否可以在VS 2008中仅使用2.0的先决条件进行安装项目?

Yes. 是。 By default a setup project in VS2008 will want to include the 3.5 redistributable. 默认情况下,VS2008中的安装项目将包含3.5可再发行组件。 You need to switch that to the 2.0 redistributable. 您需要将其切换到2.0可再发行组件。 Try the following 请尝试以下方法

Your setup project should have a folder called "Detected Dependencies" when viewed in Solution Explorer. 在解决方案资源管理器中查看时,您的安装项目应该有一个名为“Detected Dependencies”的文件夹。 One of the values will be "Microsoft .Net Framework". 其中一个值是“Microsoft .Net Framework”。 Double click on that node which will open up the "Launch Conditions" page. 双击该节点,打开“启动条件”页面。 There will be a node in the tree named ".Net Framework". 树中将有一个名为“.Net Framework”的节点。 Select that and hit F4 to bring up the properties window. 选择它并按F4以显示属性窗口。

In the Properties window there will be a row named "Version" with the value 3.5.XXX. 在“属性”窗口中,将有一行名为“Version”的行,其值为3.5.XXX。 This is a combo box. 这是一个组合框。 Switch it to the 2.0.50727 value. 将其切换到2.0.50727值。

Sure. 当然。 Right-click on the setup project, choose Properties. 右键单击安装项目,选择“属性”。 In the properties window, click on the "Prerequisites" button and select whatever you like. 在属性窗口中,单击“先决条件”按钮,然后选择您喜欢的任何内容。

From .NET 3.5 SP1 on you can also use a .NET Client Profile to deploy just those assemblies and files in the .NET Framework that are typically used for client application scenarios. 从.NET 3.5 SP1开始,您还可以使用.NET客户端配置文件仅部署.NET Framework中通常用于客户端应用程序方案的那些程序集和文件。 This enables a smaller, faster, and simpler installation of .NET client applications. 这样可以实现更小,更快,更简单的.NET客户端应用程序安装。

Further information is available in this blog post . 有关详细信息,请参阅此博客文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2008安装项目所需的管理员 - Admin required for Visual Studio 2008 Setup Project Visual Studio 2008中的.NET 2.0中的AjaxControlKit - AjaxControlKit in .NET 2.0 from Visual Studio 2008 .NET 使用 Visual Studio 2008 设置项目 - .NET setup projects using Visual Studio 2008 Visual Studio 2008安装项目警告“找不到先决条件” .Net Framework 3.5 SP1” - Visual Studio 2008 Setup Project warning “Could Not find prerequisite ”.Net Framework 3.5 SP1" 将 2008 Visual Studio 项目 (3.5 .NET) 导入 Visual Studio 2013 - Importing 2008 Visual Studio Project (3.5 .NET) into Visual Studio 2013 如何使用Visual Studio 2008使用Sqlserver数据库创建安装项目 - How to Create Setup Project with Sqlserver Database Using Visual Studio 2008 从Visual Studio 2005迁移到2008和.NET 2.0 - Moving from Visual Studio 2005 to 2008 and .NET 2.0 在Visual Studio 2010中将2.0 Web参考与.net 4.0项目一起使用 - Use 2.0 web reference with .net 4.0 project in visual studio 2010 无法在 Visual Studio 项目属性中选择 .NET Framework 2.0 - Can't select .NET Framework 2.0 in Visual Studio Project properties 在Visual Studio安装和部署项目中为COM Interop注册.NET DLL - Register .NET DLL for COM Interop in Visual Studio Setup and Deployment project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM