diff --git a/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj b/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj index 71e06b830a2e..9949c79dbd61 100644 --- a/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj +++ b/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj @@ -7,6 +7,12 @@ true + + true + true + true + + true diff --git a/src/BlazorWebView/src/WindowsForms/BlazorWebView.cs b/src/BlazorWebView/src/WindowsForms/BlazorWebView.cs index 0af5f6fc0198..2d819bb965f1 100644 --- a/src/BlazorWebView/src/WindowsForms/BlazorWebView.cs +++ b/src/BlazorWebView/src/WindowsForms/BlazorWebView.cs @@ -170,7 +170,9 @@ private void StartWebViewCoreIfPossible() // We assume the host page is always in the root of the content directory, because it's // unclear there's any other use case. We can add more options later if so. string appRootDir; +#pragma warning disable IL3000 // 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. var entryAssemblyLocation = Assembly.GetEntryAssembly()?.Location; +#pragma warning restore IL3000 if (!string.IsNullOrEmpty(entryAssemblyLocation)) { appRootDir = Path.GetDirectoryName(entryAssemblyLocation)!; diff --git a/src/BlazorWebView/src/WindowsForms/Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj b/src/BlazorWebView/src/WindowsForms/Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj index 679fc335bcbc..3008e21d112f 100644 --- a/src/BlazorWebView/src/WindowsForms/Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj +++ b/src/BlazorWebView/src/WindowsForms/Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj @@ -12,6 +12,12 @@ true + + true + true + true + + true diff --git a/src/BlazorWebView/src/Wpf/BlazorWebView.cs b/src/BlazorWebView/src/Wpf/BlazorWebView.cs index 98d6a68ca62f..ad7747a5f7dd 100644 --- a/src/BlazorWebView/src/Wpf/BlazorWebView.cs +++ b/src/BlazorWebView/src/Wpf/BlazorWebView.cs @@ -255,7 +255,9 @@ private void StartWebViewCoreIfPossible() // We assume the host page is always in the root of the content directory, because it's // unclear there's any other use case. We can add more options later if so. string appRootDir; +#pragma warning disable IL3000 // 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. var entryAssemblyLocation = Assembly.GetEntryAssembly()?.Location; +#pragma warning restore IL3000 if (!string.IsNullOrEmpty(entryAssemblyLocation)) { appRootDir = Path.GetDirectoryName(entryAssemblyLocation)!; diff --git a/src/BlazorWebView/src/Wpf/Microsoft.AspNetCore.Components.WebView.Wpf.csproj b/src/BlazorWebView/src/Wpf/Microsoft.AspNetCore.Components.WebView.Wpf.csproj index a4b722ce6ab3..6a1c608e8ab2 100644 --- a/src/BlazorWebView/src/Wpf/Microsoft.AspNetCore.Components.WebView.Wpf.csproj +++ b/src/BlazorWebView/src/Wpf/Microsoft.AspNetCore.Components.WebView.Wpf.csproj @@ -12,6 +12,12 @@ true + + true + true + true + + true diff --git a/src/Compatibility/Core/src/Compatibility.csproj b/src/Compatibility/Core/src/Compatibility.csproj index 9c185620b649..23b3529955a2 100644 --- a/src/Compatibility/Core/src/Compatibility.csproj +++ b/src/Compatibility/Core/src/Compatibility.csproj @@ -8,7 +8,7 @@ iOS\ Windows\ Tizen\ - true + true true true $(NoWarn);CS1591 diff --git a/src/Compatibility/Core/src/Tizen/ResourcePath.cs b/src/Compatibility/Core/src/Tizen/ResourcePath.cs index 47671abfd080..b1fee46baf59 100644 --- a/src/Compatibility/Core/src/Tizen/ResourcePath.cs +++ b/src/Compatibility/Core/src/Tizen/ResourcePath.cs @@ -14,7 +14,7 @@ public static string GetPath(string res) return res; } - foreach (AppFW.ResourceManager.Category category in Enum.GetValues(typeof(AppFW.ResourceManager.Category))) + foreach (AppFW.ResourceManager.Category category in Enum.GetValues()) { var path = AppFW.ResourceManager.TryGetPath(category, res); diff --git a/src/Controls/Foldable/src/Controls.Foldable.csproj b/src/Controls/Foldable/src/Controls.Foldable.csproj index 8f2e10d0d09e..08ff3ce30ab3 100644 --- a/src/Controls/Foldable/src/Controls.Foldable.csproj +++ b/src/Controls/Foldable/src/Controls.Foldable.csproj @@ -9,6 +9,11 @@ $(NoWarn);CS1591 true + + true + true + true + True diff --git a/src/Controls/Maps/src/Controls.Maps.csproj b/src/Controls/Maps/src/Controls.Maps.csproj index 5576732cada8..1b4fe0949f70 100644 --- a/src/Controls/Maps/src/Controls.Maps.csproj +++ b/src/Controls/Maps/src/Controls.Maps.csproj @@ -12,6 +12,12 @@ $(WarningsAsErrors);CS1591 + + true + true + true + + True diff --git a/src/Controls/src/Core/Platform/Tizen/Extensions/ImageExtensions.cs b/src/Controls/src/Core/Platform/Tizen/Extensions/ImageExtensions.cs index b90c7ed5b90f..366409dab67a 100644 --- a/src/Controls/src/Core/Platform/Tizen/Extensions/ImageExtensions.cs +++ b/src/Controls/src/Core/Platform/Tizen/Extensions/ImageExtensions.cs @@ -64,7 +64,7 @@ static string GetPath(string res) return res; } - foreach (AppFW.ResourceManager.Category category in Enum.GetValues(typeof(AppFW.ResourceManager.Category))) + foreach (AppFW.ResourceManager.Category category in Enum.GetValues()) { foreach (var file in new[] { res, res + ".jpg", res + ".png", res + ".gif" }) { diff --git a/src/Controls/src/NuGet/Controls.NuGet.csproj b/src/Controls/src/NuGet/Controls.NuGet.csproj index 8492370d2ffe..46d42f9eda67 100644 --- a/src/Controls/src/NuGet/Controls.NuGet.csproj +++ b/src/Controls/src/NuGet/Controls.NuGet.csproj @@ -8,6 +8,12 @@ false + + true + true + true + + true diff --git a/src/Core/maps/src/Maps.csproj b/src/Core/maps/src/Maps.csproj index fe599049d654..82a864dd114a 100644 --- a/src/Core/maps/src/Maps.csproj +++ b/src/Core/maps/src/Maps.csproj @@ -10,6 +10,12 @@ $(NoWarn);CS1591;RS0041;RS0026;RS0027 + + true + true + true + + .NET MAUI Maps provides a map control for .NET MAUI apps. This only contains the core types. If you want the Map control, please install the Microsoft.Maui.Controls.Maps package. diff --git a/src/Core/src/Core.csproj b/src/Core/src/Core.csproj index c7c23ec1455a..e5f3c9ed32a8 100644 --- a/src/Core/src/Core.csproj +++ b/src/Core/src/Core.csproj @@ -11,7 +11,7 @@ $(NoWarn);CS1591;RS0041;RS0026;RS0027 - + true true true diff --git a/src/Essentials/src/Essentials.csproj b/src/Essentials/src/Essentials.csproj index 1573d64a1250..12b82787dc28 100644 --- a/src/Essentials/src/Essentials.csproj +++ b/src/Essentials/src/Essentials.csproj @@ -5,7 +5,8 @@ Microsoft.Maui.Essentials false BI1234 - true + true + true true $(NoWarn);NU5104;RS0041;RS0026 $(WarningsAsErrors);CS1591 diff --git a/src/Graphics/src/Graphics.Skia.WPF/Graphics.Skia.WPF.csproj b/src/Graphics/src/Graphics.Skia.WPF/Graphics.Skia.WPF.csproj index 06db2242d315..91c53ce8e60b 100644 --- a/src/Graphics/src/Graphics.Skia.WPF/Graphics.Skia.WPF.csproj +++ b/src/Graphics/src/Graphics.Skia.WPF/Graphics.Skia.WPF.csproj @@ -11,6 +11,12 @@ $(NoWarn);RS0041 + + true + true + true + + diff --git a/src/Graphics/src/Graphics.Skia/Graphics.Skia.csproj b/src/Graphics/src/Graphics.Skia/Graphics.Skia.csproj index 2ed804e4de21..4822a52ee844 100644 --- a/src/Graphics/src/Graphics.Skia/Graphics.Skia.csproj +++ b/src/Graphics/src/Graphics.Skia/Graphics.Skia.csproj @@ -9,6 +9,12 @@ $(NoWarn);CS1591;RS0026;RS0027;RS0041 + + true + true + true + + true diff --git a/src/Graphics/src/Graphics.Win2D/Graphics.Win2D.csproj b/src/Graphics/src/Graphics.Win2D/Graphics.Win2D.csproj index fd4aeee39530..dd910c2c61fe 100644 --- a/src/Graphics/src/Graphics.Win2D/Graphics.Win2D.csproj +++ b/src/Graphics/src/Graphics.Win2D/Graphics.Win2D.csproj @@ -9,6 +9,12 @@ $(DefineConstants);MAUI_GRAPHICS_WIN2D + + true + true + true + + true diff --git a/src/Graphics/src/Graphics/Graphics.csproj b/src/Graphics/src/Graphics/Graphics.csproj index ccf351316238..7411afdce822 100644 --- a/src/Graphics/src/Graphics/Graphics.csproj +++ b/src/Graphics/src/Graphics/Graphics.csproj @@ -13,6 +13,12 @@ $(NoWarn);CS1591;RS0026;RS0027;RS0041 + + true + true + true + + true