Particular / NServiceBus

Build, version, and monitor better microservices with the most powerful service platform for .NET
https://particular.net/nservicebus/
Other
2.09k stars 648 forks source link

Ilmerge not correctly updating pdbs #1759

Closed chrisbednarski closed 10 years ago

chrisbednarski commented 10 years ago

Caused difficulty debugging and stepping through NServicebus assemblies

Using NServiceBus.Host and below endpoint config

public class EndpointConfig : IConfigureThisEndpoint,
                    AsA_Server, IWantCustomInitialization
{
    public void Init()
    {
        Configure.With()
            .DefaultBuilder()
            .UseInMemoryTimeoutPersister();
    }
}

I used to be able to step into source of Configure.With() and DefaultBuilder in 4.0.4 by downloading master branch source and placing it in C:\BuildAgent\Work\d4de8921a0aabf04 ...

After upgrading to 4.2.0, downloaded the new master branch source and placed in C:\BuildAgent\Work\31f8c64a6e8a2d7c but can't step into it.

mostly get language:unknown and "Source not available"

chrisbednarski commented 10 years ago

Related thread on google groups

SimonCropp commented 10 years ago

@andreasohlund @johnsimons @indualagarsamy I think this needs to be fixed as a priority. It will cause pain for the advanced users who we receive valuable contibutions from.

@chrisbednarski the problem with this is several people have looked into this with no success. it may be a case of gradually rolling back changes till it stops happening. :(

johnsimons commented 10 years ago

Wouldn't contributors be forking the project and compile from source?

JustinThirkell commented 10 years ago

Wouldn't contributors be forking the project and compile from source?

not me. i've explicitly stayed away from using a fork of NSB - only ever pulling in updates via nuget. so the ability to match my local nsb repo to the version i'm using via nuget and then step into the code is crucial.
if this (unable to step into nsb code issue) is the case then that's a blocker for our being to upgrade to 4.2

johnsimons commented 10 years ago

Quick question, are you guys using VS2012 or VS 2013?

SimonCropp commented 10 years ago

also do you have both installed?

JustinThirkell commented 10 years ago

I’m using VS 2013 (and have both 2012 and 2013 installed) – but haven’t tried to step into NSB since upgrading so I haven’t got a repro sorry. just interested… (also unlikely to be able to test this until late tomorrow)

SimonCropp commented 10 years ago

@thirkcircus out of curiosity can you try this http://stackoverflow.com/a/19512956/53158

chrisbednarski commented 10 years ago

For production we'd prefer using nuget packages only. If there are defects found inside NSB, we contribute fixes back and wait for next nuget package release. I've only forked NSB to send back PRs

I'm using VS2012 Update 3 on Win 7 SP1 x64, no VS 2013 installed, all projects using .NET4.0 only (not 4.5) Tried debugging from VS2010 SP1 with the same result.

Could this be related to any changes in IL-merging, maybe ripple, gitflow, or AOP (was it Fody stuff)?

chrisbednarski commented 10 years ago

Can also reproduce this issue with NSB 4.1.0 and 4.1.1 Works OK with 4.0.5

indualagarsamy commented 10 years ago

Here's what we did:

  1. Removed ilmerge steps from NServiceBus.Core.csproj and NServiceBus.Hosting.Windows.csproj.
  2. Added the following dlls to the sample project (which references the NSB dlls) and we were able to step into the code.
Newtonsoft.Json.dll
Log4net.dll
Interop.Msmq.dll
Autofac.dll
Microsoft.Practices.ServiceLocation.dll
Topshelf.dll

Can you see if this works for you until this problem is properly resolved?

chrisbednarski commented 10 years ago

Lots of thanks @johnsimons !

johnsimons commented 10 years ago

It didn't take me long to find the problem. What took long was to use the :poop: msbuild script to fix it :scream: