Saga sql scripts not generating when rebuilding solution

NServiceBus.Persistence.Sql v 3.1.0
NServiceBus.Persistence.Sql.MsBuild 3.1.0

Multiple developers on our team have run into a situation where we rebuild the solution, and any projects that are endpoints that contain sagas do not get the saga sql scripts generated. This appears to be completely random as sometime it works, sometimes it does not.

Sometimes, another rebuild fixes the issue, at other times, deleting the entire solution and pulling again from source control then rebuilding does it.

We haven’t been able to figure out what’s causing it yet, so I figured I’d post the issue here to see if anyone has experienced this behavior.


Hey Michael,

Are there any MSBuild logs when this occurs?


@DavidBoike, we don’t have any logs right now. I emailed all our devs to save the MSBuild logs when this happens and send them to me. When I get some logs, I’ll reach back out on this thread.


The easiest way to get logs that we can analyze would be to install the Project System Tools extension.

To get enough detail in the log files that are created with that extension, you do need to adjust the default logging verbosity in Visual Studio:

If you can, please capture a log file for both when you’re having the problem and a log for when the files are generated correctly.

Once you have them, it would be best to open a support case and send them to us that way. The binlogs can contain potentially sensitive information that you might not want to post publicly.

@bording, thanks for the additional guidance.

“it would be best to open a support case and send them to us that way”.
How do I do this?

Mike or support @

@DavidBoike @bording

I have the log output for the happy path (all saga sql scripts are created). I’m assuming you want me to wait to open a support ticket until I can get the log output for the failed saga tables?


Yep, that would be best. Hoping to see a somewhat dramatic diff between the two.

You don’t happen to have a transitive reference to NServiceBus.Persistence.SQL do you? I.e we use an internal library that references NSB, but if the endpoint doesn’t actually reference the NServiceBus.Persistence.SQL directly, you will run into problems.

@markgould, just checked. We directly reference NServiceBus.Persistence.SQLin the endpoint. However, I didn’t know about the problem with the indirect reference, so good to know.

@DavidBoike and @bording, just sent a support request with the output of both the working, and not working build log files.

@mgmccarthy I took a look through our support system, but I’m not seeing any sign that you sent us anything. Did you get a reply giving you a case number?

@bording, I apologize, but the email was in my drafts folder. I never sent it, but said I did on this board. The email was REALLY eventually consistent :wink:

Sorry about that. I sent the email to the support email @DavidBoike supplied in this thread with the title: BuildLog files…”

I see the support case now, and I have sent a reply.