如何在VB中创建可在任何Windows平台上运行的应用程序? [英] How do I make applications in VB that will run in any windows platform ?

查看:217
本文介绍了如何在VB中创建可在任何Windows平台上运行的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2013 Pro中创建了一个test_db_application。



但每当我遇到另一个操作系统,如Windows 8.1,Windows 8或



Windows 7( VMware / Friend PC)他们说这个应用程序与这个Windows版本不兼容。但它的作用就像我当前设置中的魅力一样



注意:我当前的设置环境。



Windows 10 Pro

Visual Studio 2013

SQL Server 2008快递版



任何想法?



我尝试过:



尝试在Windows 8.1中启动(VMWARE / Friends PC)

尝试在Windows 8中启动(VMWARE / Friends PC)

尝试在Windows 7中启动( VMWARE / Friends PC)

尝试在Windows XP中启动(VMWARE / Friends PC)

解决方案

如果您希望自己的应用程序在旧版本上运行平台,然后选择较旧的.NET平台,如 .NET 3.5 。您可以在项目设置中执行此操作。

但请注意,Windows 3.5中默认情况下似乎没有安装.NET 3.5。

过去,您始终可以依赖在旧的.NET版本存在,但遗憾的是现在事情变得更复杂......



另一种方法可能是创建 .NET Core 自包含的应用程序,但是你不能选择Winforms应用程序。

这里有一个简单的例子:在Visual Studio 2017中使用.NET Core和Visual Basic构建Hello World应用程序Microsoft Docs [ ^ ]

当你准备好.NET Core应用程序时,你需要发布它以获得一个包含所有neede .NET Core dll的独立应用程序。

Well I had made a test_db_application in Visual Studio 2013 Pro.

But whenever I run into another operating system like Windows 8.1, Windows 8 or

Windows 7 (VMware/Friend PC) they says "This application is not compatible with this windows version." But its works like charm in my current setup

Note: My current setup environment.

Windows 10 Pro
Visual Studio 2013
SQL Server 2008 express edition

any ideas ?

What I have tried:

Tried launching in Windows 8.1 (VMWARE/Friends PC)
Tried launching in Windows 8 (VMWARE/Friends PC)
Tried launching in Windows 7 (VMWARE/Friends PC)
Tried launching in Windows XP (VMWARE/Friends PC)

解决方案

If you want your app to run on older platforms, then choose an older .NET platform like .NET 3.5. You can do this in your project settings.
But watch out, .NET 3.5 seems not to be installed by default in Windows 10.
In the past you could always depend on older .NET versions being present, but sadly things are getting a bit more complicated nowadays ...

Another way might be to create a .NET Core application that is self-contained, but then you can not opt for a Winforms application.
See here for a simple example: Building a Hello World application with .NET Core and Visual Basic in Visual Studio 2017 | Microsoft Docs[^]
When you have your .NET Core app ready, you will need to 'publish' it to get a self-contained app with all the neede .NET Core dll's.


这篇关于如何在VB中创建可在任何Windows平台上运行的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