Skip to content

Commit 03b3062

Browse files
committed
Standardization 2.0
1 parent 48765f8 commit 03b3062

15 files changed

+78
-46
lines changed

.github/workflows/publish.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ jobs:
2222
id: artifact_manifest
2323
uses: ActionsTools/read-json-action@main
2424
with:
25-
file_path: ./artifact/CodingWithCalvin.OpenBinFolder.Vsix.info
25+
file_path: ./artifact/CodingWithCalvin.OpenBinFolder.info
2626

2727
- name: 3. Publish Release to Marketplace
2828
uses: CodingWithCalvin/GHA-VSMarketplacePublisher@v1
2929
with:
3030
marketplace-pat: ${{ secrets.VS_PAT }}
3131
publish-manifest-path: ./src/extension.manifest.json
32-
vsix-path: ./artifact/CodingWithCalvin.OpenBinFolder.Vsix.vsix
32+
vsix-path: ./artifact/CodingWithCalvin.OpenBinFolder.vsix
3333

3434
- name: 4. Create Tag & Release
3535
uses: ncipollo/[email protected]
3636
with:
37-
artifacts: ./artifact/CodingWithCalvin.OpenBinFolder.Vsix.vsix
37+
artifacts: ./artifact/CodingWithCalvin.OpenBinFolder.vsix
3838
generateReleaseNotes: true
3939
makeLatest: true
4040
token: ${{secrets.GH_SECRET}}

.github/workflows/release_build_and_deploy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ jobs:
2222
- name: 1. Versioning Release
2323
uses: CalvinAllen/action-vs-vsix-versioner@v1
2424
with:
25-
extension-manifest-file: 'src/CodingWithCalvin.OpenBinFolder.Vsix/source.extension.vsixmanifest'
26-
extension-source-file: 'src/CodingWithCalvin.OpenBinFolder.Vsix/source.extension.cs'
25+
extension-manifest-file: 'src/CodingWithCalvin.OpenBinFolder/source.extension.vsixmanifest'
26+
extension-source-file: 'src/CodingWithCalvin.OpenBinFolder/source.extension.cs'
2727

2828
- name: 2. Restoring Packages
2929
run: nuget restore src/CodingWithCalvin.OpenBinFolder.sln
3030

3131
- name: 3. Building Project
32-
run: msbuild 'src/CodingWithCalvin.OpenBinFolder.Vsix/CodingWithCalvin.OpenBinFolder.Vsix.csproj' /p:configuration='Release' /p:platform='x64'
32+
run: msbuild 'src/CodingWithCalvin.OpenBinFolder/CodingWithCalvin.OpenBinFolder.csproj' /p:configuration='Release' /p:platform='x64'
3333

3434
- name: 4. Create Information File
3535
uses: jsdaniell/[email protected]
3636
with:
37-
name: 'src/CodingWithCalvin.OpenBinFolder.Vsix/bin/x64/Release/CodingWithCalvin.OpenBinFolder.Vsix.info'
37+
name: 'src/CodingWithCalvin.OpenBinFolder/bin/x64/Release/CodingWithCalvin.OpenBinFolder.info'
3838
json: '{"sha":"${{ github.sha }}", "version":"${{ steps.step-version.outputs.version }}"}'
3939

