Skip to content

Application Domain corruption when running unit tests #30

@fabricioferreira

Description

@fabricioferreira

I'm facing an interesting issue while running the unit tests for my application when the code being tested is using Slapper.AutoMapper. As far as I could see, it seems to be related to the use of .Net Remoting for the object caching. The symptom is very strange: the unit test process aborts and no tests are executed. I was only able to get more information on the error when I debugged the .Net assemblies and found that the Application Domain was being corrupted.

First, the exception was that my Pocos were not marked as Serializable. Then, I was only able to solve the issue by implementing MarshalByRefObject on my entities classes.

Do you guys ever had this issue before? I'm having this issue with Visual Studio 2015 Update 2, in a .Net Framework 4.6.1 assembly. For now, I'm able to circumvent this issue successfully in my application using the workaround above, but I'm not sure what impact it could have in my application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions