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

时间:2023-01-16 14:18:29

I developed a win forms app targeting .net 2.0. All of this is in Visual Studio 2008 sp1.

我开发了一个针对.net 2.0的win表单应用程序。所有这些都在Visual Studio 2008 sp1中。

I did this because I didn't really need 3.0+ features in the app. and I didn't want the clients to have to install a gigantic framework when they could just install a semi-huge one.

我这样做是因为我在应用程序中并不需要3.0+功能。我不希望客户在安装一个巨大的框架时必须安装一个巨大的框架。

Well, when I create a setup project for the app, build it, install it, it wants me to install .net 3.5. I am targeting 2.0 in both the windows app and the setup project.

好吧,当我为应用程序创建一个安装项目,构建它,安装它,它希望我安装.net 3.5。我在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的先决条件进行安装项目?

3 个解决方案

#1


Yes. By default a setup project in VS2008 will want to include the 3.5 redistributable. You need to switch that to the 2.0 redistributable. Try the following

是。默认情况下,VS2008中的安装项目将包含3.5可再发行组件。您需要将其切换到2.0可再发行组件。请尝试以下方法

Your setup project should have a folder called "Detected Dependencies" when viewed in Solution Explorer. One of the values will be "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". Select that and hit F4 to bring up the properties window.

在解决方案资源管理器中查看时,您的安装项目应该有一个名为“Detected Dependencies”的文件夹。其中一个值是“Microsoft .Net Framework”。双击该节点,打开“启动条件”页面。树中将有一个名为“.Net Framework”的节点。选择它并按F4以显示属性窗口。

In the Properties window there will be a row named "Version" with the value 3.5.XXX. This is a combo box. Switch it to the 2.0.50727 value.

在“属性”窗口中,将有一行名为“Version”的行,其值为3.5.XXX。这是一个组合框。将其切换到2.0.50727值。

#2


Sure. Right-click on the setup project, choose Properties. In the properties window, click on the "Prerequisites" button and select whatever you like.

当然。右键单击安装项目,选择“属性”。在属性窗口中,单击“先决条件”按钮,然后选择您喜欢的任何内容。

#3


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. This enables a smaller, faster, and simpler installation of .NET client applications.

从.NET 3.5 SP1开始,您还可以使用.NET客户端配置文件仅部署.NET Framework中通常用于客户端应用程序方案的那些程序集和文件。这样可以实现更小,更快,更简单的.NET客户端应用程序安装。

Further information is available in this blog post.

有关详细信息,请参阅此博客文章。

#1


Yes. By default a setup project in VS2008 will want to include the 3.5 redistributable. You need to switch that to the 2.0 redistributable. Try the following

是。默认情况下,VS2008中的安装项目将包含3.5可再发行组件。您需要将其切换到2.0可再发行组件。请尝试以下方法

Your setup project should have a folder called "Detected Dependencies" when viewed in Solution Explorer. One of the values will be "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". Select that and hit F4 to bring up the properties window.

在解决方案资源管理器中查看时,您的安装项目应该有一个名为“Detected Dependencies”的文件夹。其中一个值是“Microsoft .Net Framework”。双击该节点,打开“启动条件”页面。树中将有一个名为“.Net Framework”的节点。选择它并按F4以显示属性窗口。

In the Properties window there will be a row named "Version" with the value 3.5.XXX. This is a combo box. Switch it to the 2.0.50727 value.

在“属性”窗口中,将有一行名为“Version”的行,其值为3.5.XXX。这是一个组合框。将其切换到2.0.50727值。

#2


Sure. Right-click on the setup project, choose Properties. In the properties window, click on the "Prerequisites" button and select whatever you like.

当然。右键单击安装项目,选择“属性”。在属性窗口中,单击“先决条件”按钮,然后选择您喜欢的任何内容。

#3


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. This enables a smaller, faster, and simpler installation of .NET client applications.

从.NET 3.5 SP1开始,您还可以使用.NET客户端配置文件仅部署.NET Framework中通常用于客户端应用程序方案的那些程序集和文件。这样可以实现更小,更快,更简单的.NET客户端应用程序安装。

Further information is available in this blog post.

有关详细信息,请参阅此博客文章。