4040
- name: 5. Publishing Build Artifact
4141
uses: actions/upload-artifact@v4
4242
with:
4343
path: |
44-
src/CodingWithCalvin.OpenBinFolder.Vsix/bin/x64/Release/CodingWithCalvin.OpenBinFolder.Vsix.info
45-
src/CodingWithCalvin.OpenBinFolder.Vsix/bin/x64/Release/CodingWithCalvin.OpenBinFolder.Vsix.vsix
44+
src/CodingWithCalvin.OpenBinFolder/bin/x64/Release/CodingWithCalvin.OpenBinFolder.info
45+
src/CodingWithCalvin.OpenBinFolder/bin/x64/Release/CodingWithCalvin.OpenBinFolder.vsix
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/CodingWithCalvin.OpenBinFolder.sln

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.5.33516.290
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodingWithCalvin.OpenBinFolder.Vsix", "CodingWithCalvin.OpenBinFolder.Vsix\CodingWithCalvin.OpenBinFolder.Vsix.csproj", "{66C238AD-8111-4579-A40C-48859AB61F25}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodingWithCalvin.OpenBinFolder", "CodingWithCalvin.OpenBinFolder\CodingWithCalvin.OpenBinFolder.csproj", "{66C238AD-8111-4579-A40C-48859AB61F25}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6088E91A-FC66-421E-A439-8EE4E7D28147}"
99
ProjectSection(SolutionItems) = preProject
10-
extension.manifest.json = extension.manifest.json
10+
..\resources\extension.manifest.json = ..\resources\extension.manifest.json
1111
..\.github\workflows\publish.yml = ..\.github\workflows\publish.yml
1212
..\README.md = ..\README.md
1313
..\.github\workflows\release_build_and_deploy.yml = ..\.github\workflows\release_build_and_deploy.yml

src/CodingWithCalvin.OpenBinFolder.Vsix/CodingWithCalvin.OpenBinFolder.Vsix.csproj renamed to src/CodingWithCalvin.OpenBinFolder/CodingWithCalvin.OpenBinFolder.csproj

+9-10
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<ProjectGuid>{66C238AD-8111-4579-A40C-48859AB61F25}</ProjectGuid>
3434
<OutputType>Library</OutputType>
3535
<AppDesignerFolder>Properties</AppDesignerFolder>
36-
<RootNamespace>CodingWithCalvin.OpenBinFolder.Vsix</RootNamespace>
37-
<AssemblyName>CodingWithCalvin.OpenBinFolder.Vsix</AssemblyName>
36+
<RootNamespace>CodingWithCalvin.OpenBinFolder</RootNamespace>
37+
<AssemblyName>CodingWithCalvin.OpenBinFolder</AssemblyName>
3838
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
3939
<GeneratePkgDefFile>true</GeneratePkgDefFile>
4040
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
@@ -63,6 +63,9 @@
6363
</Compile>
6464
</ItemGroup>
6565
<ItemGroup>
66+
<Content Include="resources\LICENSE">
67+
<IncludeInVSIX>true</IncludeInVSIX>
68+
</Content>
6669
<None Include="source.extension.vsixmanifest">
6770
<SubType>Designer</SubType>
6871
<Generator>VsixManifestGenerator</Generator>
@@ -93,16 +96,12 @@
9396
</PackageReference>
9497
</ItemGroup>
9598
<ItemGroup>
96-
<Content Include="..\..\LICENSE">
97-
<Link>Resources\LICENSE</Link>
98-
<IncludeInVSIX>true</IncludeInVSIX>
99-
</Content>
100-
<Content Include="..\Resources\folder-icon.png">
101-
<Link>Resources\folder-icon.png</Link>
99+
<Content Include="..\..\resources\folder-icon.png">
100+
<Link>resources\folder-icon.png</Link>
102101
<IncludeInVSIX>true</IncludeInVSIX>
103102
</Content>
104-
<Content Include="..\Resources\logo.png">
105-
<Link>Resources\logo.png</Link>
103+
<Content Include="..\..\resources\logo.png">
104+
<Link>resources\logo.png</Link>
106105
<IncludeInVSIX>true</IncludeInVSIX>
107106
</Content>
108107
</ItemGroup>

src/CodingWithCalvin.OpenBinFolder.Vsix/Commands/OpenBinFolderCommand.cs renamed to src/CodingWithCalvin.OpenBinFolder/Commands/OpenBinFolderCommand.cs

+24-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.VisualStudio.Shell;
88
using Project = EnvDTE.Project;
99

