@content
30 |Best practices cookbook
68 |@ConfigurationManager.AppSettings["description"]
69 |-
70 |
- Load packages correctly 71 |
- Code snippets for variuos scenarios 72 |
- Performance guide 73 |
├── .gitattributes ├── .gitignore ├── README.md ├── appveyor.yml ├── lib ├── Microsoft.Html.Core.dll └── Microsoft.Web.Core.dll ├── src ├── 404.cshtml ├── Web.config ├── app_code │ ├── Helpers.cshtml │ ├── MarkdownPage.cs │ ├── PageParser.cs │ └── PageSystem.cs ├── bin │ ├── Markdig.dll │ ├── Markdig.dll.refresh │ ├── Microsoft.Html.Core.dll │ ├── Microsoft.Html.Core.dll.refresh │ ├── Microsoft.Web.Core.dll │ ├── Microsoft.Web.Core.dll.refresh │ ├── Microsoft.Web.Infrastructure.dll │ ├── Microsoft.Web.Infrastructure.dll.refresh │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.dll.refresh │ ├── System.Web.Razor.dll │ ├── System.Web.Razor.dll.refresh │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.dll.refresh │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.dll.refresh │ ├── System.Web.WebPages.dll │ ├── System.Web.WebPages.dll.refresh │ ├── WebMarkupMin.Core.dll │ ├── WebMarkupMin.Core.dll.refresh │ ├── WebMarkupMin.Web.dll │ └── WebMarkupMin.Web.dll.refresh ├── gulpfile.js ├── index.cshtml ├── package.json ├── packages.config ├── pages │ ├── Commands │ │ ├── _assets │ │ │ └── index-package-managers.png │ │ ├── index.md │ │ ├── vsct-file.md │ │ └── walkthrough.md │ ├── Editor │ │ ├── _assets │ │ │ └── index-package-managers.png │ │ ├── index.md │ │ ├── intellisense.md │ │ └── syntax-highlighting.md │ ├── GettingStarted │ │ ├── _assets │ │ │ └── index-package-managers.png │ │ ├── index.md │ │ └── walkthrough.md │ ├── Performance │ │ ├── _assets │ │ │ └── index-package-managers.png │ │ ├── asyncpackage.md │ │ ├── autoload.md │ │ └── index.md │ ├── _assets │ │ ├── hero-1024.jpg │ │ ├── hero-1280.jpg │ │ ├── hero-1600.jpg │ │ ├── hero-1920.jpg │ │ ├── hero-667.jpg │ │ └── hero-original.jpg │ └── index.md ├── search.cshtml ├── themes │ └── standard │ │ ├── _Layout.cshtml │ │ ├── favicon │ │ ├── android-chrome-144x144.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-36x36.png │ │ ├── android-chrome-48x48.png │ │ ├── android-chrome-72x72.png │ │ ├── android-chrome-96x96.png │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon-precomposed.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── manifest.json │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ └── mstile-70x70.png │ │ ├── img │ │ ├── arrow.min.svg │ │ ├── arrow.png │ │ ├── arrow.svg │ │ ├── codeplex.min.svg │ │ ├── codeplex.png │ │ ├── codeplex.svg │ │ ├── github.min.svg │ │ ├── github.png │ │ ├── github.svg │ │ ├── microsoft.min.svg │ │ ├── microsoft.svg │ │ ├── nav-closed.min.svg │ │ ├── nav-closed.png │ │ ├── nav-closed.svg │ │ ├── nav-open.min.svg │ │ ├── nav-open.png │ │ ├── nav-open.svg │ │ ├── search.min.svg │ │ ├── search.png │ │ ├── search.svg │ │ ├── spinner.gif │ │ ├── vs.min.svg │ │ ├── vs.png │ │ └── vs.svg │ │ ├── js │ │ ├── dataService.js │ │ ├── menu.js │ │ ├── pinned.js │ │ └── search.js │ │ ├── less │ │ ├── breadcrumb.less │ │ ├── footer.less │ │ ├── global.less │ │ ├── header.less │ │ ├── main.less │ │ ├── mediaqueries.less │ │ ├── nav.less │ │ ├── search.less │ │ ├── site.less │ │ └── variables.less │ │ ├── output │ │ ├── site.css │ │ └── site.js │ │ └── page.cshtml └── views │ ├── appcache.cshtml │ ├── keywords.cshtml │ ├── opensearch.cshtml │ ├── robots.cshtml │ └── sitemap.cshtml ├── test ├── aspnet_compiler.exe └── test.ps1 └── vsext-docs.sln /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | .vs 6 | 7 | # Build results 8 | [Dd]ebug/ 9 | [Dd]ebugPublic/ 10 | [Rr]elease/ 11 | [Rr]eleases/ 12 | x64/ 13 | x86/ 14 | build/ 15 | bld/ 16 | **/[Bb]in/*.pdb 17 | **/[Bb]in/*.xml 18 | [Oo]bj/ 19 | 20 | # Roslyn cache directories 21 | *.ide/ 22 | 23 | # MSTest test Results 24 | [Tt]est[Rr]esult*/ 25 | [Bb]uild[Ll]og.* 26 | 27 | #NUNIT 28 | *.VisualState.xml 29 | TestResult.xml 30 | 31 | # Build Results of an ATL Project 32 | [Dd]ebugPS/ 33 | [Rr]eleasePS/ 34 | dlldata.c 35 | 36 | *_i.c 37 | *_p.c 38 | *_i.h 39 | *.ilk 40 | *.meta 41 | *.obj 42 | *.pch 43 | *.pdb 44 | *.pgc 45 | *.pgd 46 | *.rsp 47 | *.sbr 48 | *.tlb 49 | *.tli 50 | *.tlh 51 | *.tmp 52 | *.tmp_proj 53 | *.log 54 | *.vspscc 55 | *.vssscc 56 | .builds 57 | *.pidb 58 | *.svclog 59 | *.scc 60 | 61 | # Chutzpah Test files 62 | _Chutzpah* 63 | 64 | # Visual C++ cache files 65 | ipch/ 66 | *.aps 67 | *.ncb 68 | *.opensdf 69 | *.sdf 70 | *.cachefile 71 | 72 | # Visual Studio profiler 73 | *.psess 74 | *.vsp 75 | *.vspx 76 | 77 | # TFS 2012 Local Workspace 78 | $tf/ 79 | 80 | # Guidance Automation Toolkit 81 | *.gpState 82 | 83 | # ReSharper is a .NET coding add-in 84 | _ReSharper*/ 85 | *.[Rr]e[Ss]harper 86 | *.DotSettings.user 87 | 88 | # JustCode is a .NET coding addin-in 89 | .JustCode 90 | 91 | # TeamCity is a build add-in 92 | _TeamCity* 93 | 94 | # DotCover is a Code Coverage Tool 95 | *.dotCover 96 | 97 | # NCrunch 98 | _NCrunch_* 99 | .*crunch*.local.xml 100 | 101 | # MightyMoose 102 | *.mm.* 103 | AutoTest.Net/ 104 | 105 | # Web workbench (sass) 106 | .sass-cache/ 107 | 108 | # Installshield output folder 109 | [Ee]xpress/ 110 | 111 | # DocProject is a documentation generator add-in 112 | DocProject/buildhelp/ 113 | DocProject/Help/*.HxT 114 | DocProject/Help/*.HxC 115 | DocProject/Help/*.hhc 116 | DocProject/Help/*.hhk 117 | DocProject/Help/*.hhp 118 | DocProject/Help/Html2 119 | DocProject/Help/html 120 | 121 | # Click-Once directory 122 | publish/ 123 | 124 | # Publish Web Output 125 | *.[Pp]ublish.xml 126 | *.azurePubxml 127 | # TODO: Comment the next line if you want to checkin your web deploy settings 128 | # but database connection strings (with potential passwords) will be unencrypted 129 | *.pubxml 130 | *.publishproj 131 | 132 | # NuGet Packages 133 | *.nupkg 134 | # The packages folder can be ignored because of Package Restore 135 | **/packages/* 136 | # except build/, which is used as an MSBuild target. 137 | !**/packages/build/ 138 | # If using the old MSBuild-Integrated Package Restore, uncomment this: 139 | #!**/packages/repositories.config 140 | 141 | # Windows Azure Build Output 142 | csx/ 143 | *.build.csdef 144 | 145 | # Windows Store app package directory 146 | AppPackages/ 147 | 148 | # Others 149 | sql/ 150 | *.Cache 151 | ClientBin/ 152 | [Ss]tyle[Cc]op.* 153 | ~$* 154 | *~ 155 | *.dbmdl 156 | *.dbproj.schemaview 157 | *.pfx 158 | *.publishsettings 159 | node_modules/ 160 | 161 | # RIA/Silverlight projects 162 | Generated_Code/ 163 | 164 | # Backup & report files from converting an old project file 165 | # to a newer Visual Studio version. Backup files are not needed, 166 | # because we have git ;-) 167 | _UpgradeReport_Files/ 168 | Backup*/ 169 | UpgradeLog*.XML 170 | UpgradeLog*.htm 171 | 172 | # SQL Server files 173 | *.mdf 174 | *.ldf 175 | 176 | # Business Intelligence projects 177 | *.rdl.data 178 | *.bim.layout 179 | *.bim_*.settings 180 | 181 | # Microsoft Fakes 182 | FakesAssemblies/ 183 | 184 | # ========================= 185 | # Operating System Files 186 | # ========================= 187 | 188 | # OSX 189 | # ========================= 190 | 191 | .DS_Store 192 | .AppleDouble 193 | .LSOverride 194 | 195 | # Thumbnails 196 | ._* 197 | 198 | # Files that might appear on external disk 199 | .Spotlight-V100 200 | .Trashes 201 | 202 | # Directories potentially created on remote AFP share 203 | .AppleDB 204 | .AppleDesktop 205 | Network Trash Folder 206 | Temporary Items 207 | .apdisk 208 | 209 | # Windows 210 | # ========================= 211 | 212 | # Windows image file caches 213 | Thumbs.db 214 | ehthumbs.db 215 | 216 | # Folder config file 217 | Desktop.ini 218 | 219 | # Recycle Bin used on file shares 220 | $RECYCLE.BIN/ 221 | 222 | # Windows Installer files 223 | *.cab 224 | *.msi 225 | *.msm 226 | *.msp 227 | 228 | # Windows shortcuts 229 | *.lnk 230 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Visual Studio Extensibility 2 | 3 | [](https://ci.appveyor.com/project/madskristensen/vsext-docs) 4 | 5 | Website: [vsix.azurewebsites.net/](http://vsix.azurewebsites.net/) 6 | 7 | ### A cookbook 8 | 9 | - Lots of code snippets 10 | - Guide to performance tuning 11 | - Links to helpful tools -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | configuration: Release 3 | 4 | install: 5 | - npm install npm@3.10.8 -g 6 | - set PATH=%APPDATA%\npm;%PATH% 7 | - npm --version 8 | - cd src && npm install 9 | 10 | build: 11 | verbosity: minimal 12 | 13 | build_script: 14 | - nuget restore -verbosity quiet 15 | - test\aspnet_compiler -p src -v -u output 16 | - cd src && node_modules\.bin\gulp 17 | 18 | test_script: 19 | - ps: .\test\test.ps1 20 | -------------------------------------------------------------------------------- /lib/Microsoft.Html.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/vsext-docs/f928283bfb7a0a467e5941d186246beed901f364/lib/Microsoft.Html.Core.dll -------------------------------------------------------------------------------- /lib/Microsoft.Web.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/vsext-docs/f928283bfb7a0a467e5941d186246beed901f364/lib/Microsoft.Web.Core.dll -------------------------------------------------------------------------------- /src/404.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Configuration; 2 | @{ 3 | string status = Request.QueryString["status"] ?? "404"; 4 | Response.StatusCode = int.Parse(status); 5 | 6 | string title = "Page not found"; 7 | string desc = "It looks like I can't find this page"; 8 | 9 | if (Response.StatusCode != 404) 10 | { 11 | title = "Something went wrong"; 12 | desc = "We've recorded the error and a fix is coming."; 13 | } 14 | 15 | Page.Title = title; 16 | Page.Description = title; 17 | Page.ShowHero = true; 18 | @WriteContent(title, desc); 19 | 20 | Page.Theme = ConfigurationManager.AppSettings["theme"]; 21 | 22 | Layout = "~/themes/" + Page.Theme + "/_layout.cshtml"; 23 | } 24 | 25 | @helper WriteContent(string title, string content) { 26 |
@content
30 |@page.Description
67 |No results found for '@q'
73 | } 74 |@ConfigurationManager.AppSettings["description"]
69 |@Model.Description
6 | } 7 |