Skip to content

Commit c2fd025

Browse files
authored
feat: modernize to SDK-style project (#338)
1 parent c73656b commit c2fd025

File tree

6 files changed

+66
-238
lines changed

6 files changed

+66
-238
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened]
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: 1. Generate Version
19+
id: version
20+
run: |
21+
$year = (Get-Date).Year
22+
$month = (Get-Date).Month
23+
$day = (Get-Date).Day
24+
$version = "$year.$month.$day.${{ github.run_number }}"
25+
echo "version=$version" >> $env:GITHUB_OUTPUT
26+
shell: pwsh
27+
28+
- name: 2. Build Project
29+
run: dotnet build src/CodingWithCalvin.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.csproj -c Release -p:SetVsixVersion=${{ steps.version.outputs.version }}
30+
31+
- name: 3. Create Information File
32+
uses: jsdaniell/[email protected]
33+
with:
34+
name: 'src/CodingWithCalvin.CouchbaseExplorer/bin/Release/CodingWithCalvin.CouchbaseExplorer.info'
35+
json: '{"sha":"${{ github.sha }}", "version":"${{ steps.version.outputs.version }}"}'
36+
37+
- name: 4. Upload Artifact
38+
uses: actions/upload-artifact@v4
39+
with:
40+
path: |
41+
src/CodingWithCalvin.CouchbaseExplorer/bin/Release/CodingWithCalvin.CouchbaseExplorer.info
42+
src/CodingWithCalvin.CouchbaseExplorer/bin/Release/CodingWithCalvin.CouchbaseExplorer.vsix

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
id: download-artifact
2727
uses: dawidd6/action-download-artifact@v6
2828
with:
29-
workflow: release_build_and_deploy.yml
29+
workflow: build.yml
3030
workflow_conclusion: success
3131

3232
- name: 2. Parse Artifact Manifest

.github/workflows/release_build_and_deploy.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ orleans.codegen.cs
208208
# RIA/Silverlight projects
209209
Generated_Code/
210210

