Skip to content

Commit

Permalink
feat: Added Microsoft.CodeDom.Providers.DotNetCompilerPlatform as a r…
Browse files Browse the repository at this point in the history
…eference, updated NuGet-packages' versions
  • Loading branch information
drwatson1 committed Nov 27, 2018
1 parent f9c334b commit 750d7e7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
20 changes: 20 additions & 0 deletions ProjectTemplates/AspNet.WebApi/How to create new template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How to create new template

After making any changes do:

1. Select Release configuration for a solution
1. Select ReferenceProject in "Solution Explorer" and click "Project/Export Template..." menu item from the VS main menu
1. In the appeared dialog box select "Project template" option and "ReferenceProject" in the combobox below and click Next
1. Set the value "ASP.Net WebAPI Application with OWIN" as a template name
1. Clear checkbox "Automatically import the template into Visual Studio" if you don't want immediately import it and click Finish button
1. Extract all files from the created zip-archive to any folder as you want. Typically, the file can be found in "C:\Users\<YOU>\Documents\Visual Studio 2017\My Exported Templates" folder
1. Open ReferenceProject.csproj file in any text editor and find "DocumentationFile" tag
1. Replace string "%24safeprojectname%24" to "$safeprojectname$" inside it and save the file
1. Replace a file "MyTemplate.vstemplate" with the one from the project folder with the same name
1. Add all files from the folder to zip-archive with a name "ASP.Net WebAPI Application with OWIN.zip"
1. Copy this file to "ProjectTemplates\AspNet.WebApi\ReferenceProject\ReferenceProjectVSIX\ProjectTemplates\CSharp\Web" folder and replace an existing one
1. Go to VS, expand a ReferenceProjectVSIX project and double click on source.extension.vsixmanifest file
1. Increase minor version number on the tab "Metadata" in the top right corner
1. Rebuild the ReferenceProjectVSIX project and get "ASP.Net WebAPI Application Project Template.vsix"

That's all. "ASP.Net WebAPI Application Project Template.vsix" can be uploaded to VS Marketplace or installed in VS.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
<Version>2.0.0</Version>
</PackageReference>
<PackageReference Include="AutoMapper">
<Version>7.0.1</Version>
<Version>8.0.0</Version>
</PackageReference>
<PackageReference Include="DotNetEnv">
<Version>1.1.0</Version>
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="IdentityModel">
<Version>3.7.1</Version>
<Version>3.10.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.AspNet.WebApi" Version="5.2.6" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.6" />
Expand All @@ -78,6 +78,9 @@
<Version>5.2.6</Version>
</PackageReference>
<PackageReference Include="Microsoft.AspNet.WebApi.WebHost" Version="5.2.6" />
<PackageReference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Owin.Cors">
<Version>4.0.0</Version>
</PackageReference>
Expand All @@ -104,7 +107,7 @@
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Settings.AppSettings">
<Version>2.1.2</Version>
<Version>2.2.2</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File">
<Version>4.0.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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="ASP.Net WebAPI Application Project Template-1" Version="1.3" Language="en-US" Publisher="Sergey Tregub" />
<Identity Id="ASP.Net WebAPI Application Project Template-1" Version="1.4" Language="en-US" Publisher="Sergey Tregub" />
<DisplayName>ASP.Net WebAPI Application Project Template</DisplayName>
<Description xml:space="preserve">Project template to create production-ready RESTful service based on ASP.Net WebAPI and OWIN. It contains preconfigured DI-container, logging, CORS, JWT-bearer authentication, boilerplate code and other features</Description>
<MoreInfo>https://github.com/drwatson1/AspNet-WebApi</MoreInfo>
Expand Down

0 comments on commit 750d7e7

Please sign in to comment.