先决条件 Setup.exe 单击一次 VS 2008 的错误 URL

发布于 2024-08-19 20:18:54 字数 4548 浏览 4 评论 0原文

我有这个麻烦:

我正在使用 VS 2008 Team Suite,并且我有 WinForms csproj。我想使用 ClickOnce 发布它。

在 csproj 的发布属性中,我有以下值:

发布文件夹位置(网站、 ftp 服务器或文件路径): C:\ClickOnce\Frk.Security.CarWin.WebInstall\Publicacion\

安装文件夹 URL(如果不同) 比上面): http://CHANGETHESERVER/carwinclickonce/Publicacion/

发布版本:1.0.0.0

先决条件:Windows Installer 3.1, .NET 35.sp1

现在,我发布了,一切正常。我需要将我的应用程序部署到多台计算机(开发、预生产、生产环境...),并且我使用 Msbuild...

<Microsoft.Sdc.Tasks.Folder.CopyFolder
    Source="Publicacion"
    Destination="$(Directorio_Destination)\Publicacion" />

我复制 C:\ClickOnce\Frk.Security.CarWin.WebInstall\Publicacion\ 到另一台计算机的文件夹中(此文件夹是网站的根目录)

\\desiis\c$\Webs\carwinclickonce\Publicacion\ 

(http://desiis/carwinclickonce/Publicacion /

我这样使用MSBUILD和Mage;变量 $(ProviderUrl) = http://desiis/carwinclickonce/Publicacion/

<Target Name="PublishClickOnce">
    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -pu $(ProviderUrl)" />

    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -cf $(CertDir)\Frk.Security.CarWin_TemporaryKey.pfx" />
  </Target>

现在,我已经发布了。 http://desiis/carwinclickonce/Publicacion/publish.htm 中的 htm。

有两个安装应用程序的链接: 1.) http://desiis/Carwinclickonce/Publicacion/Frk.Security.CarWin.application

这个选项一切正常。

  1. ) http://desiis/Carwinclickonce/Publicacion/Setup.exe

此选项会出错!

错误如下:

下载时出现错误 'http://CHANGETHESERVER/carwinclickonce/Publicacion/Frk.Security.CarWin.application'。 (尝试下载时失败 'http....Frk.Security.CarWin.application')

Vea el archivo de registro de la 安装 'C:\DOCUME~1\xxxxxx\CONFIG~1\Temp\VSD5B7.tmp\install.log' 获取更多信息。

install.log内容:

以下属性已被 设置:属性:[AdminUser] = true {boolean} 属性: [处理器架构] = 英特尔 {string} 属性:[VersionNT] = 5.1.3 {version} 运行包检查 “Windows Installer 3.1”,阶段

BuildList 以下属性 已为包“Windows”设置 安装程序 3.1':运行检查 命令 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' 运行算子的结果 'VersionGreaterThanOrEqualTo' 开启 属性“VersionMsi”和值“3.1”: true 命令检查结果 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' 是“绕过”“Windows Installer 3.1” 运行检查结果:无需安装

启动应用程序。 URLDownloadToCacheFile 失败 HRESULT '-2146697211' 错误:错误 意向性下载 'http://CHANGETHESERVER/carwinclickonce/Publicacion/Frk.Security.CarWin.application'。 (尝试下载时失败 'http....Frk.Security.CarWin.application')

有什么想法吗?我可以使用 Mage.exe 命令吗?如何修改setup.exe?

更新:

使用 msbuild 来使用 setup -url=http://desiis/....

<Exec Command="$(PublishDir)\setup -url=$(ProviderUrl)" />

另一个问题是使用/url 开关更改 URL,会出现一个消息框,用于手动确认签名对于程序集无效。

  1. 如何在静默模式下使用 setup -url=http://....?
  2. 如何再次对 setup.exe 进行签名?

我的msbuild

<Target Name="PublishClickOnce">

