# 'object' does not contain a definition for 'errors'

DevFeed: ['object' does not contain a definition for 'errors'](<https://devfeed.tech/articles/object-does-not-contain-a-definition-for-errors-21204.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2013/08/object-does-not-contain-definition/>)

Published: 2013-08-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Exception](<https://devfeed.tech/topics/exception.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [ASP.NET](<https://devfeed.tech/topics/aspnet.md>), [Visual Studio](<https://devfeed.tech/topics/visual-studio.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [asp-net](<https://devfeed.tech/tags/asp-net.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>), [visual-studio](<https://devfeed.tech/tags/visual-studio.md>)

## AI overview

A unit test for an ASP.NET Web API exception filter fails when it tries to inspect the anonymous object returned for validation errors. The article explains that the anonymous type is not visible outside the tested Api assembly and shows that adding InternalsVisibleTo to Api.csproj makes the test pass.

## Source excerpt

Lorem ipsum dolor sit amet