From 3cd56f7c173457ed52e76979dddf901e7285f090 Mon Sep 17 00:00:00 2001 From: Rigvita Sharma Date: Fri, 31 May 2024 23:53:41 +0530 Subject: [PATCH] Updating Microsoft.Build.Sql for utilising in Visual Studio (#443) * changes for opening sqlproj in VS * Update Sdk.props to prevent build failures in Visual Studio Build tries to look for .netframeworkversion v4.0 which causes build failures. Setting TargetFrameworkVersion as 4.7.2 to prevent failures. * fixing default build configurations * Removing Properties folder to make way for CPS App Designer * Adding available Platforms and Configurations to sdk.props; Platforms and Configurations updated only if not added in sqlproj --- src/Microsoft.Build.Sql/sdk/Sdk.props | 22 +++++++--- src/Microsoft.Build.Sql/sdk/Sdk.targets | 55 ++++++++++++------------- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/src/Microsoft.Build.Sql/sdk/Sdk.props b/src/Microsoft.Build.Sql/sdk/Sdk.props index 3f97ad0..b9e04f5 100644 --- a/src/Microsoft.Build.Sql/sdk/Sdk.props +++ b/src/Microsoft.Build.Sql/sdk/Sdk.props @@ -5,6 +5,8 @@ --> + + true false @@ -12,12 +14,20 @@ netstandard2.1 + + + v4.7.2 + .NETFramework,Version=$(TargetFrameworkVersion) + + - + AnyCPU + Debug;Release Debug AnyCPU + $(Platform) Database @@ -26,16 +36,16 @@ - 16.0 - + 17.0 + True - 16.0 + 17.0 - + - \ No newline at end of file + diff --git a/src/Microsoft.Build.Sql/sdk/Sdk.targets b/src/Microsoft.Build.Sql/sdk/Sdk.targets index c000b78..432794d 100644 --- a/src/Microsoft.Build.Sql/sdk/Sdk.targets +++ b/src/Microsoft.Build.Sql/sdk/Sdk.targets @@ -6,30 +6,28 @@ - - bin\Release\ - $(MSBuildProjectName).sql - False - pdbonly - true - false - true - prompt - 4 + + 4 + false + $(MSBuildProjectName).sql + true + prompt - - bin\Debug\ - $(MSBuildProjectName).sql - false - true - full - false - true - true - prompt - 4 + + bin\Release\ + pdbonly + true + false + false - + + bin\Debug\ + full + false + true + true + + $(PackageType);DACPAC @@ -40,8 +38,13 @@ $(NoWarn),NU5128 - - + + + + @@ -62,10 +65,6 @@ - - - -