Closed
Description
- SqlPackage or DacFx Version: 2.0.0-preview.1 (but I also tried 1.0.0)
- .NET Framework (Windows-only) or .NET Core: .NET 8.0.201
- Environment (local platform and source/target platforms): Windows 11 for ARM in Parallels w/Macbook Pro host
Steps to Reproduce:
- Create a new SQL project by running: dotnet new -i Microsoft.Build.Sql.Templates and then dotnet new sqlproj -n TestSqlProj
- Open the SQL project in Visual Studio 2022 or 2022 Preview.
- Copy SQL scripts into that directory.
- Notice that they don't show up in Visual Studio unless entries are manually added to the sqlproj file or the scripts are added using the Visual Studio UI.
sqlproj file that doesn't show any SQL scripts in the project directory:
<Project DefaultTargets="Build">
<Sdk Name="Microsoft.Build.Sql" Version="2.0.0-preview.1" />
<PropertyGroup>
<Name>TestSqlProj</Name>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
<ModelCollation>1033, CI</ModelCollation>
<TargetDatabaseSet>True</TargetDatabaseSet>
<ProjectGuid>{c38b164b-e4df-4154-9dcc-70a72f13eb93}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<PostDeploy Include="Post-Deployment\PostDeploy.sql" />
</ItemGroup>
<ItemGroup>
<Folder Include="Post-Deployment\" />
</ItemGroup>
</Project>
sqlproj file with manual entries that does show the SQL scripts:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
<Sdk Name="Microsoft.Build.Sql" Version="2.0.0-preview.1" />
<PropertyGroup>
<Name>TestSqlProj</Name>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
<ModelCollation>1033, CI</ModelCollation>
<TargetDatabaseSet>True</TargetDatabaseSet>
<ProjectGuid>{41fd8a71-f200-4bc9-81df-defd9c11e95b}</ProjectGuid>
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
</PropertyGroup>
<ItemGroup>
<Folder Include="dbo\" />
<Folder Include="dbo\Tables\" />
<Folder Include="testschema\" />
<Folder Include="testschema\Tables\" />
<Folder Include="dbo\Stored Procedures\" />
<Folder Include="Security\" />
<Folder Include="Scripts\" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\Tables\AppSetting_1.sql" />
<Build Include="testschema\Tables\TestTable_1.sql" />
<Build Include="dbo\Stored Procedures\AppSettingSelect.sql" />
<Build Include="dbo\Stored Procedures\TestDacpacSelect.sql" />
<Build Include="Security\testschema_1.sql" />
<None Include="Scripts\ScriptsIgnoredOnImport.sql" />
</ItemGroup>
</Project>
This contradicts in the documentation where it says that these entries are no longer needed.

