Skip to content

Commit

Permalink
attributes, contracts, and their applications (#135)
Browse files Browse the repository at this point in the history
* attributes, contracts, and their applications

* formatting

* Deprecated attribute causing csc.exe to crash

* PR feedback
  • Loading branch information
Scottj1s authored Apr 14, 2020
1 parent 7b9de18 commit aa9d495
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 47 deletions.
1 change: 0 additions & 1 deletion UnitTest/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
-include TestComponentCSharp
-include Windows.Foundation
-exclude Windows.Foundation.Diagnostics
-exclude Windows.Foundation.Metadata
</CsWinRTParams>
</PropertyGroup>
<WriteLinesToFile
Expand Down
6 changes: 0 additions & 6 deletions UnitTest/UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
<RunPostBuildEvent>Always</RunPostBuildEvent>
<ProjectName>UnitTest</ProjectName>
<LangVersion>8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup>
<NoWarn>1701;1702;0436;1658</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" Condition="'$(BuildingInsideVisualStudio)'=='true'" />
<Target Name="Build" Condition="'$(BuildingInsideVisualStudio)'!='true'" />
<Target Name="Clean" />
</Project>
16 changes: 0 additions & 16 deletions WinUI/WinUIProjection/Microsoft.UI.Xaml.Markup.ContentProperty.cs

This file was deleted.

36 changes: 28 additions & 8 deletions WinUI/WinUIProjection/WinUIProjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
</PropertyGroup>

<PropertyGroup>
<GenerateTestProjection Condition="'$(GenerateTestProjection)$(Configuration)' == 'Release'">true</GenerateTestProjection>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>8305</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -23,7 +25,7 @@
<InternalsVisibleTo Include="WinUITest"/>
</ItemGroup>

<Target Name="GenerateWinUIProjection" BeforeTargets="CoreCompile">
<Target Name="GenerateWinUIProjection" BeforeTargets="CoreCompile" Condition="'$(GenerateTestProjection)' == 'true'">
<ItemGroup>
<!--PkgMicrosoft_UI_Xaml is defined by Nuget reference-->
<WinUIWinMDs Include="$(PkgMicrosoft_WinUI)/**/*.winmd" />
Expand All @@ -35,13 +37,31 @@
</PropertyGroup>
<PropertyGroup>
<CsWinRTParams>
-verbose
-in 10.0.18362.0 @(WinUIWinMDs->'"%(FullPath)"', ' ')
-out "$(ProjectDir)Generated Files"
-include Microsoft Windows
-exclude Windows.UI.Xaml
-include Windows.UI.Xaml.Interop
-exclude Windows.ApplicationModel.Store.Preview
-verbose
-in 10.0.18362.0 @(WinUIWinMDs->'"%(FullPath)"', ' ')
-out "$(ProjectDir)Generated Files"
-include Microsoft
-include Windows
-exclude Windows.UI.Xaml
-include Windows.UI.Xaml.Interop
-exclude Windows.ApplicationModel.Store.Preview
# Note: WUX attribute definitions are hardcoded into the kit's WinRTBase.idl.
# The WinUI nuget should provide a custom version of this file to produce MUX-only winmds.
# In the meantime, we'll continue to project the WUX attributes.
-include Windows.UI.Xaml.Markup.ContentPropertyAttribute
-include Windows.UI.Xaml.StyleTypedPropertyAttribute
-include Windows.UI.Xaml.TemplatePartAttribute
-include Windows.UI.Xaml.TemplateVisualStateAttribute
-include Windows.UI.Xaml.Data.BindableAttribute
-include Windows.UI.Xaml.Markup.ContentPropertyAttribute
-include Windows.UI.Xaml.Markup.FullXamlMetadataProviderAttribute
-include Windows.UI.Xaml.Markup.MarkupExtensionReturnTypeAttribute
-include Windows.UI.Xaml.Media.Animation.ConditionallyIndependentlyAnimatableAttribute
-include Windows.UI.Xaml.Media.Animation.IndependentlyAnimatableAttribute
-include Windows.UI.Xaml.Media.Animation.ConditionallyIndependentlyAnimatableAttribute
# Because we pull in Windows.UI.Xaml attributes, the Duration addition is included,
# which in turn requires the DurationType projection
-include Windows.UI.Xaml.DurationType
</CsWinRTParams>
</PropertyGroup>
<MakeDir Directories="$(ProjectDir)Generated Files"/>
Expand Down
Loading

0 comments on commit aa9d495

Please sign in to comment.