diff --git a/Directory.Build.targets b/Directory.Build.targets index e8ed8b44f992..f8d73e5ff744 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -97,8 +97,9 @@ - + + diff --git a/eng/SourcePackage.netframework.editorconfig b/eng/SourcePackage.netframework.editorconfig new file mode 100644 index 000000000000..e9cd67ee9fbd --- /dev/null +++ b/eng/SourcePackage.netframework.editorconfig @@ -0,0 +1,21 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +# C# files +[*.cs] + +# We don't want any analyzer diagnostics to be reported for people consuming this as a source package. +dotnet_analyzer_diagnostic.severity = none + +generated_code = true + +# The above configurations don't apply to compiler warnings. Requiring all params to be documented +# is not something we require for this project, so suppressing it directly here. +dotnet_diagnostic.CS1573.severity = none + +# As above, we need to specifically disable compiler warnings that we don't want to break downstream +# builds +dotnet_diagnostic.IDE0005.severity = none + +# Disable nullability checks when targeting .NET Framework +dotnet_diagnostic.CS8604.severity = none \ No newline at end of file diff --git a/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs b/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs index 37502de871c7..7a205a8d1fce 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs @@ -16,13 +16,7 @@ protected static string GetInjectedAssemblyPath(string targetFramework, string a public static string GetStartupHookPath(ProjectGraphNode project) { - var hookTargetFramework = project.GetTargetFramework() switch - { - // Note: Hot Reload is only supported on net6.0+ - "net6.0" or "net7.0" or "net8.0" or "net9.0" => "net6.0", - _ => "net10.0", - }; - + var hookTargetFramework = project.GetTargetFrameworkVersion() is { Major: >= 10 } ? "net10.0" : "net6.0"; return GetInjectedAssemblyPath(hookTargetFramework, "Microsoft.Extensions.DotNetDeltaApplier"); }