Skip to content

Commit

Permalink
Forward Size, Rect and Point from WinRT.Runtime, fix MeasureOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
driver1998 committed Jul 26, 2024
1 parent f44dbe3 commit 6a8ff61
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
8 changes: 4 additions & 4 deletions ModernXamlCompiler/ModernXamlCompiler.msbuildproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<PropertyGroup>
<PackageId>DisposableMemory.ModernNetUAP.XamlCompiler</PackageId>
<Version>0.1.0-preview2</Version>
<Version>0.1.0-preview3</Version>
<Authors>driver1998</Authors>
<Description>UWP (Windows.UI.Xaml) Xaml Compiler support for Modern .NET</Description>
<PackageProjectUrl>https://github.com/driver1998/ModernNetUAP.XamlCompiler</PackageProjectUrl>
Expand All @@ -17,17 +17,17 @@
<ProjectReference Include="..\shims\SystemInteropServicesWindowsRuntimeShim\SystemInteropServicesWindowsRuntimeShim.csproj">
<OutputItemType>Content</OutputItemType>
<Pack>true</Pack>
<PackagePath>shims\netstandard2.0</PackagePath>
<PackagePath>shims</PackagePath>
</ProjectReference>
<ProjectReference Include="..\shims\SystemRuntimeWindowsRuntimeShim\SystemRuntimeWindowsRuntimeShim.csproj">
<OutputItemType>Content</OutputItemType>
<Pack>true</Pack>
<PackagePath>shims\netstandard2.0</PackagePath>
<PackagePath>shims</PackagePath>
</ProjectReference>
<ProjectReference Include="..\shims\SystemRuntimeWindowsRuntimeXamlShim\SystemRuntimeWindowsRuntimeXamlShim.csproj">
<OutputItemType>Content</OutputItemType>
<Pack>true</Pack>
<PackagePath>shims\netstandard2.0</PackagePath>
<PackagePath>shims</PackagePath>
</ProjectReference>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<XamlCompileReferencePathWinMD Include="$(WindowsSdkPath)\References\$(TargetPlatformVersion)\**\*.winmd" />

<!-- Add System.Runtime.WindowsRuntime shim -->
<XamlCompileReferencePathShims Include="$(MSBuildThisFileDirectory)..\shims\netstandard2.0\System.Runtime.InteropServices.WindowsRuntime.dll"/>
<XamlCompileReferencePathShims Include="$(MSBuildThisFileDirectory)..\shims\netstandard2.0\System.Runtime.WindowsRuntime.dll"/>
<XamlCompileReferencePathShims Include="$(MSBuildThisFileDirectory)..\shims\netstandard2.0\System.Runtime.WindowsRuntime.UI.Xaml.dll"/>
<XamlCompileReferencePathShims Include="$(MSBuildThisFileDirectory)..\shims\System.Runtime.InteropServices.WindowsRuntime.dll"/>
<XamlCompileReferencePathShims Include="$(MSBuildThisFileDirectory)..\shims\System.Runtime.WindowsRuntime.dll"/>
<XamlCompileReferencePathShims Include="$(MSBuildThisFileDirectory)..\shims\System.Runtime.WindowsRuntime.UI.Xaml.dll"/>

<ReferencePath Include="@(XamlCompileReferencePathShims)"/>
<ReferencePath Include="@(XamlCompileReferencePathWinMD)"/>
Expand Down
11 changes: 4 additions & 7 deletions shims/SystemRuntimeWindowsRuntimeShim/Shim.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System;
using System.Runtime.CompilerServices;
[assembly: TypeForwardedToAttribute(typeof(Windows.Foundation.Size))]
[assembly: TypeForwardedToAttribute(typeof(Windows.Foundation.Rect))]
[assembly: TypeForwardedToAttribute(typeof(Windows.Foundation.Point))]

namespace Windows.UI
{
Expand All @@ -18,11 +22,4 @@ public struct Color : IFormattable
string IFormattable.ToString(string format, IFormatProvider formatProvider) => throw new NotImplementedException();
public string ToString(IFormatProvider formatProvider) => throw new NotImplementedException();
}
}

namespace Windows.Foundation
{
internal struct Point { }
internal struct Rect { }
internal struct Size { }
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>System.Runtime.WindowsRuntime</AssemblyName>
<PublicSign>True</PublicSign>
<SignAssembly>true</SignAssembly>
Expand All @@ -12,4 +12,10 @@
<DelaySign>false</DelaySign>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.8" IncludeAssets="none" GeneratePathProperty="true">
</PackageReference>
<Reference Include="$(PkgMicrosoft_Windows_CsWinRT)\lib\net6.0\WinRT.Runtime.dll"/>
</ItemGroup>

</Project>

0 comments on commit 6a8ff61

Please sign in to comment.