-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added vs2022 support Co-authored-by: Dan Turco <[email protected]>
- Loading branch information
Showing
16 changed files
with
814 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
name: Build | ||
name: GatedBuildTest | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
RepositoryUrl: 'https://github.com/${{ github.repository }}' | ||
RepositoryBranch: '${{ github.ref }}' | ||
SourceRevisionId: '${{ github.sha }}' | ||
Configuration: Release | ||
SolutionPath: ProtoAttributor.sln | ||
Version: '1.4.${{ github.run_number }}' | ||
SolutionPath: ProtoAttributor.sln | ||
jobs: | ||
build-extension: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
VsTargetVersion: ['VS2019', 'VS2022'] | ||
VsTargetVersion: ['2019', '2022'] | ||
env: | ||
VsixManifestPath: src\Manifests\${{ matrix.VsTargetVersion }}\source.extension.vsixmanifest | ||
VsTargetVersion: '${{ matrix.VsTargetVersion }}' | ||
VsixManifestPath: Manifests\VS${{ matrix.VsTargetVersion }}\source.extension.vsixmanifest | ||
VsTargetVersion: 'VS${{ matrix.VsTargetVersion }}' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
@@ -37,10 +34,20 @@ jobs: | |
uses: microsoft/[email protected] | ||
- name: Restore NuGet Packages | ||
run: nuget restore $env:SolutionPath | ||
- name: Set version for Visual Studio Extension | ||
uses: cezarypiatek/[email protected] | ||
with: | ||
version: ${{ env.Version }} | ||
vsix-manifest-file: ${{ env.VsixManifestPath }} | ||
- name: Build extension | ||
run: msbuild $env:SolutionPath /t:Rebuild | ||
env: | ||
DeployExtension: False | ||
- name: Test extension | ||
run: dotnet test --no-build --verbosity normal $env:SolutionPath | ||
- name: Upload VSIX artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: VSIX-${{ matrix.VsTargetVersion }} | ||
path: 'ProtoAttributor\bin\VS${{ matrix.VsTargetVersion }}\Release\ProtoAttributor${{ matrix.VsTargetVersion }}.vsix' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Building for VS2019 | ||
|
||
- Open solution in vs2019 | ||
- Make any changes needed | ||
- Run unit tests | ||
|
||
|
||
# Building for VS2022 | ||
|
||
- Open solution in vs2022 | ||
- Make any changes needed | ||
- Run unit tests | ||
|
||
# Adding a new version of Visual Studio | ||
|
||
- Create a new version folder in the Manifests folder | ||
- Copy over vs2022\source.extension.vsixmanifest | ||
- Make changes for new Visual Studio version | ||
- Update ProtoAttributor proj file | ||
- Add a new entry for target version | ||
```XML | ||
<VsTargetVersion Condition="'$(VsTargetVersion)' == '' and '$(VisualStudioVersion)' == '1X.0' ">VS20XX</VsTargetVersion> | ||
``` | ||
- Add a new when clause to choose (Update XX to VS year, Update nuget packages) | ||
```XML | ||
<When Condition="'$(VsTargetVersion)' == 'VS20XX'"> | ||
<PropertyGroup> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<AssemblyName>ProtoAttributor20XX</AssemblyName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="..\Manifests\vs2022\source.extension.vsixmanifest" Link="source.extension.vsixmanifest"> | ||
<SubType>Designer</SubType> | ||
</None> | ||
<PackageReference Include="Microsoft.CodeAnalysis"> | ||
<Version>X.8.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="1X.0.0-previews-1-31410-273" ExcludeAssets="runtime" /> | ||
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="1X.0.3177-preview3" /> | ||
</ItemGroup> | ||
</When> | ||
``` | ||
|
||
More Info | ||
|
||
[migrate-vsix-to-vs2022](https://cezarypiatek.github.io/post/migrate-vsix-to-vs2022/) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011"> | ||
<Metadata> | ||
<Identity Id="ProtoAttributor.2022.fc16f3d2-4cc4-42ca-a6ca-2e7fb9cb3e5f" Version="1.0" Language="en-US" Publisher="Dan Turco" /> | ||
<DisplayName>ProtoAttributor 2022</DisplayName> | ||
<Description xml:space="preserve">ProtoAttributor is an open source Visual Studio extension that can manage the appropriate attributes on a class to support ProtoBuf. It currently supports ProtoContract, ProtoMember, ProtoIgnore, DataContract, DataMember, IgnoreDataMemeber attributes.</Description> | ||
<MoreInfo>https://github.com/d1820/proto-attributor</MoreInfo> | ||
<ReleaseNotes>https://github.com/d1820/proto-attributor/releases</ReleaseNotes> | ||
<Icon>logo.png</Icon> | ||
<PreviewImage>ProtoImagePreview.jpg</PreviewImage> | ||
<Tags>ProtoBuf, ProtoBuf-Net, Code, Build, ReFormatting, Organizing, Attributing, Contracts, Serialization</Tags> | ||
</Metadata> | ||
<Installation> | ||
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)"> | ||
<ProductArchitecture>amd64</ProductArchitecture> | ||
</InstallationTarget> | ||
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Pro" > | ||
<ProductArchitecture>amd64</ProductArchitecture> | ||
</InstallationTarget> | ||
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Enterprise" > | ||
<ProductArchitecture>amd64</ProductArchitecture> | ||
</InstallationTarget> | ||
</Installation> | ||
<Dependencies> | ||
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" /> | ||
</Dependencies> | ||
<Prerequisites> | ||
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,18.0)" DisplayName="Visual Studio core editor" /> | ||
</Prerequisites> | ||
<Assets> | ||
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" /> | ||
</Assets> | ||
</PackageManifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30011.22 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoAttributorTestShell", "ProtoAttributorTestShell\ProtoAttributorTestShell.csproj", "{A05E9BA1-3097-42CD-8291-EA30D3179FFE}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A05E9BA1-3097-42CD-8291-EA30D3179FFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A05E9BA1-3097-42CD-8291-EA30D3179FFE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A05E9BA1-3097-42CD-8291-EA30D3179FFE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A05E9BA1-3097-42CD-8291-EA30D3179FFE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {9048D1DE-16B4-4F22-B86E-32B077847C49} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.