Skip to content

Commit

Permalink
Improve the .NET Framework target IntelliSense and debugging experience.
Browse files Browse the repository at this point in the history
Co-authored-by: AndromedaMelody <57533055+AndromedaMelody@users.noreply.github.com>
  • Loading branch information
MouriNaruto and AndromedaMelody committed Feb 18, 2024
1 parent d654d6a commit 3e90edd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
21 changes: 0 additions & 21 deletions Mile.Xaml/NuGet/net48/Mile.Xaml.AfterImport.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,6 @@
DEVELOPER: AndromedaMelody (github.com/AndromedaMelody)
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Enable Xaml IntelliSense -->
<PropertyGroup Condition="'$(MileXamlEnableIntelliSenseForDotNet)' != 'false'">
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformMoniker>Windows,Version=$(TargetPlatformVersion)</TargetPlatformMoniker>
<TargetPlatformDisplayName>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName('Windows', $(TargetPlatformVersion)))</TargetPlatformDisplayName>
<SupportedOSPlatformVersion>$(TargetPlatformMinVersion)</SupportedOSPlatformVersion>
</PropertyGroup>
<Target Name="RestoreTargetPlatformIdentifier" Condition="'$(MileXamlEnableIntelliSenseForDotNet)' != 'false'" BeforeTargets="BeforeBuild">
<PropertyGroup>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
</PropertyGroup>
</Target>

<!-- Enable XAML Compiler -->
<PropertyGroup>
<VCInstallDir>Empty</VCInstallDir>
Expand All @@ -33,11 +19,4 @@
</PropertyGroup>
<Import Project="$(WindowsKitsXamlCompilerTargetsPath)" />
<Import Condition="'$(OutputType)' == 'Library'" Project="$(MSBuildThisFileDirectory)\Microsoft.WinUI.NET.Markup.Compiler.targets" />

<!-- Must use .NET SDK and install Windows SDK -->
<Target Name="CheckNetSdkEnvironment" BeforeTargets="BeforeBuild">
<Error Text="Must use .NET SDK." Condition="'$(UsingMicrosoftNETSdk)' != 'true'" />
<Error Text="Can't find Windows.UI.Xaml Compiler, please install Microsoft.Windows.SDK.CPP in NuGet Package Manager." Condition="!Exists($(WindowsKitsXamlCompilerTargetsPath))" />
</Target>

</Project>
4 changes: 2 additions & 2 deletions Mile.Xaml/NuGet/net48/Mile.Xaml.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
DEVELOPER: AndromedaMelody (github.com/AndromedaMelody)
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<!-- Remove UWP Default Main Method -->
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
Expand All @@ -29,6 +28,7 @@
$(MSBuildThisFileDirectory)\Mile.Xaml.AfterImport.targets;
$(MSBuildThisFileDirectory)..\MrtCore.PriGen.targets;
</CustomAfterMicrosoftCommonTargets>
<!-- Set the XAML runtime setting to UAP to workaround -->
<DefaultXamlRuntime>UAP</DefaultXamlRuntime>
</PropertyGroup>

</Project>
6 changes: 6 additions & 0 deletions Mile.Xaml/NuGet/net48/Mile.Xaml.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@
<ItemGroup Condition="'$(MileXamlNoSunValleyXamlStyle)' != 'true'">
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\Redist\Styles\Mile.Xaml.Styles.SunValley.xbf" />
</ItemGroup>

<!-- Must use .NET SDK and install Windows SDK -->
<Target Name="CheckNetSdkEnvironment" BeforeTargets="BeforeBuild">
<Error Text="Must use .NET SDK." Condition="'$(UsingMicrosoftNETSdk)' != 'true'" />
<Error Text="Can't find Windows.UI.Xaml Compiler, please install Microsoft.Windows.SDK.CPP in NuGet Package Manager." Condition="!Exists($(WindowsKitsXamlCompilerTargetsPath))" />
</Target>
</Project>
3 changes: 2 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ and [NanaGet](https://github.com/M2Team/NanaGet) were also created.

- Provide XAML Compiler, XAML Designer and XAML Hot Reload support.
- Provide Windows 11 XAML controls styles for Windows Runtime XAML controls.
- Provide C/C++ projects and .NET Framework (Work In Progress) projects support.
- Provide C/C++ projects and .NET Framework (Visual Studio 2022 Version 17.9.0
or later) projects support.
- Integrate all features from Microsoft.Toolkit.Win32.UI.XamlApplication.
- Provide support for responding to Windows theme changes from dark to light
or vice versa at run time.
Expand Down

0 comments on commit 3e90edd

Please sign in to comment.