Skip to content

Commit 6340963

Browse files
committed
Fix publishing in VS
Add test project to solution
1 parent ec001d5 commit 6340963

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

MSBuild.Sdk.SqlProj.sln

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.12.35707.178 d17.12
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.2.11415.280 d18.0
55
MinimumVisualStudioVersion = 15.0.26124.0
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B0420F9B-A902-4E9D-8B29-55B4F626483B}"
77
EndProject
@@ -10,8 +10,6 @@ EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D25C8812-D92E-41D5-9BC9-30AFCF45063B}"
1111
ProjectSection(SolutionItems) = preProject
1212
.editorconfig = .editorconfig
13-
.github\workflows\main.yml = .github\workflows\main.yml
14-
README.md = README.md
1513
EndProjectSection
1614
EndProject
1715
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DacpacTool", "src\DacpacTool\DacpacTool.csproj", "{78CA944A-928F-48FA-B29F-C5DC96E67684}"
@@ -20,6 +18,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A3A4D55B-4
2018
EndProject
2119
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DacpacTool.Tests", "test\DacpacTool.Tests\DacpacTool.Tests.csproj", "{2EC1BB4C-C8A1-4C7E-AAE9-24E22EB0A8C4}"
2220
EndProject
21+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject", "test\TestProject\TestProject.csproj", "{1EDD367B-2A1B-C640-39D9-8DA744694312}"
22+
EndProject
2323
Global
2424
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2525
Debug|Any CPU = Debug|Any CPU
@@ -66,6 +66,18 @@ Global
6666
{2EC1BB4C-C8A1-4C7E-AAE9-24E22EB0A8C4}.Release|x64.Build.0 = Release|Any CPU
6767
{2EC1BB4C-C8A1-4C7E-AAE9-24E22EB0A8C4}.Release|x86.ActiveCfg = Release|Any CPU
6868
{2EC1BB4C-C8A1-4C7E-AAE9-24E22EB0A8C4}.Release|x86.Build.0 = Release|Any CPU
69+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
70+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Debug|Any CPU.Build.0 = Debug|Any CPU
71+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Debug|x64.ActiveCfg = Debug|Any CPU
72+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Debug|x64.Build.0 = Debug|Any CPU
73+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Debug|x86.ActiveCfg = Debug|Any CPU
74+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Debug|x86.Build.0 = Debug|Any CPU
75+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Release|Any CPU.ActiveCfg = Release|Any CPU
76+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Release|Any CPU.Build.0 = Release|Any CPU
77+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Release|x64.ActiveCfg = Release|Any CPU
78+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Release|x64.Build.0 = Release|Any CPU
79+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Release|x86.ActiveCfg = Release|Any CPU
80+
{1EDD367B-2A1B-C640-39D9-8DA744694312}.Release|x86.Build.0 = Release|Any CPU
6981
EndGlobalSection
7082
GlobalSection(SolutionProperties) = preSolution
7183
HideSolutionNode = FALSE
@@ -74,6 +86,7 @@ Global
7486
{F4A31183-CB24-4D39-B498-8FE4F1A0CCA2} = {B0420F9B-A902-4E9D-8B29-55B4F626483B}
7587
{78CA944A-928F-48FA-B29F-C5DC96E67684} = {B0420F9B-A902-4E9D-8B29-55B4F626483B}
7688
{2EC1BB4C-C8A1-4C7E-AAE9-24E22EB0A8C4} = {A3A4D55B-4484-4501-894F-0B07708A9A1D}
89+
{1EDD367B-2A1B-C640-39D9-8DA744694312} = {A3A4D55B-4484-4501-894F-0B07708A9A1D}
7790
EndGlobalSection
7891
GlobalSection(ExtensibilityGlobals) = postSolution
7992
SolutionGuid = {832DCF12-9633-4AEB-A9D8-444EDF649047}

src/MSBuild.Sdk.SqlProj/Sdk/Sdk.targets

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
PostBuildEvent
5151
</CoreBuildDependsOn>
5252
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);SetNuSpecProperties</GenerateNuspecDependsOn>
53-
<PublishBeforeTargets Condition="'$(BuildingInsideVisualStudio)' == 'true'">PublishDatabase</PublishBeforeTargets>
53+
<PublishDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true'">PublishDatabase</PublishDependsOn>
5454
<PublishContainerDependsOn>$(PublishContainerDependsOn);PrepareContainer</PublishContainerDependsOn>
5555
</PropertyGroup>
5656

@@ -268,9 +268,12 @@
268268
<Delete Files="@(SqlArtifacts -> '$(TargetDir)%(Filename)%(Extension)')" />
269269
</Target>
270270

271+
<!-- This target is run when using dotnet publish / Visual Studio publish. PublishDependsOn is set above to control what happens when using Publish in Visual Studio -->
272+
<Target Name="Publish" DependsOnTargets="$(PublishDependsOn)"></Target>
273+
271274
<!-- Performs a publish of the .dacpac produced by build to a configurable target server -->
272275
<!-- Note: This used to contain a condition that DeployOnPublish != False. Since you now have to explicitly run the PublishDatabase target this no longer made sense. -->
273-
<Target Name="PublishDatabase" DependsOnTargets="Build" BeforeTargets="$(PublishBeforeTargets)">
276+
<Target Name="PublishDatabase" DependsOnTargets="Build">
274277
<ItemGroup>
275278
<_DeployPropertyNames Include="$(KnownDeployProperties)" />
276279
<DeployPropertyNames Include="@(_DeployPropertyNames)" Condition=" '$(%(Identity))' != '' ">

0 commit comments

Comments
 (0)