-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
When we activate the generation of SQL Script with the <GenerateCreateScript> property, the generated script is not copied if the database project is referenced by an other project.
To reproduce the issue:
- Create a MSBuild.Sdk.SqlProj database project with one SQL object (a table for example) : MyDatabase.csproj
- Set the following MSBuild properties:
<Project Sdk="MSBuild.Sdk.SqlProj/3.2.0">
<PropertyGroup>
<GenerateCreateScript>True</GenerateCreateScript>
</PropertyGroup>
</Project>- Create a C# project (unit test for example) : MyUnitTests.csproj
- Add a reference to the
MyDatabase.csprojproject previously created. - Set the
ReferenceOutputAssemblyproperty tofalsein the<ProjectReference>added.
<ItemGroup>
<ProjectReference Include="..\MyDatabase\MyDatabase.csproj" ReferenceOutputAssembly="False" />
</ItemGroup>
- Compile the
MyUnitTests.csprojproject.
The MyDatabase_Create.sql is generated in the bin output folder of the MyDatabase.csproj project. But it is not copied in the MyUnitTests.csproj output bin folder.
NB: For the
MyDatabase.dacpac, it is generated in the outputbinfolder of theMyDatabase.csprojand copied in theMyUnitTests.csprojoutputbinfolder.
Metadata
Metadata
Assignees
Labels
No labels