microsoft / DacFx

DacFx, SqlPackage, and other SQL development libraries enable declarative database development and database portability across SQL versions and environments. Share feedback here on dacpacs, bacpacs, and SQL projects.
https://aka.ms/sqlpackage-ref
MIT License
304 stars 18 forks source link

TargetDatabaseSet property adds #277

Open jthapa01 opened 1 year ago

jthapa01 commented 1 year ago

Steps to Reproduce:

  1. Updating old database project to the new .SDK project
  2. VS2022 keeps adding TargetDatabaseSet property to true even though I remove in proj file.

Did this occur in prior versions? If not - which version(s) did it work in?

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
  <Sdk Name="Microsoft.Build.Sql" Version="0.1.9-preview" />
  <PropertyGroup>
    <Name>MyDb</Name>
    <DSP>Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider</DSP>
    <ModelCollation>1033, CI</ModelCollation>
    <ProjectGuid>{df3-cd3b-24d-89a-fd}</ProjectGuid>
    <TargetDatabaseSet>True</TargetDatabaseSet>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="System" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.SqlServer.Dacpacs.Azure">
      <GeneratePathProperty>true</GeneratePathProperty>
      <SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
      <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <PreDeploy Include="Scripts\PreDeployment.sql" />
    <PostDeploy Include="Scripts\PostDeployment.sql" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Scripts\" />
  </ItemGroup>
</Project>

Why vs2022 keeps adding the targetDatabaseSet property? I can't find in documentation what this property does. I do not think I need this property in SDK based database proj. How do I resolve this? (DacFx/SqlPackage/SSMS/Azure Data Studio)

dzsquared commented 1 month ago

related to #180