Skip to content

Commit 1cad0e9

Browse files
authored
feat: modernize to SDK-style project with ARM64 support (#13)
- Convert .csproj to SDK-style using CodingWithCalvin.VsixSdk/0.3.0 - Add ARM64 installation target alongside AMD64 - Update VS version range to [17.0,19.0) - Standardize output path to bin/$(Configuration)/ - Replace msbuild workflow with dotnet build - Rename build workflow from release_build_and_deploy.yml to build.yml - Use CalVer versioning (YYYY.M.D.RunNumber)
1 parent f14f2f5 commit 1cad0e9

5 files changed

Lines changed: 65 additions & 146 deletions

File tree

.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.OpenBinFolder/CodingWithCalvin.OpenBinFolder.csproj -c Release -p:SetVsixVersion=${{ steps.version.outputs.version }}
30+
31+
- name: 3. Create Information File
32+
uses: jsdaniell/create-json@v1.2.3
33+
with:
34+
name: 'src/CodingWithCalvin.OpenBinFolder/bin/Release/CodingWithCalvin.OpenBinFolder.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.OpenBinFolder/bin/Release/CodingWithCalvin.OpenBinFolder.info
42+
src/CodingWithCalvin.OpenBinFolder/bin/Release/CodingWithCalvin.OpenBinFolder.vsix

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919

2020
- name: 1. Download artifact
2121
id: download-artifact
22-
uses: dawidd6/action-download-artifact@v2
22+
uses: dawidd6/action-download-artifact@v6
2323
with:
24-
workflow: release_build_and_deploy.yml
24+
workflow: build.yml
2525
workflow_conclusion: success
2626

2727
- name: 2. Parse Artifact Manifest

.github/workflows/release_build_and_deploy.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 17 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,31 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="CodingWithCalvin.VsixSdk/0.3.0">
2+
33
<PropertyGroup>
4-
<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
5-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6-
<UseCodebase>true</UseCodebase>
7-
<FileUpgradeFlags>
8-
</FileUpgradeFlags>
9-
<UpgradeBackupLocation>
10-
</UpgradeBackupLocation>
11-
<OldToolsVersion>15.0</OldToolsVersion>
12-
<TargetFrameworkProfile />
13-
</PropertyGroup>
14-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
15-
<PlatformTarget>x64</PlatformTarget>
16-
<OutputPath>bin\x64\Release\</OutputPath>
17-
<Optimize>true</Optimize>
18-
<DefineConstants>X64</DefineConstants>
19-
</PropertyGroup>
20-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
21-
<DebugSymbols>true</DebugSymbols>
22-
<OutputPath>bin\x64\Debug\</OutputPath>
23-
<PlatformTarget>x64</PlatformTarget>
24-
<DebugType>full</DebugType>
25-
<DefineConstants>TRACE;DEBUG;X64</DefineConstants>
26-
</PropertyGroup>
27-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
28-
<PropertyGroup>
29-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
30-
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
31-
<SchemaVersion>2.0</SchemaVersion>
32-
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
33-
<ProjectGuid>{66C238AD-8111-4579-A40C-48859AB61F25}</ProjectGuid>
34-
<OutputType>Library</OutputType>
35-
<AppDesignerFolder>Properties</AppDesignerFolder>
4+
<TargetFramework>net48</TargetFramework>
365
<RootNamespace>CodingWithCalvin.OpenBinFolder</RootNamespace>
376
<AssemblyName>CodingWithCalvin.OpenBinFolder</AssemblyName>
38-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
39-
<GeneratePkgDefFile>true</GeneratePkgDefFile>
40-
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
41-
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
42-
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
43-
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
44-
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
45-
<StartAction>Program</StartAction>
46-
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
47-
<StartArguments>/rootsuffix Exp</StartArguments>
48-
<VsixType>v3</VsixType>
7+
<LangVersion>latest</LangVersion>
8+
<OutputPath>bin/$(Configuration)/</OutputPath>
499
</PropertyGroup>
10+
11+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
12+
<DeployExtension>True</DeployExtension>
13+
</PropertyGroup>
14+
5015
<ItemGroup>
51-
<Compile Include="Commands\OpenBinFolderCommand.cs" />
52-
<Compile Include="VSCommandTable.cs">
53-
<AutoGen>True</AutoGen>
54-
<DesignTime>True</DesignTime>
55-
<DependentUpon>VSCommandTable.vsct</DependentUpon>
56-
</Compile>
57-
<Compile Include="OpenBinFolderPackage.cs" />
58-
<Compile Include="Properties\AssemblyInfo.cs" />
59-
<Compile Include="source.extension.cs">
60-
<AutoGen>True</AutoGen>
61-
<DesignTime>True</DesignTime>
62-
<DependentUpon>source.extension.vsixmanifest</DependentUpon>
63-
</Compile>
16+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.14.40265" />
6417
</ItemGroup>
18+
6519
<ItemGroup>
66-
<Content Include="..\..\LICENSE">
67-
<Link>resources\LICENSE</Link>
20+
<Content Include="..\..\resources\folder-icon.png" Link="resources\folder-icon.png">
6821
<IncludeInVSIX>true</IncludeInVSIX>
6922
</Content>
70-
<None Include="source.extension.vsixmanifest">
71-
<SubType>Designer</SubType>
72-
<Generator>VsixManifestGenerator</Generator>
73-
<LastGenOutput>source.extension.cs</LastGenOutput>
74-
</None>
75-
</ItemGroup>
76-
<ItemGroup>
77-
<Reference Include="Microsoft.CSharp" />
78-
<Reference Include="System" />
79-
<Reference Include="System.Design" />
80-
<Reference Include="System.Windows.Forms" />
81-
</ItemGroup>
82-
<ItemGroup />
83-
<ItemGroup>
84-
<VSCTCompile Include="VSCommandTable.vsct">
85-
<Generator>VsctGenerator</Generator>
86-
<LastGenOutput>VSCommandTable.cs</LastGenOutput>
87-
<ResourceName>Menus.ctmenu</ResourceName>
88-
</VSCTCompile>
89-
</ItemGroup>
90-
<ItemGroup>
91-
<PackageReference Include="Microsoft.VisualStudio.SDK">
92-
<Version>15.0.1</Version>
93-
</PackageReference>
94-
<PackageReference Include="Microsoft.VSSDK.BuildTools">
95-
<Version>17.0.5232</Version>
96-
<IncludeAssets>runtime; build; native; contentfiles; analyzers;</IncludeAssets>
97-
</PackageReference>
98-
</ItemGroup>
99-
<ItemGroup>
100-
<Content Include="..\..\resources\folder-icon.png">
101-
<Link>resources\folder-icon.png</Link>
23+
<Content Include="..\..\resources\logo.png" Link="resources\logo.png">
10224
<IncludeInVSIX>true</IncludeInVSIX>
10325
</Content>
104-
<Content Include="..\..\resources\logo.png">
105-
<Link>resources\logo.png</Link>
26+
<Content Include="..\..\LICENSE" Link="resources\LICENSE">
10627
<IncludeInVSIX>true</IncludeInVSIX>
10728
</Content>
10829
</ItemGroup>
109-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
110-
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
111-
</Project>
30+
31+
</Project>

src/CodingWithCalvin.OpenBinFolder/source.extension.vsixmanifest

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
<Tags>bin,debug,folder,output</Tags>
1111
</Metadata>
1212
<Installation>
13-
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Community">
13+
<InstallationTarget Version="[17.0,19.0)" Id="Microsoft.VisualStudio.Community">
1414
<ProductArchitecture>amd64</ProductArchitecture>
1515
</InstallationTarget>
16+
<InstallationTarget Version="[17.0,19.0)" Id="Microsoft.VisualStudio.Community">
17+
<ProductArchitecture>arm64</ProductArchitecture>
18+
</InstallationTarget>
1619
</Installation>
1720
<Dependencies>
1821
</Dependencies>

0 commit comments

Comments
 (0)