MSBuild ClickOnce错误:“部署和应用程序没有匹配的安全区域" [英] MSBuild ClickOnce error: "Deployment and application do not have matching security zones"

查看:166
本文介绍了MSBuild ClickOnce错误:“部署和应用程序没有匹配的安全区域"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正试图通过 MSBuild 发布ClickOnce应用程序.对于Windows应用程序的已安装版本,我们已经可以正常运行了.

We're trying to publish a ClickOnce application through MSBuild. We've got it working fine for an installed version of the Windows application.

但是,当我们将install设置为false时,它只能从Web运行该应用程序,而当尝试从URL运行该应用程序时,会出现以下错误:部署和应用程序没有匹配的安全区域"在Internet Explorer中可以正常工作.我们只会在Chrome和FireFox中收到错误消息.

However, when we set install to false, so that it just runs the application from the web, we get the following error when we try to run the application from the URL: "Deployment and application do not have matching security zones" This works fine in Internet Explorer. We only get the error message in Chrome and FireFox.

这是项目文件设置的示例.

Here is a sample of the project file settings.

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
  <PropertyGroup>
    <SrcTreeRoot>$(MSBuildProjectDirectory)\..\..\..</SrcTreeRoot>
    <!--ClickOnceDeployFolder>$(WebOutputDir)\AnalyzerPC</ClickOnceDeployFolder-->
    <ProjectGuid>{8205E593-F400-41AE-8D6F-DEA290B2DCF9}</ProjectGuid>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ApplicationIcon>Graphics\EDA Icon.ico</ApplicationIcon>
    <AssemblyName>DASHQueryBuilder</AssemblyName>
    <OutputType>WinExe</OutputType>
    <RootNamespace>TetraData.Analyzer</RootNamespace>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <OldToolsVersion>2.0</OldToolsVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <ManifestCertificateThumbprint>...</ManifestCertificateThumbprint>
    <GenerateManifests>true</GenerateManifests>
    <SignManifests>true</SignManifests>
    <SignAssembly>true</SignAssembly>
    <ManifestKeyFile>$(BuildDir)\Certificates\TetraDataCode.pfx</ManifestKeyFile>
    <ProductVersion>9.0.21022</ProductVersion>
    <PublishUrl>http://localhost/DASHQueryBuilder/</PublishUrl>
    <Install>false</Install>
    <!--InstallFrom>Web</InstallFrom-->
    <UpdateEnabled>false</UpdateEnabled>
    <MapFileExtensions>true</MapFileExtensions>
    <PublisherName>Follett Software Company</PublisherName>
    <TrustUrlParameters>true</TrustUrlParameters>
    <ApplicationRevision>0</ApplicationRevision>
    <UseApplicationTrust>false</UseApplicationTrust>
    <PublishWizardCompleted>true</PublishWizardCompleted>
    <BootstrapperEnabled>false</BootstrapperEnabled>
  </PropertyGroup>
  <Import Project="$(SrcTreeRoot)\Build\TaskInit.Tasks" />
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(SrcTreeRoot)\Build\TaskOverrides.Tasks" />
  <Import Project="$(MSBuildProjectDirectory)\Analyzer.csproj" />
  <PropertyGroup>
    <PublishDir>$(WebOutputDir)\DASH Query Builder\</PublishDir>
    <ApplicationVersion>$(MajorMinorVersion).0.0</ApplicationVersion>
  </PropertyGroup>
  <Target Name="BeforeResolveReferences">
    <Copy SourceFiles="$(MSBuildProjectDirectory)\DASHQueryBuilder.config" DestinationFiles="$(MSBuildProjectDirectory)\app.config" />
  </Target>
</Project>

推荐答案

下面是Microsoft对我在其论坛上发布的帖子的回答.基本上他们当时确实支持chrome,但现在此处的Chrome插件非常有效.

Below is Microsoft's answer to the thread I posted on their forum. Basically they did support chrome back then, but now there is a plugin for Chrome here that works great.

你好fbanderson,

Hi fbanderson,

我在Firefox中找到了一篇有关ClickOnce的文章.

I found an article talking about ClickOnce in Firefox.

http://windowsclient.net/wpf/wpf35/wpf-deploying-clickonce -ie-firefox.aspx

.NET Framework 3.5 SP1提供了一个名为.NET Framework的组件 助手1.0,用于处理ClickOnce .applications.如果你有 安装了该组件后,该对话框在FireFox中显示给您 包含一个运行ClickOnce应用程序"按钮.你看到那个按钮了吗 当您尝试启动该应用程序时?

.NET Framework 3.5 SP1 offers a component called .NET Framework Assistant 1.0 which handles ClickOnce .applications. If you have installed that component, the dialog appear to you in FireFox should contain a "Run ClickOnce application" button. Do you see that button when you trying to launch the app?

对于Google Chrome,我们没有经验.这是新的 浏览器,我们对此没有测试.

For Google Chrome, we don’t have experience for it. It is a new browser and we lack test on it.

此致

钱千拉(Kira Qian)

Kira Qian

论坛中的MSDN订户支持

MSDN Subscriber Support in Forum

如果您对我们的支持有任何反馈意见,请联系 msdnmg@microsoft.com请记住,如果出现以下情况,请将回复标记为答案 他们会提供帮助,如果他们没有提供帮助,则将其取消标记.欢迎来到

If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the

这篇关于MSBuild ClickOnce错误:“部署和应用程序没有匹配的安全区域"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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