Skip to content

Commit

Permalink
Need separate App.configs for netfx, netcoreapp
Browse files Browse the repository at this point in the history
  • Loading branch information
stakx committed Feb 6, 2021
1 parent 272da18 commit 06961ab
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -12,7 +12,7 @@ Bugfixes:
- `private protected` methods are not intercepted (@CrispyDrone, #535)
- `System.UIntPtr` unsupported (@stakx, #546)
- DynamicProxy generates two modules when proceeding from a class proxy's protected method to the target, causing an `InvalidOperationException` when saving the generated assembly to disk (@stakx, #569)
- Upgrade log4net to v2.0.10 (@jonorossi, #567)
- Upgrade log4net to v2.0.10 (@jonorossi, @stakx, #574)

Deprecations:
- Removed support for the .NET Framework < 4.5 and .NET Standard 1.x. (@stakx, #495, #496)
Expand Down
10 changes: 10 additions & 0 deletions src/Castle.Core.Tests/Castle.Core.Tests.csproj
Expand Up @@ -19,6 +19,16 @@
<StartupObject>Program</StartupObject>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<None Include="config\netfx\App.config" />
<None Remove="config\netcoreapp\App.config" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
<None Remove="config\netfx\App.config" />
<None Include="config\netcoreapp\App.config" />
</ItemGroup>

<ItemGroup>
<None Update="Services.Logging.Tests\log4netIntegration\log4net.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
@@ -1,8 +1,17 @@
<?xml version="1.0"?>
<configuration>

<!--
Version for .NET Core.
The `<system.diagnostics>` section is not preregistered,
and must be declared in `<configSections>` before use.
-->

<configSections>
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler" />
</configSections>

<system.diagnostics>
<trace autoflush="true"/>
<sources>
Expand Down
34 changes: 34 additions & 0 deletions src/Castle.Core.Tests/config/netfx/App.config
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<configuration>

<!--
Version for the .NET Framework version.
The `<system.diagnostics>` section is preregistered,
and must not be redeclared in `<configSections>`.
-->

<system.diagnostics>
<trace autoflush="true"/>
<sources>
<source name="Default" switchValue="All">
<listeners>
<add name="default" type="Castle.Core.Logging.Tests.TraceLoggerTests+Listener, Castle.Core.Tests" initializeData="defaultrule"/>
</listeners>
</source>
<source name="Castle.Core.Logging.Tests.TraceLoggerTests" switchValue="All">
<listeners>
<add name="tests" type="Castle.Core.Logging.Tests.TraceLoggerTests+Listener, Castle.Core.Tests" initializeData="testsrule"/>
</listeners>
</source>
<source name="Castle.Core.Configuration" switchValue="All">
<listeners>
<add name="config" type="Castle.Core.Logging.Tests.TraceLoggerTests+Listener, Castle.Core.Tests" initializeData="configrule"/>
</listeners>
</source>
</sources>
</system.diagnostics>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>

0 comments on commit 06961ab

Please sign in to comment.