Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@
<!-- Include SourcePackage.editorconfig in all source packages. -->
<Target Name="_AddEditorConfigToSourcePackage">
<ItemGroup>
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'" />
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.netstandard.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'" />
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.netframework.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
</ItemGroup>
</Target>

Expand Down
21 changes: 21 additions & 0 deletions eng/SourcePackage.netframework.editorconfig
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down