Skip to content

Commit 5fd1c62

Browse files
committed
Conditionally exclude ModuleTypeLoaderNotFoundException.Desktop.cs
Prevents the desktop-specific exception file from being compiled for modern .NET target frameworks. This ensures correct multi-targeting behavior and aligns with the strategy to handle `.Desktop.cs` files introduced in previous refactorings.
1 parent 109bc4a commit 5fd1c62

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/Avalonia/Prism.Avalonia/Prism.Avalonia.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Prism.Avalonia helps you more easily design and build rich, flexible, and easy t
2828
<Compile Include="..\..\Wpf\Prism.Wpf\Navigation\Regions\**\*.cs" LinkBase="Navigation\Regions" />
2929

3030
<Compile Remove="..\..\Wpf\Prism.Wpf\Interactivity\InvokeCommandAction.cs" />
31+
<Compile Remove="..\..\Wpf\Prism.Wpf\Modularity\ModuleTypeLoaderNotFoundException.Desktop.cs" />
3132
<Compile Remove="..\..\Wpf\Prism.Wpf\Modularity\XamlModuleCatalog.cs" />
3233
<Compile Remove="..\..\Wpf\Prism.Wpf\Navigation\Regions\ItemMetadata.cs" />
3334
<Compile Remove="..\..\Wpf\Prism.Wpf\Navigation\Regions\Behaviors\BindRegionContextToDependencyObjectBehavior.cs" />

src/Wpf/Prism.Wpf/Prism.Wpf.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ Prism.Wpf helps you more easily design and build rich, flexible, and easy to mai
2323
<Reference Include="System.Configuration" />
2424
</ItemGroup>
2525

26+
<ItemGroup Condition=" !$(TargetFramework.StartsWith('net4')) ">
27+
<Compile Remove="Modularity\ModuleTypeLoaderNotFoundException.Desktop.cs" />
28+
<None Include="Modularity\ModuleTypeLoaderNotFoundException.Desktop.cs" />
29+
</ItemGroup>
30+
2631
<ItemGroup Condition=" $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' ">
2732
<Compile Remove="**\*.net45.cs" />
2833
<None Include="**\*.net45.cs" />

0 commit comments

Comments
 (0)