.NET 2.0 Setup Project in Visual Studio 2008

坚强是说给别人听的谎言 提交于 2019-12-21 05:32:06

问题


I developed a win forms app targeting .net 2.0. All of this is in 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.

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.

Is it possible to make the setup project with only a prerequisite of 2.0 in VS 2008?


回答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

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.

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.




回答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.

Further information is available in this blog post.



来源:https://stackoverflow.com/questions/802579/net-2-0-setup-project-in-visual-studio-2008

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