手动XBAP发布

发布于 2024-08-09 13:46:00 字数 282 浏览 8 评论 0原文

我找到了一种手动发布常规 WPF 应用程序的方法,但我需要针对 WPF 浏览器应用程序使用相同的说明。以下是常规 WPF 应用程序操作指南: http://msdn .microsoft.com/en-us/library/xc3tc5xx(VS.80).aspx。如果有人知道我需要对法师命令进行哪些更改才能使其适用于 XBAP,请告诉我。谢谢。

I found a method to manually publish a regular WPF Application, but i need the same instructions for a WPF Browser app instead. Here is the regular WPF App howto: http://msdn.microsoft.com/en-us/library/xc3tc5xx(VS.80).aspx . If anyone knows what changes I need to make to my mage commands to make it work for XBAP please let me know. Thanks.

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

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

发布评论

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

评论(1

⒈起吃苦の倖褔 2024-08-16 13:46:00

我必须为我们的一位不喜欢文件或文件夹名称中的空格的客户更改默认的“应用程序文件”文件夹的名称,这意味着在发布后重新签署 xbap。这是我用来自动化该过程的 msbuild 脚本:

<Target Name="PublishWebsite" DependsOnTargets="CleanWebsiteOutputPath;CleanOutputPath;CleanWebsiteReleasePath">

    <!-- Compile Website -->
    <MSBuild Projects=".\Some.Namespace.Web.Site\Some.Namespace.UI.Web.Site.csproj" Targets="Clean;Rebuild;" Properties="Configuration=Release" />

    <!-- Copy Website files to release folder -->
    <ItemGroup>
        <SiteFiles Include="Some.Namespace.UI.Web.Site/**/*.*" />
    </ItemGroup>
    <Copy SourceFiles="@(SiteFiles)" DestinationFolder="..\rel\Website\%(RecursiveDir)" />

    <!-- Remove source code and source control files from website -->
    <CallTarget Targets="CleanWebsiteAfterPublish" />
    <Message Text="Website Published" />

    <!-- Rename "Application Files" folder and re-sign the xbap -->
    <StringReplace Pattern="\." InputString="$(ApplicationVersion)" Replace="_">
        <Output PropertyName="VersionUnderscored" TaskParameter="Result" />
    </StringReplace>
    <MSBuild Projects=".\Some.Namespace.UI.WPF\Some.Namespace.UI.WPF.csproj" Targets="Publish" Properties="Configuration=Release;" />
    <Exec Command="move "..\bin\Release\app.publish\Application Files" "..\bin\Release\app.publish\ApplicationFiles"" />
    <Exec Command="$(MageExe) -update ..\bin\Release\app.publish\SomeApp.xbap –AppManifest ..\bin\Release\app.publish\ApplicationFiles\SomeApp_$(VersionUnderscored)\SomeApp.exe.manifest -wpf true -cf ..\ext\Signing\SomeApp.pfx -pwd password" />

    <!-- Move published files to Release directory -->
    <ItemGroup>
        <XbapPublishFiles Include="..\bin\Release\app.publish\**\*.*" />
    </ItemGroup>
    <Copy SourceFiles="@(XbapPublishFiles)" DestinationFiles="@(XbapPublishFiles->'..\rel\Website\%(RecursiveDir)%(Filename)%(Extension)')" />
    <Message Text="XBAP Published" />
</Target>

I had to alter the name of the default "Application Files" folder for one of our customers who doesn't like spaces in file or folder names and this meant re-signing the xbap after the publish. Here's the msbuild script I use to automate the process:

<Target Name="PublishWebsite" DependsOnTargets="CleanWebsiteOutputPath;CleanOutputPath;CleanWebsiteReleasePath">

    <!-- Compile Website -->
    <MSBuild Projects=".\Some.Namespace.Web.Site\Some.Namespace.UI.Web.Site.csproj" Targets="Clean;Rebuild;" Properties="Configuration=Release" />

    <!-- Copy Website files to release folder -->
    <ItemGroup>
        <SiteFiles Include="Some.Namespace.UI.Web.Site/**/*.*" />
    </ItemGroup>
    <Copy SourceFiles="@(SiteFiles)" DestinationFolder="..\rel\Website\%(RecursiveDir)" />

    <!-- Remove source code and source control files from website -->
    <CallTarget Targets="CleanWebsiteAfterPublish" />
    <Message Text="Website Published" />

    <!-- Rename "Application Files" folder and re-sign the xbap -->
    <StringReplace Pattern="\." InputString="$(ApplicationVersion)" Replace="_">
        <Output PropertyName="VersionUnderscored" TaskParameter="Result" />
    </StringReplace>
    <MSBuild Projects=".\Some.Namespace.UI.WPF\Some.Namespace.UI.WPF.csproj" Targets="Publish" Properties="Configuration=Release;" />
    <Exec Command="move "..\bin\Release\app.publish\Application Files" "..\bin\Release\app.publish\ApplicationFiles"" />
    <Exec Command="$(MageExe) -update ..\bin\Release\app.publish\SomeApp.xbap –AppManifest ..\bin\Release\app.publish\ApplicationFiles\SomeApp_$(VersionUnderscored)\SomeApp.exe.manifest -wpf true -cf ..\ext\Signing\SomeApp.pfx -pwd password" />

    <!-- Move published files to Release directory -->
    <ItemGroup>
        <XbapPublishFiles Include="..\bin\Release\app.publish\**\*.*" />
    </ItemGroup>
    <Copy SourceFiles="@(XbapPublishFiles)" DestinationFiles="@(XbapPublishFiles->'..\rel\Website\%(RecursiveDir)%(Filename)%(Extension)')" />
    <Message Text="XBAP Published" />
</Target>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文