Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VS2022 Support #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions vs/ApiClientGenerationTools.sln
Original file line number Diff line number Diff line change
@@ -1,26 +1,50 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28917.182
# Visual Studio Version 17
VisualStudioVersion = 17.0.31410.414
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiClientGenerationTools", "src\ApiClientGenerationTools.csproj", "{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D8854F3A-BEAA-44E0-A140-413225798789}"
ProjectSection(SolutionItems) = preProject
..\docs\vs\CHANGELOG.MD = ..\docs\vs\CHANGELOG.MD
..\docs\EULA.txt = ..\docs\EULA.txt
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiClientGenerationTools16", "src\ApiClientGenerationTools\ApiClientGenerationTools16.csproj", "{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiClientGenerationTools17", "src\ApiClientGenerationTools17\ApiClientGenerationTools17.csproj", "{5D21B0FD-276E-4358-80E6-C24334D04440}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ApiClientGenerationToolsShared", "src\ApiClientGenerationToolsShared\ApiClientGenerationToolsShared.shproj", "{406A260B-8A7A-4C0B-894E-D26B2AFC8CDA}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\ApiClientGenerationToolsShared\ApiClientGenerationToolsShared.projitems*{154f8bfa-6d1d-4fef-95ac-95d4222b34da}*SharedItemsImports = 4
src\ApiClientGenerationToolsShared\ApiClientGenerationToolsShared.projitems*{406a260b-8a7a-4c0b-894e-d26b2afc8cda}*SharedItemsImports = 13
src\ApiClientGenerationToolsShared\ApiClientGenerationToolsShared.projitems*{5d21b0fd-276e-4358-80e6-c24334d04440}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Debug|x86.ActiveCfg = Debug|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Debug|x86.Build.0 = Debug|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Release|Any CPU.Build.0 = Release|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Release|x86.ActiveCfg = Release|Any CPU
{154F8BFA-6D1D-4FEF-95AC-95D4222B34DA}.Release|x86.Build.0 = Release|Any CPU
{5D21B0FD-276E-4358-80E6-C24334D04440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D21B0FD-276E-4358-80E6-C24334D04440}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D21B0FD-276E-4358-80E6-C24334D04440}.Debug|x86.ActiveCfg = Debug|x86
{5D21B0FD-276E-4358-80E6-C24334D04440}.Debug|x86.Build.0 = Debug|x86
{5D21B0FD-276E-4358-80E6-C24334D04440}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D21B0FD-276E-4358-80E6-C24334D04440}.Release|Any CPU.Build.0 = Release|Any CPU
{5D21B0FD-276E-4358-80E6-C24334D04440}.Release|x86.ActiveCfg = Release|x86
{5D21B0FD-276E-4358-80E6-C24334D04440}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
20 changes: 20 additions & 0 deletions vs/Delete-BIN-OBJ-Folders.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@ECHO off
cls

ECHO Deleting all BIN and OBJ folders...
ECHO.

FOR /d /r . %%d in (bin,obj) DO (
IF EXIST "%%d" (
ECHO %%d | FIND /I "\node_modules\" > Nul && (
ECHO.Skipping: %%d
) || (
ECHO.Deleting: %%d
rd /s/q "%%d"
)
)
)

