2010-05-10 3 views
12

Nous essayons de publier une application ClickOnce via MSBuild. Nous l'avons bien fonctionné pour une version installée de l'application Windows. Cependant, lorsque nous définissons install sur false, pour qu'il exécute simplement l'application à partir du Web, nous obtenons l'erreur suivante lorsque nous essayons d'exécuter l'application à partir de l'URL: "Le déploiement et l'application n'ont pas de zones de sécurité correspondantes "Cela fonctionne très bien dans Internet   Explorer. Nous recevons seulement le message d'erreur dans Chrome et FireFox.Erreur MSBuild ClickOnce: "Le déploiement et l'application n'ont pas de zones de sécurité correspondantes"

Voici un exemple des paramètres du fichier de projet.

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

Répondre

16

Voici la réponse de Microsoft au fil que j'ai posté sur leur forum. Fondamentalement, ils ont supporté le chrome à l'époque, mais maintenant il y a un plugin pour Chrome here qui fonctionne très bien.

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

Je reçois toujours cette erreur sur VS2013 ... Ces gars-là n'ont jamais appris. Ne peut pas croire à quel point VSTO est buggé !!!!!!!!!!! 1 – Hristo

+1

Le lien dans la réponse est cassé. Mais vous pouvez rechercher "clickonce" sur la boutique en ligne et trouver un certain nombre d'options: https://chrome.google.com/webstore/search/clickonce J'ai utilisé Meta4 ClickOnce Launcher et cela a bien fonctionné. – Rossco

7

J'ai trouvé une solution que je serais heureux de partager avec vous. Vous pouvez le faire avec MageUI ou avec Visual Studio. Je suis vraiment ravi d'utiliser ClickOnce car mon déploiement fonctionne maintenant avec Internet Explorer  , Chrome et Firefox.

MageUI

Si vous utilisez MageUI, vous devez vérifier Include the provider URL in the Manifest et tapez l'URL associée du serveur Web.

Visual Studio

Si vous utilisez Microsoft Visual Studio, puis sur la Publier onglet des propriétés du projet, cliquez sur les mises à jour ... bouton, puis à l'emplacement de mise à jour, tapez l'URL le serveur Web de publication.

Questions connexes