简体   繁体   English

C# - 项目部署(ClickOnce)

[英]C# - Project Deployment (ClickOnce)

I did a project and I used Visual Studio 2017 (Microsoft .NET Framework 4.6.1) - (Windows Form Applications) and SQL Server 2012 Express LocalDB for database operations. 我做了一个项目,我使用Visual Studio 2017(Microsoft .NET Framework 4.6.1) - (Windows窗体应用程序)和SQL Server 2012 Express LocalDB进行数据库操作。

I will run this project on clients' computers. 我将在客户的计算机上运行此项目。 As you can imagine, customers are not interested in database, software, etc. For this purpose, without making any installation on their computers, I'll just make the project work by giving the project file. 您可以想象,客户对数据库,软件等不感兴趣。为此,不在计算机上进行任何安装,我只需通过提供项目文件来使项目工作。 This is my FIRST comprehensive project. 这是我的第一个综合项目。

When I choose deployment attributes in "publish", "prerequisities" I ticked "Microsoft .NET Framework 4.6.1 (x86 and x64) and SQL Server 2012 Express LocalDB and I published it with "Download prerequisites from the component vendor's web site.". I test my software and it works fine. 当我在“发布”,“先决条件”中选择部署属性时,我勾选了“Microsoft .NET Framework 4.6.1(x86和x64)和SQL Server 2012 Express LocalDB,我发布了它”从组件供应商的网站下载先决条件。“我测试我的软件,它工作正常。

But when I choose "Download prerequisites from the same location as my application", it fails. 但是当我选择“从与我的应用程序相同的位置下载先决条件”时,它会失败。 I researched it on internet but I couldn't find any clear information. 我在互联网上研究了它,但我找不到任何明确的信息。 I want the user to download the prerequisites from my software file, so I want to choose "Download prerequisites from the same location as my application". 我希望用户从我的软件文件中下载先决条件,因此我想选择“从与我的应用程序相同的位置下载先决条件”。 I have "SqlCmdLnUtils.msi", "SqlLocalDB.msi", "sqlncli.msi" for both x86 and x64, and I have "NDP461-KB3102436-x86-x64-AllOS-ENU". 对于x86和x64,我有“SqlCmdLnUtils.msi”,“SqlLocalDB.msi”,“sqlncli.msi”,我有“NDP461-KB3102436-x86-x64-AllOS-ENU”。 I think I need to add the installers on my own computer to be able to do "Download prerequisites from the same location as my application". 我想我需要在我自己的计算机上添加安装程序,以便能够“从与我的应用程序相同的位置下载先决条件”。

But I don't know where I should add these installers in "C: \\ Program Files (x86) \\ Microsoft SDKs" or "C: \\ Program Files (x86) \\ Microsoft Visual Studio 14.0 \\ SDK". 但我不知道应该在“C:\\ Program Files(x86)\\ Microsoft SDKs”或“C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ SDK”中添加这些安装程序。

You are right, you have to download the packages first on your development computer. 你是对的,你必须先在开发计算机上下载这些软件包。

By default, the path is %ProgramFiles(x86)%\\Microsoft SDKs\\ClickOnce Bootstrapper\\Packages\\ 默认情况下,路径为%ProgramFiles(x86)%\\Microsoft SDKs\\ClickOnce Bootstrapper\\Packages\\

All the steps that are necessary to offer prerequisites from the same location as your application are described here . 此处描述从与应用程序相同的位置提供先决条件所需的所有步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM