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 1071885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:46:29+00:00 2026-05-16T20:46:29+00:00

I have a piece of code that I can run in four ways Debug

  • 0

I have a piece of code that I can run in four ways

  1. Debug build – in the debugger – works just fine

  2. Debug build – outside debugger – fails

  3. Release build – in the debugger – fails

  4. Release build – outside debugger – fails.

The error code is gives in all cases is 202 – something to do with parameterless constructors, call stack at the bottom.

It fails at the same point in each case, when it is building the first object it is asked for.

I can’t build the source with debug because I am using .Net 4.0 and don’t seem to have the .Net 2.0 SDK installed in order to build it.

I am starting to run out of ideas….

Exception:

Test method DataLoaders.Integration.ContactMappingTests.EntityContactMappingTest threw exception: 
StructureMap.StructureMapException: StructureMap Exception Code:  202
No Default Instance defined for PluginFamily System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Callstack:

StructureMap.BuildSession.<.ctor>b__0(Type t)
StructureMap.Util.Cache`2.get_Item(KEY key)
StructureMap.BuildSession.CreateInstance(Type pluginType)
StructureMap.Pipeline.DefaultInstance.build(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session)
StructureMap.Pipeline.ConstructorInstance.Get[T](String propertyName, BuildSession session)
StructureMap.Pipeline.Arguments.Get[T](String propertyName)
lambda_method(Closure , IArguments )
StructureMap.Construction.BuilderCompiler.FuncCompiler`1.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args)
StructureMap.Construction.InstanceBuilder.BuildInstance(IArguments args)
StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder)
StructureMap.Pipeline.ConstructorInstance.build(Type pluginType, BuildSession session)
StructureMap.Pipeline.SmartInstance`1.build(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session)
StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session)
StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session)
StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance)
StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1()
StructureMap.BuildSession.CreateInstance(Type pluginType)
StructureMap.Container.GetInstance[T]()
StructureMap.ObjectFactory.GetInstance[PLUGINTYPE]()
DataLoaders.Processor.ProcessData(DataConfig config) in D:\TFS\Main\Source\DataLoaders\DataLoaders\Processor.cs: line 20
  • 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-05-16T20:46:29+00:00Added an answer on May 16, 2026 at 8:46 pm

    I can’t explain why it works in one case and not the others.

    However, I would start with looking at the System.Uri class. 4.0 added constructors to the class, which would absolutely change the way it gets resolved by the container. I believe that StructureMap will always try to use the greediest constructor by default.

    The API may have changed since this post, but this get your started at least:
    http://codebetter.com/blogs/jeremy.miller/archive/2009/01/07/choosing-the-constructor-function-in-structuremap-without-attributes.aspx

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

Sidebar

Related Questions

I have a dropdown list with a piece of code that is run when
I have a piece of C# code that add the values of an enum
I have a piece of C# code that needs to convert a string array
I have a piece of code here that i really could use some help
Let's say I have to implement a piece of T-SQL code that must return
I have one piece of Cocoa code I wrote that takes in an XML
I have a piece of code that look similar to this: <xsl:choose> <xsl:when test=some_test>
I have this piece of code (summarized)... AnsiString working(AnsiString format,...) { va_list argptr; AnsiString
I have a piece of code looking like this : TAxis *axis = 0;
I have this piece of code #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h>

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.