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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:04:22+00:00 2026-05-15T15:04:22+00:00

I just upgraded a project from VS2008/.NET 3.5/PostSharp 1.5 to VS2010/.NET4.0/PostSharp 2.0. Now, when

  • 0

I just upgraded a project from VS2008/.NET 3.5/PostSharp 1.5 to VS2010/.NET4.0/PostSharp 2.0.

Now, when running the unit tests for the system I get hundereds exceptions in the form of:

System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at COMPANY.Data.NHibernate.BaseRepository.c__Binding`1.Invoke(Object& instance, Arguments arguments, Object aspectArgs)
at PostSharp.Aspects.Internals.MethodInterceptionArgsImpl.Proceed()
at COMPANY.Aop.TransactionAspectAttribute.OnInvoke(MethodInterceptionArgs context) in C:\COMPANY\Code\COMPANY-NET4.0\Core\Aop\TransactionAspectAttribute.cs:line 68
at COMPANY.Data.NHibernate.BaseRepository.Save[T](T scoreBigModel) in C:\COMPANY\Code\COMPANY-NET4.0\Core\DataAccess\NHibernate\BaseRepository.cs:line 102
at COMPANY.UnitTests.DataAccess.NHibernate.when_saving_a_canonical_term.<.ctor>b__5() in C:\COMPANY\Code\COMPANY-NET4.0\UnitTests\DataAccess\NHibernate\CanonicalTermRepositorySpecs.cs:line 29
at Machine.Specifications.Utility.RandomExtensionMethods.InvokeIfNotNull(Because because)
at Machine.Specifications.Model.Context.EstablishContext()

When I run peverify.exe on the assembly, I see hundreds of errors in the following form. Always seems to be issues with generic methods:

[IL]: Error: [C:\COMPANY\Code\COMPANY-NET4.0\Core\bin\Debug\COMPANY.Core.dll : COMPANY.Data.NHibernate.ActivationRepository+c__Binding::Invoke][offset 0x0000008D][found ref ‘PostSharp.Aspects.Internals.MethodBinding’][expected ref ‘PostSharp.Aspects.Internals.MethodBinding`1[COMPANY.Models.Activation]’] Unexpected type on the stack.

[IL]: Error: [C:\COMPANY\Code\COMPANY-NET4.0\Core\bin\Debug\COMPANY.Core.dll : COMPANY.Data.NHibernate.ActivationRepository+c__Binding::Invoke][offset 0x00000056][found ref ‘PostSharp.Aspects.Internals.MethodBinding`1[COMPANY.Models.Activation]’][expected ref ‘PostSharp.Aspects.Internals.MethodBinding’] Unexpected type on the stack.

I am running the latest release of PostSharp 2.0 RC.

  • 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-15T15:04:22+00:00Added an answer on May 15, 2026 at 3:04 pm

    The issue is being adressed here: http://www.sharpcrafters.com/forum/Topic4896-19-1.aspx

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

Sidebar

Related Questions

I just recently upgraded a VS2008/.NET 3.5 SP1 project to VS2010 and .NET 4.
We just recently upgraded from VS2008 to VS2010. Our project compiles fine; but when
I've just upgraded a native C++ project from VS2005-SP1 to VS2008-SP1 The first thing
I just upgraded from VS2008 to VS2010. In the process, I allowed it to
I just upgraded a VS 2005 project to VS 2008 and was examining the
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008
I've just upgraded some old Java source which has been running on a Sun
I've just recently upgraded to SQL Server 2008 from 2005 and when I attempt
I've just upgraded a VS 2008 project to VS 2010, converting the project but
I just upgraded to VS2008 Sp1, and I have a weird issue going on.

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.