Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8718767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:37:39+00:00 2026-06-13T06:37:39+00:00

For the following project I am getting a very annoying and inexplicable error when

  • 0

For the following “project” I am getting a very annoying and inexplicable error when resolving Unity for DI.

InvalidOperationException – The type LogWriter cannot be constructed.
You must configure the container to supply this value.

?ex.Message; “Resolution of the dependency failed, type =
\”WindowsFormsApplication1.Performance\”, name =
\”(none)\”.\r\nException occurred while: while resolving.\r\nException
is: InvalidOperationException – The type LogWriter cannot be
constructed. You must configure the container to supply this
value.\r\n———————————————–\r\nAt the
time of the exception, the container was:\r\n\r\n Resolving
WindowsFormsApplication1.Performance,(none)\r\n Resolving parameter
\”lw\” of constructor
WindowsFormsApplication1.Performance(Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter
lw,
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionManager
em)\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter,(none)\r\n”

?ex.StackTrace; ” at
Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object
existing, String name, IEnumerable1 resolverOverrides) in
e:\\Builds\\Unity\\UnityTemp\\Compile\\Unity\\Unity\\Src\\UnityContainer.cs:line
515\r\n at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type
t, String name, IEnumerable
1 resolverOverrides) in
e:\Builds\Unity\UnityTemp\Compile\Unity\Unity\Src\UnityContainer.cs:line
485\r\n at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t,
String name, ResolverOverride[] resolverOverrides) in
e:\Builds\Unity\UnityTemp\Compile\Unity\Unity\Src\UnityContainer.cs:line
173\r\n at
Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer
container, ResolverOverride[] overrides) in
e:\Builds\Unity\UnityTemp\Compile\Unity\Unity\Src\UnityContainerExtensions.cs:line
504\r\n at WindowsFormsApplication1.Form1.OnLoad(EventArgs e) in
D:\Devzone\Tasking\WindowsFormsApplication1\Form1.cs:line 33″

In a form:

  protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            try
            {
                IUnityContainer container = new UnityContainer();
                Performance p = container.Resolve<Performance>();
            }
            catch (Exception ex)
            {

            }
        }

Dependency class:

 public class Performance
    {
        public Performance(LogWriter lw, ExceptionManager em)
        {
        }
    }

Configuration File:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
    </configSections>
    <loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
        <listeners>
            <add name="Event Log Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                source="Enterprise Library Logging" formatter="Text Formatter"
                log="" machineName="." traceOutputOptions="None" />
        </listeners>
        <formatters>
            <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                template="Timestamp: {timestamp}{newline}&#xA;Message: {message}{newline}&#xA;Category: {category}{newline}&#xA;Priority: {priority}{newline}&#xA;EventId: {eventid}{newline}&#xA;Severity: {severity}{newline}&#xA;Title:{title}{newline}&#xA;Machine: {localMachine}{newline}&#xA;App Domain: {localAppDomain}{newline}&#xA;ProcessId: {localProcessId}{newline}&#xA;Process Name: {localProcessName}{newline}&#xA;Thread Name: {threadName}{newline}&#xA;Win32 ThreadId:{win32ThreadId}{newline}&#xA;Extended Properties: {dictionary({key} - {value}{newline})}"
                name="Text Formatter" />
        </formatters>
        <categorySources>
            <add switchValue="All" name="General">
                <listeners>
                    <add name="Event Log Listener" />
                </listeners>
            </add>
            <add switchValue="All" name="Category2" />
        </categorySources>
        <specialSources>
            <allEvents switchValue="All" name="All Events" />
            <notProcessed switchValue="All" name="Unprocessed Category" />
            <errors switchValue="All" name="Logging Errors &amp; Warnings">
                <listeners>
                    <add name="Event Log Listener" />
                </listeners>
            </errors>
        </specialSources>
    </loggingConfiguration>
    <exceptionHandling>
        <exceptionPolicies>
            <add name="Policy">
                <exceptionTypes>
                    <add name="All Exceptions" type="System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                        postHandlingAction="NotifyRethrow" />
                </exceptionTypes>
            </add>
        </exceptionPolicies>
    </exceptionHandling>
</configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:37:41+00:00Added an answer on June 13, 2026 at 6:37 am

    You need to add the Enterprise Library extension to your container. Without it, the container doesn’t read the config file and therefore doesn’t know how to create Entlib objects, like the LogWriter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following error when trying to build my very simple webservice project.
I am getting the following error when attempting to build my project in Visual
I am getting the following error when trying to update my project from Intellij
I'm getting the following error when I attempt to publish an XNA project in
I have downloaded a web project from CodePlex and am getting the following error
I'm building a very small C/C++ project using eclipse and i'm getting the following
while doing the build of my dontnet 4.0 project setup i'm getting following errors
I'm trying to use SHFHKeychainUtils in my project, but I keep getting the following
I am getting the following error from C++ Builder 2009's linker Unresolved external '__fastcall
I'm getting a error LNK1104: cannot open file {path}\jvm.lib when trying tocompile a VS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.