This is a reproduction for the unexpected NServiceBus script generation behaviour.
SQL script generation does not happen when building a project with either direct or transitive reference to a project with NServiceBus references where SqlPersistenceGenerateScripts
is set to false
.
- This is working as expected.
- No SQL scripts are generated in the
bin
.
- This is unexpected.
- SQL scripts for all dialects are generated in the
bin
.
- This is unexpected.
- SQL scripts for all dialects are generated in the
bin.
- This stops SQL scripts from being generated.
- However, this is not an option for the production code.
When setting SqlPersistenceGenerateScripts to false
for HasTransitiveReferenceToReceiver, but not for HasDirectReferenceToReceiver
- And building HasTransitiveReferenceToReceiver,
- SQL scripts for all dialects are generated in the
bin
.
The core project containing NServiceBus package references.
<SqlPersistenceGenerateScripts>false</SqlPersistenceGenerateScripts>
SqlPersistenceSettings.cs
is commented-out
The project with a direct reference to Receiver.csproj
<SqlPersistenceGenerateScripts>false</SqlPersistenceGenerateScripts>
is commented-out
The project with a transitive reference to Receiver.csproj
via HasDirectReferenceToReceiver.csproj
<SqlPersistenceGenerateScripts>false</SqlPersistenceGenerateScripts>
is commented-out