10-
namespace CodingWithCalvin.OpenBinFolder.Vsix.Commands
10+
namespace CodingWithCalvin.OpenBinFolder.Commands
1111
{
1212
internal class OpenBinFolderCommand
1313
{
@@ -17,18 +17,22 @@ private OpenBinFolderCommand(Package package)
1717
{
1818
_package = package;
1919

20-
var commandService = (OleMenuCommandService)ServiceProvider.GetService(typeof(IMenuCommandService));
20+
var commandService = (OleMenuCommandService)
21+
ServiceProvider.GetService(typeof(IMenuCommandService));
2122

2223
if (commandService == null)
2324
{
2425
return;
2526
}
2627

27-
var menuCommandId = new CommandID(PackageGuids.CommandSetGuid, PackageIds.OpenBinCommandId);
28+
var menuCommandId = new CommandID(
29+
PackageGuids.CommandSetGuid,
30+
PackageIds.OpenBinCommandId
31+
);
2832
var menuItem = new MenuCommand(OpenPath, menuCommandId);
2933
commandService.AddCommand(menuItem);
3034
}
31-
35+
3236
private IServiceProvider ServiceProvider => _package;
3337

3438
public static void Initialize(Package package)
@@ -39,13 +43,16 @@ public static void Initialize(Package package)
3943
private void OpenPath(object sender, EventArgs e)
4044
{
4145
ThreadHelper.ThrowIfNotOnUIThread();
42-
46+
4347
if (!(ServiceProvider.GetService(typeof(DTE)) is DTE2 dte))
4448
{
4549
throw new ArgumentNullException(nameof(dte));
4650
}
4751

48-
foreach (UIHierarchyItem selectedItem in (Array)dte.ToolWindows.SolutionExplorer.SelectedItems)
52+
foreach (
53+
UIHierarchyItem selectedItem in (Array)
54+
dte.ToolWindows.SolutionExplorer.SelectedItems
55+
)
4956
{
5057
switch (selectedItem.Object)
5158
{
@@ -56,11 +63,13 @@ private void OpenPath(object sender, EventArgs e)
5663
}
5764
catch (Exception ex)
5865
{
59-
MessageBox.Show($@"
66+
MessageBox.Show(
67+
$@"
6068
Unable to determine output path for selected project
6169
{Environment.NewLine}
6270
{Environment.NewLine}
63-
Exception: {ex.Message}");
71+
Exception: {ex.Message}"
72+
);
6473
}
6574

6675
break;
@@ -69,18 +78,18 @@ private void OpenPath(object sender, EventArgs e)
6978

7079
void OpenProjectBinFolder(Project project)
7180
{
72-
var projectPath = Path.GetDirectoryName(project.FullName)
73-
?? throw new InvalidOperationException();
81+
var projectPath =
82+
Path.GetDirectoryName(project.FullName)
83+
?? throw new InvalidOperationException();
7484

75-
var projectOutputPath = project.ConfigurationManager.ActiveConfiguration.Properties
76-
.Item("OutputPath").Value.ToString();
85+
var projectOutputPath = project
86+
.ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath")
87+
.Value.ToString();
7788

7889
var projectBinPath = Path.Combine(projectPath, projectOutputPath);
7990

8091
System.Diagnostics.Process.Start(
81-
Directory.Exists(projectBinPath)
82-
? projectBinPath
83-
: projectPath
92+
Directory.Exists(projectBinPath) ? projectBinPath : projectPath
8493
);
8594
}
8695
}

src/CodingWithCalvin.OpenBinFolder.Vsix/OpenBinFolderPackage.cs renamed to src/CodingWithCalvin.OpenBinFolder/OpenBinFolderPackage.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
using System;
22
using System.Runtime.InteropServices;
33
using System.Threading;
4-
using CodingWithCalvin.OpenBinFolder.Vsix.Commands;
4+
using CodingWithCalvin.OpenBinFolder.Commands;
55
using Microsoft.VisualStudio.Shell;
66
using Task = System.Threading.Tasks.Task;
77

8-
namespace CodingWithCalvin.OpenBinFolder.Vsix
8+
namespace CodingWithCalvin.OpenBinFolder
99
{
1010
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
1111
[InstalledProductRegistration(Vsix.Name, Vsix.Description, Vsix.Version)]
1212
[Guid(PackageGuids.PackageGuidString)]
1313
[ProvideMenuResource("Menus.ctmenu", 1)]
1414
public sealed class OpenBinFolderPackage : AsyncPackage
1515
{
16-
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
16+
protected override async Task InitializeAsync(
17+
CancellationToken cancellationToken,
18+
IProgress<ServiceProgressData> progress
19+
)
1720
{
1821
await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
1922

src/CodingWithCalvin.OpenBinFolder.Vsix/Properties/AssemblyInfo.cs renamed to src/CodingWithCalvin.OpenBinFolder/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
3-
using CodingWithCalvin.OpenBinFolder.Vsix;
3+
using CodingWithCalvin.OpenBinFolder;
44

55
[assembly: AssemblyTitle(Vsix.Name)]
66
[assembly: AssemblyDescription(Vsix.Description)]

src/CodingWithCalvin.OpenBinFolder.Vsix/VSCommandTable.cs renamed to src/CodingWithCalvin.OpenBinFolder/VSCommandTable.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file was generated by VSIX Synchronizer
44
// </auto-generated>
55
// ------------------------------------------------------------------------------
6-
namespace CodingWithCalvin.OpenBinFolder.Vsix
6+
namespace CodingWithCalvin.OpenBinFolder
77
{
88
using System;
99

src/CodingWithCalvin.OpenBinFolder.Vsix/VSCommandTable.vsct renamed to src/CodingWithCalvin.OpenBinFolder/VSCommandTable.vsct

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</Buttons>
1616

1717
<Bitmaps>
18-
<Bitmap guid="IconGuid" usedList="FolderIcon" href="../resources/folder-icon.png" />
18+
<Bitmap guid="IconGuid" usedList="FolderIcon" href="../../resources/folder-icon.png" />
1919
</Bitmaps>
2020
</Commands>
2121

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Coding with Calvin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/CodingWithCalvin.OpenBinFolder.Vsix/source.extension.cs renamed to src/CodingWithCalvin.OpenBinFolder/source.extension.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file was generated by VSIX Synchronizer
44
// </auto-generated>
55
// ------------------------------------------------------------------------------
6-
namespace CodingWithCalvin.OpenBinFolder.Vsix
6+
namespace CodingWithCalvin.OpenBinFolder
77
{
88
internal sealed partial class Vsix
99
{
@@ -13,6 +13,6 @@ internal sealed partial class Vsix
1313
public const string Language = "en-US";
1414
public const string Version = "1.1";
1515
public const string Author = "Coding With Calvin";
16-
public const string Tags = "bin,debug,release,folder,output";
16+
public const string Tags = "bin,debug,folder,output";
1717
}
1818
}

src/CodingWithCalvin.OpenBinFolder.Vsix/source.extension.vsixmanifest renamed to src/CodingWithCalvin.OpenBinFolder/source.extension.vsixmanifest

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<DisplayName>Open Bin Folder</DisplayName>
66
<Description xml:space="preserve">Adds an 'Open Bin Folder' to the right click menu of the project for quick access to the builds output folder.</Description>
77
<MoreInfo>https://github.com/CodingWithCalvin/VS-OpenBinFolder</MoreInfo>
8-
<License>Resources\LICENSE</License>
9-
<Icon>Resources\logo.png</Icon>
8+
<License>resources\LICENSE</License>
9+
<Icon>resources\logo.png</Icon>
1010
<Tags>bin,debug,folder,output</Tags>
1111
</Metadata>
1212
<Installation>

0 commit comments

Comments
 (0)