ECHO.
ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit.
pause > nul
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\ApiClientGenerationToolsShared\Resources\ApiClientGenerationTools.ico</ApplicationIcon>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -49,58 +52,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Commands\ApplyCustomTool.cs" />
<Compile Include="Generators\NswagCodeGenerator.cs" />
<Compile Include="VSPackage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="ItemTemplates\PetStore.zip">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
<None Include="ItemTemplates\PetStore\PetStore.nswag" />
</ItemGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<VSCTCompile Include="VSCommandTable.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
</VSCTCompile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<ManifestResourceName>VSPackage</ManifestResourceName>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\docs\EULA.txt">
<Link>Resources\EULA.txt</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Resources\ApiClientGenerationTools.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Resources\Icon128x128.png">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<VSTemplate Include="ItemTemplates\PetStore\PetStore.vstemplate" />
<None Include="ItemTemplates\PetStore\__PreviewImage.png" />
<None Include="ItemTemplates\PetStore\__TemplateIcon.ico" />
</ItemGroup>
<PropertyGroup>
<GetVsixSourceItemsDependsOn>$(GetVsixSourceItemsDependsOn);IncludeNuGetResolvedAssets</GetVsixSourceItemsDependsOn>
</PropertyGroup>
Expand All @@ -110,34 +72,29 @@
</ItemGroup>
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime">
<Version>14.3.26930</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.OLE.Interop">
<Version>7.10.6071</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes">
<Version>15.0.27</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.SDK.VsixSuppression">
<Version>14.1.37</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime">
<Version>14.3.26929</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.TextTemplating.VSHost.15.0">
<Version>16.1.28917.181</Version>
<PackageReference Include="Microsoft.VisualStudio.SDK">
<Version>17.0.0-previews-1-31410-273</Version>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools">
<Version>16.1.3128</Version>
<Version>17.0.1619-preview1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NSwag.Commands">
<Version>13.0.0</Version>
<Version>13.11.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="..\..\..\docs\EULA.txt">
<Link>Resources\EULA.txt</Link>
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Resources\ApiClientGenerationTools.ico" />
<Content Include="Resources\Icon128x128.png" />
<VSCTCompile Include="VSCommandTable.vsct" />
</ItemGroup>
<Import Project="..\ApiClientGenerationToolsShared\ApiClientGenerationToolsShared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\ApiClientGenerationToolsShared\Resources\ApiClientGenerationTools.ico</ApplicationIcon>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{5D21B0FD-276E-4358-80E6-C24334D04440}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ApiClientGenerationTools17</RootNamespace>
<AssemblyName>ApiClientGenerationTools17</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<UseCodebase>true</UseCodebase>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
<StartAction>Program</StartAction>
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
<StartArguments>/rootsuffix Exp</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.0-previews-1-31410-273" ExcludeAssets="runtime">
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.0.1619-preview1" />
<PackageReference Include="NSwag.Commands">
<Version>13.11.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\docs\EULA.txt">
<Link>Resources\EULA.txt</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Resources\ApiClientGenerationTools.ico" />
<Content Include="Resources\Icon128x128.png" />
<Content Include="VSCommandTable.vsct" />
</ItemGroup>
<Import Project="..\ApiClientGenerationToolsShared\ApiClientGenerationToolsShared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
33 changes: 33 additions & 0 deletions vs/src/ApiClientGenerationTools17/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ApiClientGenerationTools17")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ApiClientGenerationTools17")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions vs/src/ApiClientGenerationTools17/VSCommandTable.vsct
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Include href="KnownImageIds.vsct" />

<Commands package="guidPackage">
<Buttons>
<Button guid="guidPackageCmdSet" id="ApplyCustomToolId" priority="0x0100" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_ITEM_INCLUDEEXCLUDE"/>
<Icon guid="ImageCatalogGuid" id="TriggerScript"/>
<CommandFlag>IconIsMoniker</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Generate API Client</ButtonText>
</Strings>
</Button>
</Buttons>
</Commands>

<VisibilityConstraints>
<VisibilityItem guid="guidPackageCmdSet" id="ApplyCustomToolId" context="guidUIContext"/>
</VisibilityConstraints>

<Symbols>
<GuidSymbol name="guidPackage" value="{13263952-ae69-488d-a66f-9a3ebc510433}" />
<GuidSymbol name="guidUIContext" value="{13263952-c2ea-43fd-bd20-1ce4b3fe30f9}" />

<GuidSymbol name="guidPackageCmdSet" value="{13263952-2c77-4b24-acae-06a2fc715b7b}">
<IDSymbol name="ApplyCustomToolId" value="0x0100" />
</GuidSymbol>
</Symbols>
</CommandTable>
26 changes: 26 additions & 0 deletions vs/src/ApiClientGenerationTools17/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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="ApiClientGenerationTools17.37310a92-2330-48dd-b457-cb15f130f808" Version="0.0.2" Language="en-US" Publisher="Dmitry Pavlov" />
<DisplayName>API Client Generation Tools</DisplayName>
<Description xml:space="preserve">API Client Generation Tools for Visual Studio</Description>
<MoreInfo>https://github.com/dmitry-pavlov/api-client-generation-tools</MoreInfo>
<License>Resources\EULA.txt</License>
<GettingStartedGuide>https://github.com/dmitry-pavlov/api-client-generation-tools/blob/master/README.md</GettingStartedGuide>
<ReleaseNotes>https://github.com/dmitry-pavlov/api-client-generation-tools/blob/master/docs/vs/CHANGELOG.MD</ReleaseNotes>
<Icon>Resources\ApiClientGenerationTools.ico</Icon>
<PreviewImage>Resources\Icon128x128.png</PreviewImage>
<Tags>Custom Tool, OpenAPI, Swagger, REST API, OAS, OAI, Web API, .NET Core, HttpClient, Swashbuckle, NSwag, NSwagStudio, Code Generation, Scaffolding, Coding, Tools</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
<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>
Loading