SQL installation scripts are created at compile time by the
NServiceBus. NuGet package.
Scripts will be created in the directory format of
For example for a project named
ClassLibrary built in Debug mode the following directories will be created.
bin\ Debug\ NServiceBus. Persistence. Sql\ MsSqlServer
bin\ Debug\ NServiceBus. Persistence. Sql\ MySql
bin\ Debug\ NServiceBus. Persistence. Sql\ Oracle
Scripts will also be included in the list of project output files. This means those files produced will be copied to the output directory of any project that references it.
Scripts creation can configured via
[SqlPersistenceSettings] applied to the target assembly.
project.are not supported. The
project.approach was an experiment by Microsoft at a new project system that was not based on MSBuild. Since
project.did not support running MSBuild files shipped inside a NuGet the SQL Persistence script creation does not work. This experiment has since been abandoned. To fix this either migrate back to the old Visual Studio 2015 project format (
packages.) or migrate to the new Visual Studio 2017 project format. dotnet-migrate can help migrating to the new
[assembly: SqlPersistenceSettings( msSqlServerScripts: true, mySqlScripts: true)]
[assembly: SqlPersistenceSettings(msSqlServerScripts: true)]
[assembly: SqlPersistenceSettings(mySqlScripts: true)]