<Exec Command="$(PublishDir)\setup -url=$(ProviderUrl)" /> 
<Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -pu $(ProviderUrl)" /> 
<Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -cf $(CertDir)\Frk.Security.CarWin_TemporaryKey.pfx" /> 

</Target>

I have this trouble:

I am using VS 2008 Team Suite, and I have WinForms csproj. I want Publish it using ClickOnce.

In Publish Properties of csproj, I have these values:

Publishing Folder Location (web site,
ftp server, or file path):
C:\ClickOnce\Frk.Security.CarWin.WebInstall\Publicacion\

Installation Folder URL (if different
than above):
http://CHANGETHESERVER/carwinclickonce/Publicacion/

Publish Version: 1.0.0.0

Prerrequisites: Windows Installer 3.1,
.NET 35. sp1

Now, I publish and all is OK. I need deploy my app to several machines (Development, Preproduction, production environments...), and I use Msbuild...

<Microsoft.Sdc.Tasks.Folder.CopyFolder
    Source="Publicacion"
    Destination="$(Directorio_Destination)\Publicacion" />

I copy C:\ClickOnce\Frk.Security.CarWin.WebInstall\Publicacion\ to another machine, in folder (this folder is root of a Web Site)

\\desiis\c$\Webs\carwinclickonce\Publicacion\ 

(http://desiis/carwinclickonce/Publicacion/)

I use MSBUILD and Mage like this; variable $(ProviderUrl) = http://desiis/carwinclickonce/Publicacion/

<Target Name="PublishClickOnce">
    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -pu $(ProviderUrl)" />

    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -cf $(CertDir)\Frk.Security.CarWin_TemporaryKey.pfx" />
  </Target>

Now, I have my publish.htm in http://desiis/carwinclickonce/Publicacion/publish.htm.

There are two links to install application:
1. ) http://desiis/Carwinclickonce/Publicacion/Frk.Security.CarWin.application

Everything is OK for this option.

  1. ) http://desiis/Carwinclickonce/Publicacion/Setup.exe

This option gets errors!

The errors are the following:

Error al intentar descargar
'http://CHANGETHESERVER/carwinclickonce/Publicacion/Frk.Security.CarWin.application'.
(FAILS when try download
'http....Frk.Security.CarWin.application')

Vea el archivo de registro de la
instalación que se encuentra en
'C:\DOCUME~1\xxxxxx\CONFIG~1\Temp\VSD5B7.tmp\install.log'
para obtener más información.

install.log contents:

The following properties have been
set: Property: [AdminUser] = true
{boolean} Property:
[ProcessorArchitecture] = Intel
{string} Property: [VersionNT] = 5.1.3
{version} Running checks for package
'Windows Installer 3.1', phase

BuildList The following properties
have been set for package 'Windows
Installer 3.1': Running checks for
command
'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator
'VersionGreaterThanOrEqualTo' on
property 'VersionMsi' and value '3.1':
true Result of checks for command
'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
is 'Bypass' 'Windows Installer 3.1'
RunCheck result: No Install Needed

Launching Application.
URLDownloadToCacheFile failed with
HRESULT '-2146697211' Error: Error al
intentar descargar
'http://CHANGETHESERVER/carwinclickonce/Publicacion/Frk.Security.CarWin.application'.
(FAILS when try download
'http....Frk.Security.CarWin.application')

Any ideas? Can I use Mage.exe commands? How can I modify setup.exe?

Update:

use msbuild for using setup -url=http://desiis/....

<Exec Command="$(PublishDir)\setup -url=$(ProviderUrl)" />

Another problem is that after using the /url switch to change out the URL, a message box appears for manually confirming that the signature will be invalided for the assembly.

  1. How can use setup -url=http://.... in silent mode?
  2. How can I sign the setup.exe again?

My msbuild

<Target Name="PublishClickOnce">

<Exec Command="$(PublishDir)\setup -url=$(ProviderUrl)" /> 
<Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -pu $(ProviderUrl)" /> 
<Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -cf $(CertDir)\Frk.Security.CarWin_TemporaryKey.pfx" /> 