211+
# SDK-style project generated files
212+
Generated/
213+
211214
# Backup & report files from converting an old project file
212215
# to a newer Visual Studio version. Backup files are not needed,
213216
# because we have git ;-)
Lines changed: 20 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,193 +1,37 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.VSSDK.BuildTools.15.5.100\build\Microsoft.VSSDK.BuildTools.props" Condition="Exists('..\packages\Microsoft.VSSDK.BuildTools.15.5.100\build\Microsoft.VSSDK.BuildTools.props')" />
1+
<Project Sdk="CodingWithCalvin.VsixSdk/0.3.0">
2+
43
<PropertyGroup>
5-
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
6-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
7-
<NuGetPackageImportStamp>
8-
</NuGetPackageImportStamp>
9-
<UseCodebase>true</UseCodebase>
10-
<TargetFrameworkProfile />
11-
</PropertyGroup>
12-
<PropertyGroup>
13-
<SignAssembly>false</SignAssembly>
14-
</PropertyGroup>
15-
<PropertyGroup>
16-
<AssemblyOriginatorKeyFile>
17-
</AssemblyOriginatorKeyFile>
18-
</PropertyGroup>
19-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
20-
<DebugSymbols>true</DebugSymbols>
21-
<OutputPath>bin\x64\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<DebugType>full</DebugType>
24-
<PlatformTarget>x64</PlatformTarget>
25-
<LangVersion>latest</LangVersion>
26-
<ErrorReport>prompt</ErrorReport>
27-
<DeployExtension>true</DeployExtension>
28-
</PropertyGroup>
29-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
30-
<OutputPath>bin\x64\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<Optimize>true</Optimize>
33-
<DebugType>pdbonly</DebugType>
34-
<PlatformTarget>x64</PlatformTarget>
35-
<LangVersion>latest</LangVersion>
36-
<ErrorReport>prompt</ErrorReport>
37-
</PropertyGroup>
38-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
39-
<PropertyGroup>
40-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
41-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
42-
<SchemaVersion>2.0</SchemaVersion>
43-
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
44-
<ProjectGuid>{8AF8BEEF-6FCC-4479-8D85-540A414D0EA2}</ProjectGuid>
45-
<OutputType>Library</OutputType>
46-
<AppDesignerFolder>Properties</AppDesignerFolder>
4+
<TargetFramework>net48</TargetFramework>
475
<RootNamespace>CodingWithCalvin.CouchbaseExplorer</RootNamespace>
486
<AssemblyName>CodingWithCalvin.CouchbaseExplorer</AssemblyName>
49-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
50-
<GeneratePkgDefFile>true</GeneratePkgDefFile>
51-
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
52-
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
53-
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
54-
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
55-
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
56-
<StartAction>Program</StartAction>
57-
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
58-
<StartArguments>/rootsuffix Exp</StartArguments>
7+
<LangVersion>latest</LangVersion>
8+
<OutputPath>bin/$(Configuration)/</OutputPath>
9+
<UseWPF>true</UseWPF>
5910
</PropertyGroup>
11+
12+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
13+
<DeployExtension>True</DeployExtension>
14+
</PropertyGroup>
15+
6016
<ItemGroup>
61-
<Compile Include="CouchbaseExplorerWindow.cs" />
62-
<Compile Include="CouchbaseExplorerWindowCommand.cs" />
63-
<Compile Include="CouchbaseExplorerWindowControl.xaml.cs">
64-
<DependentUpon>CouchbaseExplorerWindowControl.xaml</DependentUpon>
65-
</Compile>
66-
<Compile Include="Properties\AssemblyInfo.cs" />
67-
<Compile Include="CouchbaseExplorerPackage.cs" />
68-
<Compile Include="source.extension.cs">
69-
<AutoGen>True</AutoGen>
70-
<DesignTime>True</DesignTime>
71-
<DependentUpon>source.extension.vsixmanifest</DependentUpon>
72-
</Compile>
73-
<Compile Include="VSCommandTable.cs">
74-
<AutoGen>True</AutoGen>
75-
<DesignTime>True</DesignTime>
76-
<DependentUpon>VSCommandTable.vsct</DependentUpon>
77-
</Compile>
78-
<Compile Include="Services\ConnectionInfo.cs" />
79-
<Compile Include="Services\ConnectionSettingsService.cs" />
80-
<Compile Include="Services\CouchbaseService.cs" />
81-
<Compile Include="Services\CredentialManagerService.cs" />
82-
<Compile Include="Services\DocumentEditorService.cs" />
83-
<Compile Include="ViewModels\BindingProxy.cs" />
84-
<Compile Include="ViewModels\BucketNode.cs" />
85-
<Compile Include="ViewModels\BucketsFolderNode.cs" />
86-
<Compile Include="ViewModels\CollectionNode.cs" />
87-
<Compile Include="ViewModels\ConnectionNode.cs" />
88-
<Compile Include="ViewModels\ConnectionDialogViewModel.cs" />
89-
<Compile Include="ViewModels\Converters.cs" />
90-
<Compile Include="ViewModels\CouchbaseExplorerViewModel.cs" />
91-
<Compile Include="ViewModels\DocumentBatchNode.cs" />
92-
<Compile Include="ViewModels\DocumentNode.cs" />
93-
<Compile Include="ViewModels\IndexesFolderNode.cs" />
94-
<Compile Include="ViewModels\IndexNode.cs" />
95-
<Compile Include="ViewModels\LoadMoreNode.cs" />
96-
<Compile Include="ViewModels\PlaceholderNode.cs" />
97-
<Compile Include="ViewModels\RelayCommand.cs" />
98-
<Compile Include="ViewModels\ScopeNode.cs" />
99-
<Compile Include="ViewModels\TreeNodeBase.cs" />
100-
<Compile Include="Dialogs\ConnectionDialog.xaml.cs">
101-
<DependentUpon>ConnectionDialog.xaml</DependentUpon>
102-
</Compile>
103-
<Compile Include="Editors\DocumentEditorControl.xaml.cs">
104-
<DependentUpon>DocumentEditorControl.xaml</DependentUpon>
105-
</Compile>
106-
<Compile Include="Editors\DocumentEditorFactory.cs" />
107-
<Compile Include="Editors\DocumentEditorPane.cs" />
108-
</ItemGroup>
109-
<ItemGroup>
110-
<Page Include="Dialogs\ConnectionDialog.xaml">
111-
<SubType>Designer</SubType>
112-
<Generator>MSBuild:Compile</Generator>
113-
</Page>
114-
<Page Include="Editors\DocumentEditorControl.xaml">
115-
<SubType>Designer</SubType>
116-
<Generator>MSBuild:Compile</Generator>
117-
</Page>
17+
<PackageReference Include="CouchbaseNetClient" Version="3.8.1" />
18+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.14.40265" />
11819
</ItemGroup>
20+
11921
<ItemGroup>
12022
<Resource Include="Resources\watermark.png" />
12123
</ItemGroup>
24+
12225
<ItemGroup>
123-
<Content Include="..\..\LICENSE">
124-
<Link>resources\LICENSE</Link>
125-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
26+
<Content Include="..\..\resources\icon.png" Link="resources\icon.png">
12627
<IncludeInVSIX>true</IncludeInVSIX>
12728
</Content>
128-
<None Include="source.extension.vsixmanifest">
129-
<SubType>Designer</SubType>
130-
<Generator>VsixManifestGenerator</Generator>
131-
<LastGenOutput>source.extension.cs</LastGenOutput>
132-
</None>
133-
</ItemGroup>
134-
<ItemGroup>
135-
<Page Include="CouchbaseExplorerWindowControl.xaml">
136-
<SubType>Designer</SubType>
137-
<Generator>MSBuild:Compile</Generator>
138-
</Page>
139-
</ItemGroup>
140-
<ItemGroup>
141-
<VSCTCompile Include="VSCommandTable.vsct">
142-
<ResourceName>Menus.ctmenu</ResourceName>
143-
<SubType>Designer</SubType>
144-
<Generator>VsctGenerator</Generator>
145-
<LastGenOutput>VSCommandTable.cs</LastGenOutput>
146-
</VSCTCompile>
147-
</ItemGroup>
148-
<ItemGroup>
149-
<Reference Include="Microsoft.CSharp" />
150-
<Reference Include="netstandard" />
151-
<Reference Include="PresentationCore" />
152-
<Reference Include="PresentationFramework" />
153-
<Reference Include="System" />
154-
<Reference Include="System.ComponentModel.Composition" />
155-
<Reference Include="System.Configuration" />
156-
<Reference Include="System.Data" />
157-
<Reference Include="System.Design" />
158-
<Reference Include="System.Drawing" />
159-
<Reference Include="System.Drawing.Design" />
160-
<Reference Include="System.Management" />
161-
<Reference Include="System.Net.Http" />
162-
<Reference Include="System.Numerics" />
163-
<Reference Include="System.Runtime" />
164-
<Reference Include="System.Transactions" />
165-
<Reference Include="System.Windows.Forms" />
166-
<Reference Include="System.Xaml" />
167-
<Reference Include="System.Xml" />
168-
<Reference Include="WindowsBase" />
169-
</ItemGroup>
170-
<ItemGroup>
171-
<PackageReference Include="CouchbaseNetClient">
172-
<Version>3.8.1</Version>
173-
</PackageReference>
174-
<PackageReference Include="Microsoft.VisualStudio.SDK">
175-
<Version>17.9.37000</Version>
176-
</PackageReference>
177-
</ItemGroup>
178-
<ItemGroup />
179-
<ItemGroup>
180-
<Content Include="..\..\resources\icon.png">
181-
<Link>resources\icon.png</Link>
182-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
29+
<Content Include="..\..\resources\logo.png" Link="resources\logo.png">
18330
<IncludeInVSIX>true</IncludeInVSIX>
18431
</Content>
185-
<Content Include="..\..\resources\logo.png">
186-
<Link>resources\logo.png</Link>
187-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
32+
<Content Include="..\..\LICENSE" Link="resources\LICENSE">
18833
<IncludeInVSIX>true</IncludeInVSIX>
18934
</Content>
19035
</ItemGroup>
191-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
192-
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
193-
</Project>
36+
37+
</Project>

src/CodingWithCalvin.CouchbaseExplorer/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)