Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions PolyPilot/PolyPilot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,31 @@
<TrimmerRootAssembly Include="CommunityToolkit.Maui.Core" RootMode="All" />
</ItemGroup>

<!-- Work around a packaging bug in Microsoft.Maui.DevFlow.Blazor where the PRI
references wwwroot assets under lib/ but the NuGet package only ships them
under staticwebassets/. Copy the files so the WinUI resource system finds them.
Only runs for Debug Windows builds (DevFlow is excluded from Release via
conditional PackageReference). Source-existence guards make this a no-op when
the package version changes or the upstream fix ships. -->
<Target Name="_FixDevFlowBlazorWwwroot"
BeforeTargets="AssignTargetPaths;_CopySourceItemsToOutputDirectory"
Condition="'$(Configuration)' == 'Debug' And $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<PropertyGroup>
<_DevFlowPkgRoot>$([System.IO.Path]::Combine('$(NuGetPackageRoot)', 'microsoft.maui.devflow.blazor', '0.1.0-preview.4.26202.3'))</_DevFlowPkgRoot>
<_DevFlowStaticSrc>$(_DevFlowPkgRoot)\staticwebassets</_DevFlowStaticSrc>
<_DevFlowWwwrootDest>$(_DevFlowPkgRoot)\lib\net10.0-windows10.0.19041\Microsoft.Maui.DevFlow.Blazor\wwwroot</_DevFlowWwwrootDest>
</PropertyGroup>
<MakeDir Directories="$(_DevFlowWwwrootDest)" Condition="Exists('$(_DevFlowStaticSrc)') And !Exists('$(_DevFlowWwwrootDest)')" />
<Copy SourceFiles="$(_DevFlowStaticSrc)\chobitsu.js"
DestinationFolder="$(_DevFlowWwwrootDest)"
SkipUnchangedFiles="true"
Condition="Exists('$(_DevFlowStaticSrc)\chobitsu.js') And !Exists('$(_DevFlowWwwrootDest)\chobitsu.js')" />
<Copy SourceFiles="$(_DevFlowStaticSrc)\Microsoft.Maui.DevFlow.Blazor.lib.module.js"
DestinationFolder="$(_DevFlowWwwrootDest)"
SkipUnchangedFiles="true"
Condition="Exists('$(_DevFlowStaticSrc)\Microsoft.Maui.DevFlow.Blazor.lib.module.js') And !Exists('$(_DevFlowWwwrootDest)\Microsoft.Maui.DevFlow.Blazor.lib.module.js')" />
</Target>

<!-- The SDK registers the copilot CLI as ContentWithTargetPath but doesn't set
PublishFolderType, so MAUI skips it when building the .app bundle.
Re-register with PublishFolderType=Assembly so it lands in MonoBundle
Expand Down