2010-05-10 154 views
12

我们正试图通过MSBuild发布ClickOnce应用程序。我们已经为安装的Windows应用程序版本正常工作。MSBuild ClickOnce错误:“部署和应用程序没有匹配的安全区域”

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

以下是项目文件设置的示例。

<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> 

回答

16

以下是微软对我在论坛上发布的帖子的回复。基本上他们确实支持Chrome,但现在有一个Chrome here的插件很好用。

Hi fbanderson,

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 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?

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

Sincerely,

Kira Qian

MSDN Subscriber Support in Forum

If you have any feedback on our support, please contact [email protected] Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the

+0

我仍然在VS2013上得到这个错误......这些人从来没有学过。不能相信多么有问题的VSTO !!!!!!!!!!! 1 – Hristo 2015-01-23 13:02:22

+1

答案中的链接被打破。但你可以在网上商店搜索'clickonce'并找到一些选项:https://chrome.google.com/webstore/search/clickonce我使用了Meta4 ClickOnce Launcher,它工作正常。 – Rossco 2016-06-19 21:31:26

7

我找到了一个解决方案,我很乐意与您分享。你可以用MageUI或Visual Studio来完成。我非常高兴使用ClickOnce,因为我的部署现在可以与Internet   Explorer,Chrome和Firefox一起使用。

MageUI

如果使用MageUI,你必须检查Include the provider URL in the Manifest并输入Web服务器的URL关联。

的Visual Studio

如果您使用Microsoft Visual Studio,然后在发布项目属性的选项卡,单击更新......按钮,然后在更新位置,键入的URL发布Web服务器。

相关问题