You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Petr B (JIRA)" <ji...@apache.org> on 2018/02/21 22:06:00 UTC

[jira] [Updated] (LOG4NET-590) LogicalThreadContext stops UnitTest in Visual Studio

     [ https://issues.apache.org/jira/browse/LOG4NET-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Petr B updated LOG4NET-590:
---------------------------
    Description: 
Hello,

I use log4net in my application for logging. In one day unit tests stopped in visual studio. There was error:

{color:#666666}An exception occurred while invoking executor 'executor://mstestadapter/v2': Unable to find assembly 'log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.{color}

{color:#666666}I spend much time to find problem.{color}

I have in my ctor this:

{color:#000088}public{color} {color:#660066}Logger{color}{color:#666600}(){color}

{color:#666600}{{color}

{color:#000000}log {color}{color:#666600}={color}{color:#000000} log4net{color}{color:#666600}.{color}{color:#660066}LogManager{color}{color:#666600}.{color}{color:#660066}GetLogger{color}{color:#666600}({color}{color:#000088}typeof{color}{color:#666600}({color}{color:#660066}Logger{color}{color:#666600}));{color}

{color:#000000}log4net{color}{color:#666600}.{color}{color:#660066}LogicalThreadContext{color}{color:#666600}.{color}{color:#660066}Properties{color}{color:#666600}[{color}{color:#008800}"LogRunId"{color}{color:#666600}]{color} {color:#666600}={color} {color:#006666}0{color}{color:#666600};{color} {color:#880000}//get max+1 log from database{color}

{color:#880000}}
 
 When I comment second line unit test works fine. When I change LogicalThreadContext to ThreadContext it works fine. If there is LogicalThreadContext error is shown. Why?

Example application could be found on {color:#666666}https://1drv.ms/u/s!AtGI8jaUqSfuiNhRtwmmxkr-YhoWPA{color}

  was:
Hello,

I use log4net in my application for logging. In one day unit tests stopped in visual studio. There was error:

{color:#666666}An exception occurred while invoking executor 'executor://mstestadapter/v2': Unable to find assembly 'log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.{color}

{color:#666666}I spend much time to find problem.{color}

I have in my ctor this:

{color:#000088}public{color} {color:#660066}Logger{color}{color:#666600}(){color}

{color:#666600}{{color}

{color:#000000}log {color}{color:#666600}={color}{color:#000000} log4net{color}{color:#666600}.{color}{color:#660066}LogManager{color}{color:#666600}.{color}{color:#660066}GetLogger{color}{color:#666600}({color}{color:#000088}typeof{color}{color:#666600}({color}{color:#660066}Logger{color}{color:#666600}));{color}

{color:#000000}log4net{color}{color:#666600}.{color}{color:#660066}LogicalThreadContext{color}{color:#666600}.{color}{color:#660066}Properties{color}{color:#666600}[{color}{color:#008800}"LogRunId"{color}{color:#666600}]{color} {color:#666600}={color} {color:#006666}0{color}{color:#666600};{color} {color:#880000}//get max+1 log from database{color}

{color:#880000}}{color}

{color:#880000}When I comment second line unit test works fine. When I change LogicalThreadContext to ThreadContext it works fine. If there is LogicalThreadContext error is shown. Why?{color}


> LogicalThreadContext stops UnitTest in Visual Studio
> ----------------------------------------------------
>
>                 Key: LOG4NET-590
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-590
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.8
>            Reporter: Petr B
>            Priority: Critical
>
> Hello,
> I use log4net in my application for logging. In one day unit tests stopped in visual studio. There was error:
> {color:#666666}An exception occurred while invoking executor 'executor://mstestadapter/v2': Unable to find assembly 'log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.{color}
> {color:#666666}I spend much time to find problem.{color}
> I have in my ctor this:
> {color:#000088}public{color} {color:#660066}Logger{color}{color:#666600}(){color}
> {color:#666600}{{color}
> {color:#000000}log {color}{color:#666600}={color}{color:#000000} log4net{color}{color:#666600}.{color}{color:#660066}LogManager{color}{color:#666600}.{color}{color:#660066}GetLogger{color}{color:#666600}({color}{color:#000088}typeof{color}{color:#666600}({color}{color:#660066}Logger{color}{color:#666600}));{color}
> {color:#000000}log4net{color}{color:#666600}.{color}{color:#660066}LogicalThreadContext{color}{color:#666600}.{color}{color:#660066}Properties{color}{color:#666600}[{color}{color:#008800}"LogRunId"{color}{color:#666600}]{color} {color:#666600}={color} {color:#006666}0{color}{color:#666600};{color} {color:#880000}//get max+1 log from database{color}
> {color:#880000}}
>  
>  When I comment second line unit test works fine. When I change LogicalThreadContext to ThreadContext it works fine. If there is LogicalThreadContext error is shown. Why?
> Example application could be found on {color:#666666}https://1drv.ms/u/s!AtGI8jaUqSfuiNhRtwmmxkr-YhoWPA{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)