DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

TargetDatabaseSet property adds

Open jthapa01 opened this issue 2 years ago • 2 comments

  • SqlPackage or DacFx Version:
  • .NET Framework (Windows-only) or .NET Core:
  • Environment (local platform and source/target platforms):

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)

jthapa01 avatar May 18 '23 14:05 jthapa01

related to #180

dzsquared avatar Jul 12 '24 02:07 dzsquared

@Ri7Sh This seems like a SSDT issue, can you verify if this is fixed?

zijchen avatar Sep 20 '24 18:09 zijchen

VS is no longer adding this extraneous property

dzsquared avatar Feb 19 '25 21:02 dzsquared