Saga sql scripts not generating when rebuilding solution

Using:
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.

Thanks!
Mike

Hey Michael,

Are there any MSBuild logs when this occurs?

Thanks,
David

@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.

Thanks!

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?

Thanks,
Mike

Support options • Particular Software or support @ particular.net

@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?

Thanks

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:
https://discuss.particular.net/t/saga-sql-scripts-not-generating-when-rebuilding-solution/1284: BuildLog files…”

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

We experienced similar behavior. Whats the outcome of the discussed support case?

I think @mgmccarthy must have figured it out on his own, because he never did send us the binlogs.

@AndreasGyr if you’re having a similar issue I’d suggest you open a support case and send us your binlogs as @bording suggested above. Be sure to include the versions of everything involved.

@DavidBoike @AndreasGyr, any time a dev experienced the problem, which was very intermittent, they weren’t logging, so we never did get those binlogs to Particular. Sorry.

I sent binlog files as well as the csproj files to support@particular.net. In our case, we can always reproduce it. But it’s not exactly the same case. We have a Saga implemented in an internal NuGet package and one Saga in our project where endpoint config is defined. After a build, we only have creation scripts for the saga inside the endpoint config project but NOT for the saga inside the NuGet package.