</Target>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

微暖i 2024-08-26 20:18:54

澄清一下,ClickOnce 可以工作。您的问题在于 Visual Studio 生成的用于安装先决条件的 setup.exe 引导程序文件。您使用伪造的服务器名称 (CHANGETHESERVER),并在稍后根据您部署到的服务器进行更改。 .application 文件的服务器名称可以轻松更改,但您不确定如何修复 setup.exe 文件,因为它尝试启动 http ://CHANGETHESERVER/... 安装先决条件后。这一切都正确吗?

我不确定如何更新您的 setup.exe 文件以指向正确的网址。不过,我不担心更新它。我将转到 Visual Studio,将“CHANGETHESERVER”更改为实际服务器(如您的开发服务器),然后发布。生成的 setup.exe 将适合您使用的服务器。保留该 .exe 的副本,并为其他服务器(QA、生产等)再次执行该过程。将服务器特定文件部署到每台服务器即可完成。

除非您添加/删除先决条件,否则 setup.exe 文件不会更改。无需每次部署时都生成和部署新的。

To clarify, ClickOnce works. Your problem is with the setup.exe bootstrapper file that Visual Studio generates to install prerequisites. You use a bogus server name (CHANGETHESERVER) and change it later depending on what server you deploy to. The server name can easily be changed for the .application file but you're unsure how to fix the setup.exe file since it tries to launch http://CHANGETHESERVER/... after installs the prereqs. Is all this correct?

I'm not sure how to update your setup.exe file to point to the proper url. However, I wouldn't worry about updating it. I would go to Visual Studio, change "CHANGETHESERVER" to an actual server (like your Development server), and publish. The setup.exe that's generated will be good for the server you used. Keep a copy of that .exe and do the process again for your other servers (QA, Production, etc.). Deploy the server specific files to each server and you're done.

The setup.exe files aren't going to change unless you're adding/removing prerequisites. There's no need to generate and deploy a new one every time you deploy.

殊姿 2024-08-26 20:18:54

更新:

现在,发布和全部都已完成。我需要在多台机器(开发、预生产、生产环境...)中部署我的发布,并且我使用 Msbuild。

然后,使用 MSBUILD

 <Microsoft.Sdc.Tasks.Folder.CopyFolder Source="Publicacion" Destination="$(Directorio_Destination)\Publicacion" />

我将 C:\ClickOnce\Frk.Security.CarWin.WebInstall\Publicacion\ 复制到另一台计算机的文件夹(此文件夹是网站的根目录)

\desiis\c$\Webs\carwinclickonce\Publicacion\

http://desiis/carwinclickonce/Publicacion/

我像这样使用MSBUILD和Mage;变量 $(ProviderUrl) = http://desiis/carwinclickonce/Publicacion/

<Target Name="PublishClickOnce">
    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -pu $(ProviderUrl)" />

    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -cf $(CertDir)\Frk.Security.CarWin_TemporaryKey.pfx" />
  </Target>

update:

Now, Publish and All is OK done. I need deploy my Publish in several machines (Development, Preproduction, production environments...), and I use Msbuild.

Then, using MSBUILD

 <Microsoft.Sdc.Tasks.Folder.CopyFolder Source="Publicacion" Destination="$(Directorio_Destination)\Publicacion" />

I copy C:\ClickOnce\Frk.Security.CarWin.WebInstall\Publicacion\ to another machine, in folder (this folder is root of a Web Site)

\desiis\c$\Webs\carwinclickonce\Publicacion\

(http://desiis/carwinclickonce/Publicacion/)

I use MSBUILD and Mage like this; variable $(ProviderUrl) = http://desiis/carwinclickonce/Publicacion/

<Target Name="PublishClickOnce">
    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -pu $(ProviderUrl)" />

    <Exec Command="$(Mage) -u $(PublishDir)\Frk.Security.CarWin.application -cf $(CertDir)\Frk.Security.CarWin_TemporaryKey.pfx" />
  </Target>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文