Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
807 views
in Technique[技术] by (71.8m points)

c++ - How can I configure what .NET version should be installed by windows installer in VS 2017

Currently I am working on a project that needs .NET 4.0 to work properly but when I configure the windows installer and try to install it is trying to install the latest version of .NET. So how can I configure the windows installer to install the .NET version on which the project was created. Also I would like to know how to include the Visual C++ Redistributable in my installer.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

When you create a setup project and add primary output of a project to the setup project, the setup project automatically detect dependencies including Microsoft .Net Framework. To see if the detected dependency is correctly what you need, you cam see the following locations:

  1. First of all, right click on Dependencies and click on Refresh Dependencies.

  2. Check prerequisites for your project:

    • Right click on setup project and choose Properties.
    • In Properties dialog, from the Configurations combo box choose the configuration, and repeat the following steps for both Debug and Release.
    • Click on Prerequisites... button to open Prerequisites.
    • In the Prerequisites dialog, check the desired .Net Framework version.
    • Press OK and Make sure you repeat above steps for both Debug and Release.
  3. Check Launch Conditions for your setup project:

    • Right click on setup project and from View select Launch Conditions:
    • Then under Launch COnditions node, select .Net Framework node and right click and select Properties Window.
    • In Properties Window check the Version property for .Net Framework launch condition.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...