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

  • SEARCH
  • Home
  • 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 6953967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:32:44+00:00 2026-05-27T14:32:44+00:00

Everything was working fine until I updated with NuGet the references for CastleWinsor and

  • 0

Everything was working fine until I updated with NuGet the references for CastleWinsor and AutoMapper to their latest versions: Castle.Windsor.3.0.0.4001 and AutoMapper.2.0.0.

I have a list of AutoMapper profiles in the same assembly as the AutoMapperInstaller : IWindsorInstaller. They are in diferent namespaces, but this should not matter, right?

Here is a profile example:

namespace FieldService.Web.Mappings
{
 public class RoleMappings : Profile
 {
    protected override void Configure()
    {
        AutoMapper.Mapper.CreateMap<RoleModel, Role>()
            .ConstructUsing((role) => new Role() { Permissions = new List<Permission>() })
            .ForMember(m => m.Permissions, o => o.MapFrom(src => src.Permissions.Where(p => p.Selected == true)));
    }
 }
}

Here is the AutoMapperInstaller

namespace FieldService.Web.Infrastructure.IOC
{
 public class AutoMapperInstaller : IWindsorInstaller
 {
    public void Install(IWindsorContainer container, IConfigurationStore store)
    {
        Mapper.Initialize(x => x.ConstructServicesUsing(container.Resolve));

        RegisterProfilesAndResolvers(container);
        RegisterMapperEngine(container);
    }

    private void RegisterMapperEngine(IWindsorContainer container)
    {
        container.Register(
            Component.For<IMappingEngine>().Instance(Mapper.Engine)
        );
    }

    private void RegisterProfilesAndResolvers(IWindsorContainer container)
    {
        // register value resolvers
        container.Register(AllTypes.FromAssembly(Assembly.GetExecutingAssembly()).BasedOn<IValueResolver>());

        // register profiles
        container.Register(AllTypes.FromThisAssembly().BasedOn<Profile>());
        var profiles = container.ResolveAll<Profile>();

        foreach (var profile in profiles)
            Mapper.AddProfile(profile);
    }
 }
}

In Global.asax I have the method BootstrapContainer which I call from Application_Start method:

private static readonly IWindsorContainer container = new WindsorContainer();

    public IWindsorContainer Container
    {
        get { return container; }
    }

    private static void BootstrapContainer()
    {
        container.Install(FromAssembly.This());
    }

The exception I get is: Trying to map xxx to yyyModel. Missing type map configuration or unsupported mapping. Exception of type 'AutoMapper.AutoMapperMappingException' was thrown.

I debugged the installer and I think this line Container.Register(AllTypes.FromThisAssembly().BasedOn<Profile>()); is not working anymore.

If I try to resolve the profiles (next line) it returns 0 profiles.

I am not an expert with these two tools, and I am not sure this is the best method to initialize AutoMapper with Windsor but it worked until now.

Any idea why this is not working anymore?

  • 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-27T14:32:44+00:00Added an answer on May 27, 2026 at 2:32 pm

    This is a known and documented breaking change in Windsor (see breakingchanges.txt for details).

    In short, if you’re resolving your profiles as Profile you need to register them as Profile.

    Container.Register(AllTypes.FromThisAssembly().BasedOn<Profile>().WithServiceBase());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Eclipse was working fine until i updated my sdk.Then suddently everything started to
Everything is working fine until I call the saveFile method (shown below) to write
I was using grails 1.3.4 for my project and everything was working fine until
I am using Eclipse Helios for Java. Everything was working fine until recently. The
today I started working with DirectX(D3D9), everything went fine until I created a Static-mesh
Very new to .Net. Everything was working fine until I added <Tracking> to my
I'm using the default xslt template for navigation, everything was working fine until I
I'm setting up a Flask app on Heroku. Everything is working fine until I
I have a wordpress blog hosted on IIS. Everything was working fine until I
I am sending email from my iPhone application. Everything working fine, but I want

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.