我们正在尝试通过MSBuild发布ClickOnce应用程序。对于已安装的Windows应用程序版本,它可以正常工作。
然而,当我们将安装设置为false时,以便仅从Web运行应用程序时,我们在尝试从URL运行应用程序时会收到以下错误消息:"Deployment and application do not have matching security zones"。这在Internet Explorer中可以正常工作。我们只在Chrome和FireFox中收到错误消息。
以下是项目文件设置的示例。
然而,当我们将安装设置为false时,以便仅从Web运行应用程序时,我们在尝试从URL运行应用程序时会收到以下错误消息:"Deployment and application do not have matching security zones"。这在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>