【问题标题】:Minimum requirements for developed application [closed]开发应用程序的最低要求[关闭]
【发布时间】:2020-11-27 19:28:33
【问题描述】:

我正在使用 VS2019 开发应用程序,并且正在编写用户指南以使用它。有没有办法查看运行我的应用程序的最低(也是推荐的)硬件要求?我实际上使用的是 4.7.2 .NET Framework 版本。提前致谢。

【问题讨论】:

  • 这不取决于您的决定吗?当然,运行 .Net 4.7.2 有最低要求,您可以始终默认为:docs.microsoft.com/en-us/dotnet/framework/get-started/…
  • 好的,谢谢。我正在 Windows 10 上开发此应用程序。它是否也适用于已安装 .NET Framework 4.7.2 的旧系统?

标签: vb.net visual-studio-2019 .net-4.7.2


【解决方案1】:

如果这有任何用处(我认为它是,并使用它们),有几个选项可以强制 - 或至少突出 - 依赖关系:

  1. app.manifest 文件有一个部分,例如
<!-- 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>

您可以在其中添加先决条件。

清单还允许您设置与各种 Windows 版本的兼容性:

<!-- 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. 如果您的应用有安装程序 (setup.exe),您可以包含依赖项,例如特定的 .NET 版本、SQL Server、C++ 等库:

【讨论】:

    猜你喜欢
    • 2016-03-05
    • 1970-01-01
    • 2013-01-09
    • 1970-01-01
    • 2018-04-05
    • 1970-01-01
    • 1970-01-01
    • 2010-12-19
    • 2011-06-16
    相关资源
    最近更新 更多