XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEWorkflow

【WinUI】XFE基于windows的工作流

公开
关注 0 Fork 0 Star 0
UTF-8
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>
    <LangVersion>14.0</LangVersion>
    <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
    <RootNamespace>XFEWorkflow</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;ARM64</Platforms>
    <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
    <Platform Condition="'$(Platform)' == 'AnyCPU'">x64</Platform>
    <RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-$([System.String]::Copy('$(Platform)').ToLowerInvariant())</RuntimeIdentifier>
    <PublishProfile>win-$(Platform).pubxml</PublishProfile>
    <UseWinUI>true</UseWinUI>
    <Version>1.0.0</Version>
    <EnableMsixTooling>true</EnableMsixTooling>
    <WindowsPackageType>None</WindowsPackageType>
    <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <None Remove="Views\LogViewPage.xaml" />
  </ItemGroup>
  
  <ItemGroup>
    <Content Update="Assets\**">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Using Include="XFEWorkflow.ViewModels" />
    <Using Include="XFEWorkflow.Views" />
    <Using Include="Microsoft.UI.Xaml" />
    <Using Include="Microsoft.UI.Xaml.Controls" />
  </ItemGroup>

  <ItemGroup>
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>

  <!--
    Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
    Tools extension to be activated for this project even if the Windows App SDK Nuget
    package has not yet been restored.
  -->
  <ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
    <ProjectCapability Include="Msix" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.2705" />
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="2.5.1" />
    <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
    <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.251219" />
    <PackageReference Include="System.Drawing.Common" Version="10.0.12" />
    <PackageReference Include="XFEExtension.NetCore.AutoConfig" Version="4.1.2" />
    <PackageReference Include="XFEExtension.NetCore.AutoPath" Version="2.0.0" />
    <PackageReference Include="XFEExtension.NetCore.XFEConsole" Version="2.6.0" />
    <PackageReference Include="XFEExtension.NetCore.WinUIHelper" Version="2.0.1" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\XFEWorkflow.Core\XFEWorkflow.Core.csproj" />
    <ProjectReference Include="..\XFEWorkflow.Desktop.Sdk\XFEWorkflow.Desktop.Sdk.csproj" />
    <ProjectReference Include="..\XFEWorkflow.Plugins.AgentBrowser.WinUI\XFEWorkflow.Plugins.AgentBrowser.WinUI.csproj" ReferenceOutputAssembly="false" />
    <ProjectReference Include="..\XFEWorkflow.Infrastructure\XFEWorkflow.Infrastructure.csproj" />
    <ProjectReference Include="..\XFEWorkflow.Plugins.Desktop\XFEWorkflow.Plugins.Desktop.csproj" />
    <ProjectReference Include="..\XFEWorkflow.Plugins.Standard\XFEWorkflow.Plugins.Standard.csproj" ReferenceOutputAssembly="false" />
    <ProjectReference Include="..\XFEWorkflow.Plugins.Vision\XFEWorkflow.Plugins.Vision.csproj" />
    <ProjectReference Include="..\XFEWorkflow.Plugins.WeCom\XFEWorkflow.Plugins.WeCom.csproj" />
    <ProjectReference Include="..\XFEWorkflow.Runner\XFEWorkflow.Runner.csproj" ReferenceOutputAssembly="false" />
  </ItemGroup>
  <ItemGroup>
    <Content Remove="Assets\Editor\**" />
    <None Remove="Assets\Editor\**" />
    <None Include="Assets\Editor\**" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
  </ItemGroup>
  <Target Name="CopyWorkflowBundles" AfterTargets="Build">
    <MSBuild Projects="..\XFEWorkflow.Runner\XFEWorkflow.Runner.csproj" Targets="GetTargetPath" Properties="Configuration=$(Configuration);Platform=$(Platform)">
      <Output TaskParameter="TargetOutputs" ItemName="_RunnerTarget" />
    </MSBuild>
    <MSBuild Projects="..\XFEWorkflow.Plugins.Standard\XFEWorkflow.Plugins.Standard.csproj" Targets="GetTargetPath" Properties="Configuration=$(Configuration);Platform=$(Platform)">
      <Output TaskParameter="TargetOutputs" ItemName="_StandardTarget" />
    </MSBuild>
    <MSBuild Projects="..\XFEWorkflow.Plugins.Desktop\XFEWorkflow.Plugins.Desktop.csproj" Targets="GetTargetPath" Properties="Configuration=$(Configuration);Platform=$(Platform)">
      <Output TaskParameter="TargetOutputs" ItemName="_DesktopTarget" />
    </MSBuild>
    <MSBuild Projects="..\XFEWorkflow.Plugins.Vision\XFEWorkflow.Plugins.Vision.csproj" Targets="GetTargetPath" Properties="Configuration=$(Configuration);Platform=$(Platform)">
      <Output TaskParameter="TargetOutputs" ItemName="_VisionTarget" />
    </MSBuild>
    <MSBuild Projects="..\XFEWorkflow.Plugins.WeCom\XFEWorkflow.Plugins.WeCom.csproj" Targets="GetTargetPath" Properties="Configuration=$(Configuration);Platform=$(Platform)">
      <Output TaskParameter="TargetOutputs" ItemName="_WeComTarget" />
    </MSBuild>
    <MSBuild Projects="..\XFEWorkflow.Plugins.AgentBrowser.WinUI\XFEWorkflow.Plugins.AgentBrowser.WinUI.csproj" Targets="GetTargetPath" Properties="Configuration=$(Configuration);Platform=$(Platform)">
      <Output TaskParameter="TargetOutputs" ItemName="_AgentBrowserTarget" />
    </MSBuild>
    <Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\..\..\tools\Copy-Bundles.ps1&quot; -Output &quot;$(TargetDir).&quot; -Runner &quot;@(_RunnerTarget)&quot; -Standard &quot;@(_StandardTarget)&quot; -Desktop &quot;@(_DesktopTarget)&quot; -Vision &quot;@(_VisionTarget)&quot; -WeCom &quot;@(_WeComTarget)&quot; -AgentBrowser &quot;@(_AgentBrowserTarget)&quot;" />
  </Target>
  <ItemGroup>
    <Folder Include="Assets\Resources\" />
    <Folder Include="Models\" />
  </ItemGroup>
  <ItemGroup>
    <Page Update="Views\LogViewPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <Page Update="Styles\Colors.xaml">
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Update="Styles\ConverterResources.xaml">
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <Page Update="Views\MainPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>

  <!--
    Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
    Explorer "Package and Publish" context menu entry to be enabled for this project even if
    the Windows App SDK Nuget package has not yet been restored.
  -->
  <PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
    <HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
  </PropertyGroup>

  <PropertyGroup>
    <ImplicitUsings>enable</ImplicitUsings>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <ApplicationIcon>Assets\appicon.ico</ApplicationIcon>
  </PropertyGroup>
</Project>