Skip to content

Commit abdae45

Browse files
authored
feat: modernize to SDK-style project (#49)
1 parent 9a1172b commit abdae45

File tree

6 files changed

+63
-212
lines changed

6 files changed

+63
-212
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.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.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.ProjectRenamifier/bin/Release/CodingWithCalvin.ProjectRenamifier.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.ProjectRenamifier/bin/Release/CodingWithCalvin.ProjectRenamifier.info
42+
src/CodingWithCalvin.ProjectRenamifier/bin/Release/CodingWithCalvin.ProjectRenamifier.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
@@ -183,6 +183,9 @@ orleans.codegen.cs
183183
# RIA/Silverlight projects
184184
Generated_Code/
185185

186+
# SDK-style project generated files
187+
Generated/
188+
186189
# Backup & report files from converting an old project file
187190
# to a newer Visual Studio version. Backup files are not needed,
188191
# because we have git ;-)
Lines changed: 17 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,158 +1,32 @@
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-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
5-
<LangVersion>latest</LangVersion>
6-
</PropertyGroup>
7-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
8-
<PropertyGroup>
9-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
11-
<SchemaVersion>2.0</SchemaVersion>
12-
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
13-
<ProjectGuid>{BFCC6C14-28BF-40F7-B5C9-DE8D460BBE06}</ProjectGuid>
14-
<OutputType>Library</OutputType>
15-
<AppDesignerFolder>Properties</AppDesignerFolder>
4+
<TargetFramework>net48</TargetFramework>
165
<RootNamespace>CodingWithCalvin.ProjectRenamifier</RootNamespace>
176
<AssemblyName>CodingWithCalvin.ProjectRenamifier</AssemblyName>
18-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
19-
<GeneratePkgDefFile>true</GeneratePkgDefFile>
20-
<UseCodebase>true</UseCodebase>
21-
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
22-
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
23-
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
24-
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
25-
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
26-
<StartAction>Program</StartAction>
27-
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
28-
<StartArguments>/rootsuffix Exp</StartArguments>
29-
</PropertyGroup>
30-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
31-
<DebugSymbols>true</DebugSymbols>
32-
<DebugType>full</DebugType>
33-
<Optimize>false</Optimize>
34-
<OutputPath>bin\Debug\</OutputPath>
35-
<DefineConstants>DEBUG;TRACE</DefineConstants>
36-
<ErrorReport>prompt</ErrorReport>
37-
<WarningLevel>4</WarningLevel>
38-
</PropertyGroup>
39-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
40-
<DebugType>pdbonly</DebugType>
41-
<Optimize>true</Optimize>
42-
<OutputPath>bin\Release\</OutputPath>
43-
<DefineConstants>TRACE</DefineConstants>
44-
<ErrorReport>prompt</ErrorReport>
45-
<WarningLevel>4</WarningLevel>
46-
</PropertyGroup>
47-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
48-
<DebugSymbols>true</DebugSymbols>
49-
<DebugType>full</DebugType>
50-
<Optimize>false</Optimize>
51-
<OutputPath>bin\x64\Debug\</OutputPath>
52-
<DefineConstants>DEBUG;TRACE</DefineConstants>
53-
<ErrorReport>prompt</ErrorReport>
54-
<WarningLevel>4</WarningLevel>
55-
<PlatformTarget>x64</PlatformTarget>
7+
<LangVersion>latest</LangVersion>
8+
<OutputPath>bin/$(Configuration)/</OutputPath>
9+
<UseWPF>true</UseWPF>
5610
</PropertyGroup>
57-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
58-
<DebugType>pdbonly</DebugType>
59-
<Optimize>true</Optimize>
60-
<OutputPath>bin\x64\Release\</OutputPath>
61-
<DefineConstants>TRACE</DefineConstants>
62-
<ErrorReport>prompt</ErrorReport>
63-
<WarningLevel>4</WarningLevel>
64-
<PlatformTarget>x64</PlatformTarget>
11+
12+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
13+
<DeployExtension>True</DeployExtension>
6514
</PropertyGroup>
15+
6616
<ItemGroup>
67-
<Compile Include="Properties\AssemblyInfo.cs" />
68-
<Compile Include="Commands\RenamifyProjectCommand.cs" />
69-
<Compile Include="Dialogs\RenameProjectDialog.xaml.cs">
70-
<DependentUpon>RenameProjectDialog.xaml</DependentUpon>
71-
</Compile>
72-
<Compile Include="Dialogs\RenameProgressDialog.xaml.cs">
73-
<DependentUpon>RenameProgressDialog.xaml</DependentUpon>
74-
</Compile>
75-
<Compile Include="ProjectRenamifierPackage.cs" />
76-
<Compile Include="Services\ProjectFileService.cs" />
77-
<Compile Include="Services\ProjectReferenceService.cs" />
78-
<Compile Include="Services\SolutionFolderService.cs" />
79-
<Compile Include="Services\SourceFileService.cs" />
80-
<Compile Include="source.extension.cs">
81-
<AutoGen>True</AutoGen>
82-
<DesignTime>True</DesignTime>
83-
<DependentUpon>source.extension.vsixmanifest</DependentUpon>
84-
</Compile>
85-
<Compile Include="VSCommandTable.cs">
86-
<AutoGen>True</AutoGen>
87-
<DesignTime>True</DesignTime>
88-
<DependentUpon>VSCommandTable.vsct</DependentUpon>
89-
</Compile>
90-
</ItemGroup>
91-
<ItemGroup>
92-
<Page Include="Dialogs\RenameProjectDialog.xaml">
93-
<SubType>Designer</SubType>
94-
<Generator>MSBuild:Compile</Generator>
95-
</Page>
96-
<Page Include="Dialogs\RenameProgressDialog.xaml">
97-
<SubType>Designer</SubType>
98-
<Generator>MSBuild:Compile</Generator>
99-
</Page>
17+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.14.40265" />
10018
</ItemGroup>
19+
10120
<ItemGroup>
102-
<None Include="Resources\extension.manifest.json" />
103-
<Content Include="..\..\LICENSE">
104-
<Link>Resources\LICENSE</Link>
21+
<Content Include="..\..\resources\folder-icon.png" Link="Resources\folder-icon.png">
10522
<IncludeInVSIX>true</IncludeInVSIX>
10623
</Content>
107-
<None Include="source.extension.vsixmanifest">
108-
<SubType>Designer</SubType>
109-
<Generator>VsixManifestGenerator</Generator>
110-
<LastGenOutput>source.extension.cs</LastGenOutput>
111-
</None>
112-
</ItemGroup>
113-
<ItemGroup>
114-
<VSCTCompile Include="VSCommandTable.vsct">
115-
<ResourceName>Menus.ctmenu</ResourceName>
116-
<Generator>VsctGenerator</Generator>
117-
<LastGenOutput>VSCommandTable.cs</LastGenOutput>
118-
</VSCTCompile>
119-
</ItemGroup>
120-
<ItemGroup>
121-
<Reference Include="System" />
122-
<Reference Include="System.Design" />
123-
<Reference Include="System.ComponentModel.Composition" />
124-
<Reference Include="System.Xml" />
125-
<Reference Include="System.Xaml" />
126-
<Reference Include="PresentationCore" />
127-
<Reference Include="PresentationFramework" />
128-
<Reference Include="WindowsBase" />
129-
</ItemGroup>
130-
<ItemGroup>
131-
<PackageReference Include="Microsoft.VisualStudio.SDK">
132-
<Version>17.10.40171</Version>
133-
</PackageReference>
134-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.11.414">
135-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
136-
<PrivateAssets>all</PrivateAssets>
137-
</PackageReference>
138-
</ItemGroup>
139-
<ItemGroup>
140-
<Content Include="..\..\resources\folder-icon.png">
141-
<Link>Resources\folder-icon.png</Link>
24+
<Content Include="..\..\resources\logo.png" Link="Resources\logo.png">
14225
<IncludeInVSIX>true</IncludeInVSIX>
14326
</Content>
144-
<Content Include="..\..\resources\logo.png">
145-
<Link>Resources\logo.png</Link>
27+
<Content Include="..\..\LICENSE" Link="Resources\LICENSE">
14628
<IncludeInVSIX>true</IncludeInVSIX>
14729
</Content>
14830
</ItemGroup>
149-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
150-
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
151-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
152-
Other similar extension points exist, see Microsoft.Common.targets.
153-
<Target Name="BeforeBuild">
154-
</Target>
155-
<Target Name="AfterBuild">
156-
</Target>
157-
-->
158-
</Project>
31+
32+
</Project>

src/CodingWithCalvin.ProjectRenamifier/Properties/AssemblyInfo.cs

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

0 commit comments

Comments
 (0)