Warm tip: This article is reproduced from serverfault.com, please click

Minimum requirements for developed application

发布于 2020-11-27 19:28:33

I'm developing an application with VS2019 and I'm writing the user guide to use it. Is there a way to see which are minimum (and also recomended) hardware requirements to run my application? I'm actually using a 4.7.2 .NET Framework version. Thanks in advance.

Questioner
telemaco10399
Viewed
0
SteveCinq 2020-11-28 07:50:24

There are a couple of options for enforcing - or at least highlighting - dependencies if this is of any use (I think it is, and use them):

  1. The app.manifest file has a section such as
<!-- Enable the below block to check for dependencies. Application should not start if they are not found. -->
<dependency>
  <dependentAssembly>
    <assemblyIdentity name="Some.Assembly" version="1.2.3.4" type="win32" publicKeyToken="728fe7fe44de4b05"/>
    <publisherPolicy apply="no"/>
  </dependentAssembly>
</dependency>

where you can add prerequisites.

The manifest also lets you set compatibility with various Windows versions:

<!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment. -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
  <application>
    <!-- Windows Vista and Windows Server 2008 functionality -->
    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
    <!-- Windows 7 and Windows Server 2008 R2 functionality -->
    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
    <!-- Windows 8 and Windows Server 2012 functionality -->
    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
    <!-- Windows 8.1 and Windows Server 2012 R2 functionality -->
    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
    <!-- Windows 10, Windows Server 2016 and Windows Server 2019 functionality -->
    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
  </application>
</compatibility>

  1. If your app has an installer (setup.exe) you can include dependencies such as a specific .NET version, libraries such as SQL Server, C++, etc:

enter image description here