WebView2Rules.Project.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Rule Name="WebView2" DisplayName="WebView2" Order="75" PageTemplate="generic" xmlns="http://schemas.microsoft.com/build/2009/properties">
  3. <Rule.Categories>
  4. <Category Name="General" DisplayName="General" />
  5. <Category Name="wv2winrt" DisplayName="WinRT in Script" />
  6. </Rule.Categories>
  7. <Rule.DataSource>
  8. <DataSource Persistence="ProjectFile" HasConfigurationCondition="false" Label="Globals" />
  9. </Rule.DataSource>
  10. <BoolProperty Name="WebView2UseWinRT"
  11. DisplayName="Use WebView2 WinRT APIs"
  12. Description="Enables the WebView2 WinRT APIs for this project"
  13. Category="General" />
  14. <EnumProperty Name="WebView2LoaderPreference"
  15. DisplayName="Loader preference"
  16. Description="Switch between using a static library or a DLL for the WebView2Loader"
  17. Category="General">
  18. <EnumValue Name="Dynamic" DisplayName="Dynamic" Description="Sets the project to use a DLL for the WebView2Loader" />
  19. <EnumValue Name="Static" DisplayName="Static" Description="Sets the project to use a static library for the WebView2Loader" />
  20. </EnumProperty>
  21. <BoolProperty Name="WebView2UseDispatchAdapter"
  22. DisplayName="Use the wv2winrt tool"
  23. Description="Uses the wv2winrt tool that allows you to use WinRT objects with CoreWebView2.AddHostObjectToScript."
  24. Category="wv2winrt" />
  25. <StringProperty Name="WebView2DispatchAdapterOutputDir"
  26. DisplayName="Output directory"
  27. Description="Specifies the directory where source files generated by wv2winrt will be saved."
  28. Category="wv2winrt" />
  29. <StringProperty Name="WebView2DispatchAdapterNamespace"
  30. DisplayName="Output namespace"
  31. Description="Namespace where types generated by wv2winrt will be placed."
  32. Category="wv2winrt" />
  33. <BoolProperty Name="WebView2DispatchAdapterUseJavaScriptCase"
  34. DisplayName="Use JavaScript case"
  35. Description="Enables JavaScript casing in wv2winrt generated types"
  36. Category="wv2winrt" />
  37. <EnumProperty Name="WV2WinRTVerbosity"
  38. DisplayName="Verbosity"
  39. Description="Sets the importance of wv2winrt build messages"
  40. Category="wv2winrt">
  41. <EnumValue Name="low" DisplayName="low" Description="Enables messages when MSBuild verbosity is set to at least 'detailed'" />
  42. <EnumValue Name="normal" DisplayName="normal" Description="Enables messages when MSBuild verbosity is set to at least 'normal'" />
  43. <EnumValue Name="high" DisplayName="high" Description="Enables messages when MSBuild verbosity is set to at least 'minimal'" />
  44. </EnumProperty>
  45. <BoolProperty Name="WV2WinRTExplicitIncludesOnly"
  46. DisplayName="Explicit includes only"
  47. Description="Instead of implicitly including types referenced by included types, only types explicitly listed in an include will be included by wv2winrt."
  48. Category="wv2winrt" />
  49. <BoolProperty Name="WV2WinRTDisallowEmptyAdapter"
  50. DisplayName="Disallow empty adapter"
  51. Description="Enables build error when there are no winmd reference inputs to wv2winrt"
  52. Category="wv2winrt" />
  53. <BoolProperty Name="WV2WinRTWrapWebViewTypes"
  54. DisplayName="Wrap WebView2 types"
  55. Description="Includes WebView2 types in the types generated by wv2winrt"
  56. Category="wv2winrt" />
  57. <BoolProperty Name="WebView2WinRTWrapSystemTypes"
  58. DisplayName="Wrap system types"
  59. Description="Includes WinRT types from the Windows SDK in the types generated by wv2winrt"
  60. Category="wv2winrt" />
  61. <EnumProperty Name="WV2WinRTPlatformReferencesLevel"
  62. DisplayName="Platform references level"
  63. Description="Sets the level of platform references to take as input to wv2winrt. Changes to this property have the most impact for Desktop projects, where the default of matching C++/WinRT can have a dramatic impact on binary size. Setting this property to a value different to the default one may require manually adding references to WebView2WinRTAdditionalWinMDReferences."
  64. Category="wv2winrt">
  65. <EnumValue Name="explicit" DisplayName="Explicit references" Description="Resolves to platform references already resolved by the project. Behavior may vary depending on the project's target platform (UAP/Desktop)." />
  66. <EnumValue Name="foundation" DisplayName="Explicit references + Foundation contracts" Description="Resolves to explicit references + Foundation contracts from the SDK referenced by this project." />
  67. <EnumValue Name="match" DisplayName="Match C++/WinRT" Description="Resolves to the references set by C++/WinRT." />
  68. </EnumProperty>
  69. <StringListProperty Name="WebView2WinRTAdditionalWinMDReferences"
  70. DisplayName="Additional WinMD references"
  71. Description="List of paths to additional WinMD files to provide to wv2winrt"
  72. Category="wv2winrt" />
  73. <StringListProperty Name="WebView2DispatchAdapterIncludeFilters"
  74. DisplayName="Include filters"
  75. Description="List of namespaces or runtimeclass full names used to match types to include from referenced WinMD files"
  76. Category="wv2winrt" />
  77. <StringListProperty Name="WebView2DispatchAdapterExcludeFilters"
  78. DisplayName="Exclude filters"
  79. Description="List of namespaces or runtimeclass full names used to match types to exclude from referenced WinMD files"
  80. Category="wv2winrt" />
  81. </Rule>