Skip to content

Commit fb32306

Browse files
author
Artem Kliatchkine
committed
Logging build targets for net6 and net7 are changed to windows-only.
1 parent 779e43c commit fb32306

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

source/Src/Logging/ExceptionFormatter.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,7 @@ private static string GetWindowsIdentity()
192192
{
193193
try
194194
{
195-
// Warning disabled to allow debug builds for net 6/7.
196-
#pragma warning disable CA1416
197195
return WindowsIdentity.GetCurrent().Name;
198-
#pragma warning restore CA1416
199196
}
200197
catch (SecurityException)
201198
{

source/Src/Logging/Logging.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\..\package.props" />
33

44
<PropertyGroup>
5-
<TargetFrameworks>net45;net46;net47;net472;netstandard2.0;netcoreapp2.0;net6.0;net7.0</TargetFrameworks>
5+
<TargetFrameworks>net45;net46;net47;net472;netstandard2.0;netcoreapp2.0;net6.0-windows;net7.0-windows</TargetFrameworks>
66

77
<AssemblyVersion>$(MajorVersion).0.0.0</AssemblyVersion>
88
<FileVersion>$(Version).$(Revision)</FileVersion>

source/Src/Logging/TraceListeners/FormattedEventLogTraceListener.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
namespace Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners
1010
{
11-
// Warning disabled to allow debug builds for net 6/7.
12-
#pragma warning disable CA1416
1311
/// <summary>
1412
/// FormattedEventLogTraceListener is a <see cref="TraceListener"/> that wraps an <see cref="FormattedEventLogTraceListener"/>
1513
/// and uses a <see cref="ILogFormatter"/> to transform the data to trace.
@@ -106,5 +104,4 @@ private static string NormalizeMachineName(string machineName)
106104
return string.IsNullOrEmpty(machineName) ? DefaultMachineName : machineName;
107105
}
108106
}
109-
#pragma warning restore CA1416
110107
}

0 commit comments

Comments
 (0)