C#Winforms App(.NET Framework)的设置项目不会创建启动菜单公司目录
我有两个使用VS2019构建的Winforms项目的版本。 “ AppNetCore”是使用Windows表单App(.NET Framework)模板的Windows表单App Template,“ AppNetFramework”编写的。除.NET Framework v4.8 vs .Net Core 5.0外,它们是相同的。
当我为每个应用程序创建一个设置项目时,我在目标计算机上的文件系统的“用户程序菜单”中添加了一个名为AppFirm的文件夹。然后,我为主输出(.NET Framework 4.8版本)或发布项目(.NET Core版本)创建快捷方式,然后将其移至AppFirm文件夹并构建设置项目。
我首先构建.NET框架版本,然后从IDE运行安装。它在“ A”部分的“开始”菜单中创建一个AppNetFramework图标。它不会创建AppFirm文件夹!
接下来,我构建“ AppNetCore”并从IDE运行其安装。它在“ A”部分的“开始”菜单中创建一个AppFirm文件夹,并且该文件夹包含“ AppNetCore”程序图标和“ AppNetFramework”图标! “ AppNetFramework”图标不再处于开始菜单级别。
我想要公司文件夹,但我不想为.NETCORE重写我的应用程序(前面只是测试工具)。有人知道如何在安装.NET Framework应用程序时获取公司文件夹?
谢谢, 李
I have two versions of a Winforms project built using VS2019. "AppNetCore" is written using the Windows Forms App template, "AppNetFramework" with the Windows Forms App (.NET Framework) template. Other than .NET framework v4.8 vs .NET Core 5.0, they are the same.
When I create a setup project for each of the apps, I add a folder called AppFirm to the "User's Programs Menu" of the File System on Target Machine. I then create a shortcut to the Primary Output (.NET Framework 4.8 version) or Publish Items (the .NET Core version) and move it to the the AppFirm folder and build the setup project.
I build the .NET Framework version first and run the Install from the IDE. It creates an AppNetFramework Icon in the start menu under the 'A' section. It does not create an AppFirm folder!
Next, I build "AppNetCore" and run its Install from the IDE. It creates an AppFirm folder in the start menu under the 'A' section, and the folder contains the "AppNetCore" program icon AND the "AppNetFramework" icon! The "AppNetFramework" icon is no longer at the start menu level.
I want the company folder, but I don't want to rewrite my app for .NETCore (the preceding was just a test vehicle). Anybody know how to get the company folder when installing a .NET framework app?
Thanks,
Lee
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哇。经过大量的网络搜索,我发现有人在Windows11中提到过(这是我碰巧使用的),微软试图变得聪明。如果在开始菜单上只有一个“公司”目录中只安装了一个应用程序(实际上只是一个级别),则它不会打扰显示文件夹,而是将应用程序直接放在菜单上(当然是字母表)。
该文件夹仍然存在,只是在开始菜单中没有显示。
试图自己聪明,我制作了两份应用程序快捷方式,并将它们都放在公司文件夹中。不去。该文件夹不仅没有显示,而且只添加了一个应用程序菜单!看来它也不让我在文件夹中添加文档文件以强制文件夹显示。该文件夹仍未显示。
最后,我创建了一个第二个虚拟项目,并将其包含在设置中。现在,我在“开始”菜单和两个应用程序中获取文件夹(但没有第二个快捷方式或文档文件)
Wow. After much net searching, I found someone who mentioned that in Windows11 (which is what I happen to be using), Microsoft is trying to be clever. If only one app is installed in a single 'company' directory (actually just one level down) on the start menu, it doesn't bother displaying the folder, and places the app directly on the menu (alphabetically, of course).
The folder still exists, it just isn't shown in the start menu.
Trying to be clever myself, I made two copies of the app shortcut and placed them both in the company folder. No go. Not only is the folder not displayed, but only one app is added to the start menu! It also seems that it won't let me add a document file to the folder to force a folder display. The folder is still not displayed.
Finally, I created a second dummy project and included it in the setup. Now I get the folder in the start menu and both apps (but NOT the second shortcut or the doc file)