├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── Framework.Templates.sln ├── Framework.VSIX ├── AddItemForm.Designer.cs ├── AddItemForm.cs ├── AddItemForm.resx ├── Framework.VSIX.csproj ├── Framework.VSIX.ico ├── FrameworkProjectWizard.cs ├── License.txt ├── NewProjectForm.Designer.cs ├── NewProjectForm.cs ├── NewProjectForm.resx ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Extension.ico │ ├── Global.Designer.cs │ ├── Global.en.resx │ └── Global.resx ├── SPFxProjectExtension.png ├── Utility.cs ├── WebPartItemWizard.cs ├── app.config ├── index.html ├── key.snk ├── packages.config ├── source.extension.vsixmanifest ├── stylesheet.css └── yeoman.png ├── Framework.WebPart.Item ├── Framework.WebPart.Item.csproj ├── Framework.WebPart.Item.ico ├── Framework.WebPart.Item.vstemplate ├── Properties │ └── AssemblyInfo.cs └── WebPart.log ├── Framework.WebPart ├── AssemblyInfo.cs ├── Framework.WebPart.csproj ├── Framework.WebPart.ico ├── Framework.WebPart.vstemplate ├── Properties │ └── AssemblyInfo.cs ├── WebPart.csproj └── generator.log ├── LICENSE ├── README.md └── appveyor.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidance 2 | If you'd like to contribute to this repository, please read the following guidelines. Contributors are more than welcome to share your learnings with others from centralized location. 3 | 4 | ## Code of Conduct 5 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 6 | For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 7 | or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 8 | 9 | ## Question or Problem? 10 | Please do not open GitHub issues for general support questions as the GitHub list should be used for feature requests and bug reports. This way we can more easily track actual issues or bugs from the code and keep the general discussion separate from the actual code. 11 | 12 | If you have questions about how to use SharePoint Framework or any of the provided samples, please use the following locations. 13 | 14 | * [SharePoint Developer Space](http://aka.ms/SPPnP-Community) at http://techcommunity.microsoft.com 15 | * [SharePoint Stack Exchange](http://sharepoint.stackexchange.com/) with 'spfx' tag 16 | 17 | ## Typos, Issues, Bugs and contributions 18 | Whenever you are submitting any changes to the SharePoint repositories, please follow these recommendations. 19 | 20 | * Always fork repository to your own account for applying modifications 21 | * Do not combine multiple changes to one pull request, please submit for example any samples and documentation updates using seperate PRs 22 | * If you are submitting multiple samples, please create specific PR for each of them 23 | * If you are submitting typo or documentation fix, you can combine modifications to single PR where suitable 24 | 25 | ## Submitting changes as pull requests 26 | Here's a high level process for submitting new samples or updates to existing ones. 27 | 28 | 1. Sign the Contributor License Agreement (see below) 29 | 2. Fork the main repository to your GitHub account 30 | 3. Create a new branch for your fork for the contribution based on dev branch 31 | 4. Include your changes to your branch 32 | 5. Commit your changes using descriptive commit message 33 | 6. Create a pull request in your own fork and target 'master' branch 34 | 7. Fill up the provided PR template with the requested details 35 | 36 | > note. Delete the feature specific branch only AFTER your pull request has been processed. 37 | 38 | ## Signing the CLA 39 | Before we can accept your pull requests you will be asked to sign electronically Contributor License Agreement (CLA), which is prerequisite for any contributions to PnP repository. This will be one time process, so for any future contributions you will not be asked to re-sign anything. After the CLA has been signed, our PnP core team members will have a look on your submission for final verification of the submission. Please do not delete your development branch until the submission has been closed. 40 | 41 | You can find Microsoft CLA from the following address - https://cla.microsoft.com. 42 | 43 | Thank you for your contribution. 44 | 45 | > Sharing is caring. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you. 2 | 3 | #### Category 4 | [ ] Question 5 | [ ] Bug 6 | [ ] Enhancement 7 | 8 | #### Versions 9 | [ ] Visual Studio version (Help > About) 10 | [ ] SPFx Generator version (`npm list -g @microsoft/generator-sharepoint`) 11 | 12 | #### Expected or Desired Behavior 13 | _If you are reporting a bug, please describe the expected behavior. If you are suggesting an enhancement please describe thoroughly the enhancement, how it can be achieved, and expected benefit._ 14 | 15 | #### Observed Behavior 16 | _If you are reporting a bug, please describe the behavior you expected to occur when performing the action. If you are making a suggestion, you can delete this section._ 17 | 18 | #### Steps to Reproduce 19 | _If you are reporting a bug please describe the steps to reproduce the bug in sufficient detail to allow testing. Only way to fix things properly, is to have sufficient details to reproduce it. If you are making a suggestion, you can delete this section._ 20 | 21 | #### Submission Guidelines 22 | _Delete this section after reading_ 23 | - All suggestions or bugs are welcome, please let us know what's on your mind. 24 | - If you are reporting an issue around any of the samples, please ensure that you have clear reference on the sample and possibly code file, which should be fixed. 25 | - If you have technical questions about the framework, we’ll be monitoring #spfx, #spfx-webparts, and #spfx-tooling on (SharePoint StackExchange)[http://sharepoint.stackexchange.com/]. You can also alternatively submit your question to (SharePoint Developer group)[https://network.office.com/t5/SharePoint-Developer/bd-p/SharePointDev] at Microsoft Technical Network. 26 | - Remember to include sufficient details and context. 27 | - If you have multiple suggestions or bugs please submit them in separate bugs so we can track resolution. 28 | 29 | Thanks for your contribution! Sharing is caring. 30 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | | Q | A 2 | | --------------- | --- 3 | | Bug fix? | no - yes? 4 | | New feature? | no - yes? 5 | | New sample? | no - yes? 6 | | Related issues? | fixes #X, partially #Y, mentioned in #Z 7 | 8 | #### What's in this Pull Request? 9 | 10 | Please describe the changes in this PR. Sample description or details around bugs which are being fixed. 11 | 12 | 13 | #### Guidance 14 | *You can delete this section when you are submitting the pull request.* 15 | * *Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.* 16 | * *Please target your PR to 'Dev' branch, we merge 'dev' frequently to master as needed.* 17 | 18 | Thanks for your contribution! Sharing is caring. -------------------------------------------------------------------------------- /.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 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | 11 | # User-specific files (MonoDevelop/Xamarin Studio) 12 | *.userprefs 13 | 14 | # Build results 15 | [Dd]ebug/ 16 | [Dd]ebugPublic/ 17 | [Rr]elease/ 18 | [Rr]eleases/ 19 | x64/ 20 | x86/ 21 | build/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | 26 | # Visual Studio 2015 cache/options directory 27 | .vs/ 28 | 29 | # NUNIT 30 | *.VisualState.xml 31 | TestResult.xml 32 | 33 | # Build Results of an ATL Project 34 | [Dd]ebugPS/ 35 | [Rr]eleasePS/ 36 | dlldata.c 37 | 38 | # DNX 39 | project.lock.json 40 | artifacts/ 41 | 42 | *_i.c 43 | *_p.c 44 | *_i.h 45 | *.ilk 46 | *.meta 47 | *.obj 48 | *.pch 49 | *.pdb 50 | *.pgc 51 | *.pgd 52 | *.rsp 53 | *.sbr 54 | *.tlb 55 | *.tli 56 | *.tlh 57 | *.tmp 58 | *.tmp_proj 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding add-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | ## TODO: Comment the next line if you want to checkin your 133 | ## web deploy settings but do note that will include unencrypted 134 | ## passwords 135 | #*.pubxml 136 | 137 | *.publishproj 138 | 139 | # NuGet Packages 140 | *.nupkg 141 | # The packages folder can be ignored because of Package Restore 142 | **/packages/* 143 | # except build/, which is used as an MSBuild target. 144 | !**/packages/build/ 145 | # Uncomment if necessary however generally it will be regenerated when needed 146 | #!**/packages/repositories.config 147 | 148 | # Windows Azure Build Output 149 | csx/ 150 | *.build.csdef 151 | 152 | # Windows Store app package directory 153 | AppPackages/ 154 | 155 | # Visual Studio cache files 156 | # files ending in .cache can be ignored 157 | *.[Cc]ache 158 | # but keep track of directories ending in .cache 159 | !*.[Cc]ache/ 160 | 161 | # Others 162 | ClientBin/ 163 | [Ss]tyle[Cc]op.* 164 | ~$* 165 | *~ 166 | *.dbmdl 167 | *.dbproj.schemaview 168 | *.pfx 169 | *.publishsettings 170 | node_modules/ 171 | orleans.codegen.cs 172 | 173 | # RIA/Silverlight projects 174 | Generated_Code/ 175 | 176 | # Backup & report files from converting an old project file 177 | # to a newer Visual Studio version. Backup files are not needed, 178 | # because we have git ;-) 179 | _UpgradeReport_Files/ 180 | Backup*/ 181 | UpgradeLog*.XML 182 | UpgradeLog*.htm 183 | 184 | # SQL Server files 185 | *.mdf 186 | *.ldf 187 | 188 | # Business Intelligence projects 189 | *.rdl.data 190 | *.bim.layout 191 | *.bim_*.settings 192 | 193 | # Microsoft Fakes 194 | FakesAssemblies/ 195 | 196 | # Node.js Tools for Visual Studio 197 | .ntvs_analysis.dat 198 | 199 | # Visual Studio 6 build log 200 | *.plg 201 | 202 | # Visual Studio 6 workspace options file 203 | *.opt 204 | 205 | # LightSwitch generated files 206 | GeneratedArtifacts/ 207 | _Pvt_Extensions/ 208 | ModelManifest.xml 209 | /AzureResourceGroup 210 | /API/Properties/PublishProfiles -------------------------------------------------------------------------------- /Framework.Templates.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26228.16 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.VSIX", "Framework.VSIX\Framework.VSIX.csproj", "{6D837AA6-C615-439A-B129-9F6B09D13A6B}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.WebPart", "Framework.WebPart\Framework.WebPart.csproj", "{7C698161-B9FA-411A-9240-4AC26E91325C}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.WebPart.Item", "Framework.WebPart.Item\Framework.WebPart.Item.csproj", "{5A1EA45F-0433-4596-A21C-26CEBBE333F4}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {6D837AA6-C615-439A-B129-9F6B09D13A6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {6D837AA6-C615-439A-B129-9F6B09D13A6B}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {6D837AA6-C615-439A-B129-9F6B09D13A6B}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {6D837AA6-C615-439A-B129-9F6B09D13A6B}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {7C698161-B9FA-411A-9240-4AC26E91325C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {7C698161-B9FA-411A-9240-4AC26E91325C}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {7C698161-B9FA-411A-9240-4AC26E91325C}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {7C698161-B9FA-411A-9240-4AC26E91325C}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {5A1EA45F-0433-4596-A21C-26CEBBE333F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {5A1EA45F-0433-4596-A21C-26CEBBE333F4}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {5A1EA45F-0433-4596-A21C-26CEBBE333F4}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {5A1EA45F-0433-4596-A21C-26CEBBE333F4}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /Framework.VSIX/AddItemForm.Designer.cs: -------------------------------------------------------------------------------- 1 | using Framework.VSIX.Resources; 2 | 3 | namespace Framework.VSIX 4 | { 5 | partial class AddItemForm 6 | { 7 | /// 8 | /// Required designer variable. 9 | /// 10 | private System.ComponentModel.IContainer components = null; 11 | 12 | /// 13 | /// Clean up any resources being used. 14 | /// 15 | /// true if managed resources should be disposed; otherwise, false. 16 | protected override void Dispose(bool disposing) 17 | { 18 | if (disposing && (components != null)) 19 | { 20 | components.Dispose(); 21 | } 22 | base.Dispose(disposing); 23 | } 24 | 25 | #region Windows Form Designer generated code 26 | 27 | /// 28 | /// Required method for Designer support - do not modify 29 | /// the contents of this method with the code editor. 30 | /// 31 | private void InitializeComponent() 32 | { 33 | this.tabControl1 = new System.Windows.Forms.TabControl(); 34 | this.tabProps = new System.Windows.Forms.TabPage(); 35 | this.cboExtensionType = new System.Windows.Forms.ComboBox(); 36 | this.lblExtensionType = new System.Windows.Forms.Label(); 37 | this.cboComponentType = new System.Windows.Forms.ComboBox(); 38 | this.lblComponentType = new System.Windows.Forms.Label(); 39 | this.txtComponentDescription = new System.Windows.Forms.TextBox(); 40 | this.lblComponentDescription = new System.Windows.Forms.Label(); 41 | this.txtComponentName = new System.Windows.Forms.TextBox(); 42 | this.lblComponentName = new System.Windows.Forms.Label(); 43 | this.cboFramework = new System.Windows.Forms.ComboBox(); 44 | this.lblFramework = new System.Windows.Forms.Label(); 45 | this.tabAdv = new System.Windows.Forms.TabPage(); 46 | this.cbxShowWindow = new System.Windows.Forms.CheckBox(); 47 | this.lblCommandDescription = new System.Windows.Forms.Label(); 48 | this.lblCommandString = new System.Windows.Forms.Label(); 49 | this.txtCommandString = new System.Windows.Forms.TextBox(); 50 | this.btnGenerate = new System.Windows.Forms.Button(); 51 | this.btnCancel = new System.Windows.Forms.Button(); 52 | this.lblFooter = new System.Windows.Forms.Label(); 53 | this.tabControl1.SuspendLayout(); 54 | this.tabProps.SuspendLayout(); 55 | this.tabAdv.SuspendLayout(); 56 | this.SuspendLayout(); 57 | // 58 | // tabControl1 59 | // 60 | this.tabControl1.Controls.Add(this.tabProps); 61 | this.tabControl1.Controls.Add(this.tabAdv); 62 | this.tabControl1.Location = new System.Drawing.Point(-2, 0); 63 | this.tabControl1.Margin = new System.Windows.Forms.Padding(0); 64 | this.tabControl1.Name = "tabControl1"; 65 | this.tabControl1.SelectedIndex = 0; 66 | this.tabControl1.Size = new System.Drawing.Size(585, 275); 67 | this.tabControl1.TabIndex = 0; 68 | // 69 | // tabProps 70 | // 71 | this.tabProps.Controls.Add(this.cboExtensionType); 72 | this.tabProps.Controls.Add(this.lblExtensionType); 73 | this.tabProps.Controls.Add(this.cboComponentType); 74 | this.tabProps.Controls.Add(this.lblComponentType); 75 | this.tabProps.Controls.Add(this.txtComponentDescription); 76 | this.tabProps.Controls.Add(this.lblComponentDescription); 77 | this.tabProps.Controls.Add(this.txtComponentName); 78 | this.tabProps.Controls.Add(this.lblComponentName); 79 | this.tabProps.Controls.Add(this.cboFramework); 80 | this.tabProps.Controls.Add(this.lblFramework); 81 | this.tabProps.Location = new System.Drawing.Point(4, 22); 82 | this.tabProps.Margin = new System.Windows.Forms.Padding(4, 13, 4, 13); 83 | this.tabProps.Name = "tabProps"; 84 | this.tabProps.Padding = new System.Windows.Forms.Padding(4, 13, 4, 13); 85 | this.tabProps.Size = new System.Drawing.Size(577, 249); 86 | this.tabProps.TabIndex = 0; 87 | this.tabProps.Text = global::Framework.VSIX.Resources.Global.Form_PropertyTab_Title; 88 | this.tabProps.UseVisualStyleBackColor = true; 89 | // 90 | // cboExtensionType 91 | // 92 | this.cboExtensionType.FormattingEnabled = true; 93 | this.cboExtensionType.Location = new System.Drawing.Point(260, 40); 94 | this.cboExtensionType.Name = "cboExtensionType"; 95 | this.cboExtensionType.Size = new System.Drawing.Size(150, 21); 96 | this.cboExtensionType.TabIndex = 12; 97 | // 98 | // lblExtensionType 99 | // 100 | this.lblExtensionType.AutoSize = true; 101 | this.lblExtensionType.Location = new System.Drawing.Point(260, 20); 102 | this.lblExtensionType.Name = "lblExtensionType"; 103 | this.lblExtensionType.Size = new System.Drawing.Size(83, 13); 104 | this.lblExtensionType.TabIndex = 11; 105 | this.lblExtensionType.Text = "Extension Type:"; 106 | this.lblExtensionType.Visible = false; 107 | // 108 | // cboComponentType 109 | // 110 | this.cboComponentType.FormattingEnabled = true; 111 | this.cboComponentType.Location = new System.Drawing.Point(10, 40); 112 | this.cboComponentType.Name = "cboComponentType"; 113 | this.cboComponentType.Size = new System.Drawing.Size(150, 21); 114 | this.cboComponentType.TabIndex = 10; 115 | // 116 | // lblComponentType 117 | // 118 | this.lblComponentType.AutoSize = true; 119 | this.lblComponentType.Location = new System.Drawing.Point(10, 20); 120 | this.lblComponentType.Name = "lblComponentType"; 121 | this.lblComponentType.Size = new System.Drawing.Size(85, 13); 122 | this.lblComponentType.TabIndex = 9; 123 | this.lblComponentType.Text = "ComponentType"; 124 | // 125 | // txtComponentDescription 126 | // 127 | this.txtComponentDescription.Location = new System.Drawing.Point(10, 140); 128 | this.txtComponentDescription.Name = "txtComponentDescription"; 129 | this.txtComponentDescription.Size = new System.Drawing.Size(400, 20); 130 | this.txtComponentDescription.TabIndex = 7; 131 | // 132 | // lblComponentDescription 133 | // 134 | this.lblComponentDescription.AutoSize = true; 135 | this.lblComponentDescription.Location = new System.Drawing.Point(10, 120); 136 | this.lblComponentDescription.Name = "lblComponentDescription"; 137 | this.lblComponentDescription.Size = new System.Drawing.Size(117, 13); 138 | this.lblComponentDescription.TabIndex = 6; 139 | this.lblComponentDescription.Text = "Component Description"; 140 | // 141 | // txtComponentName 142 | // 143 | this.txtComponentName.Location = new System.Drawing.Point(10, 90); 144 | this.txtComponentName.Name = "txtComponentName"; 145 | this.txtComponentName.Size = new System.Drawing.Size(400, 20); 146 | this.txtComponentName.TabIndex = 5; 147 | // 148 | // lblComponentName 149 | // 150 | this.lblComponentName.AutoSize = true; 151 | this.lblComponentName.Location = new System.Drawing.Point(10, 70); 152 | this.lblComponentName.Name = "lblComponentName"; 153 | this.lblComponentName.Size = new System.Drawing.Size(95, 13); 154 | this.lblComponentName.TabIndex = 4; 155 | this.lblComponentName.Text = "Component Name:"; 156 | // 157 | // cboFramework 158 | // 159 | this.cboFramework.DisplayMember = "Value"; 160 | this.cboFramework.FormattingEnabled = true; 161 | this.cboFramework.Location = new System.Drawing.Point(10, 190); 162 | this.cboFramework.Name = "cboFramework"; 163 | this.cboFramework.Size = new System.Drawing.Size(150, 21); 164 | this.cboFramework.TabIndex = 3; 165 | this.cboFramework.ValueMember = "Key"; 166 | // 167 | // lblFramework 168 | // 169 | this.lblFramework.AutoSize = true; 170 | this.lblFramework.Location = new System.Drawing.Point(10, 170); 171 | this.lblFramework.Name = "lblFramework"; 172 | this.lblFramework.Size = new System.Drawing.Size(62, 13); 173 | this.lblFramework.TabIndex = 2; 174 | this.lblFramework.Text = "Framework:"; 175 | // 176 | // tabAdv 177 | // 178 | this.tabAdv.Controls.Add(this.cbxShowWindow); 179 | this.tabAdv.Controls.Add(this.lblCommandDescription); 180 | this.tabAdv.Controls.Add(this.lblCommandString); 181 | this.tabAdv.Controls.Add(this.txtCommandString); 182 | this.tabAdv.Location = new System.Drawing.Point(4, 22); 183 | this.tabAdv.Margin = new System.Windows.Forms.Padding(4, 13, 4, 13); 184 | this.tabAdv.Name = "tabAdv"; 185 | this.tabAdv.Padding = new System.Windows.Forms.Padding(4, 13, 4, 13); 186 | this.tabAdv.Size = new System.Drawing.Size(577, 249); 187 | this.tabAdv.TabIndex = 1; 188 | this.tabAdv.Text = "Advanced"; 189 | this.tabAdv.UseVisualStyleBackColor = true; 190 | // 191 | // cbxShowWindow 192 | // 193 | this.cbxShowWindow.AutoSize = true; 194 | this.cbxShowWindow.Location = new System.Drawing.Point(10, 220); 195 | this.cbxShowWindow.Name = "cbxShowWindow"; 196 | this.cbxShowWindow.Size = new System.Drawing.Size(145, 17); 197 | this.cbxShowWindow.TabIndex = 3; 198 | this.cbxShowWindow.Text = "Show Command Window"; 199 | this.cbxShowWindow.UseVisualStyleBackColor = true; 200 | // 201 | // lblCommandDescription 202 | // 203 | this.lblCommandDescription.AutoSize = true; 204 | this.lblCommandDescription.Location = new System.Drawing.Point(10, 195); 205 | this.lblCommandDescription.Name = "lblCommandDescription"; 206 | this.lblCommandDescription.Size = new System.Drawing.Size(325, 13); 207 | this.lblCommandDescription.TabIndex = 2; 208 | this.lblCommandDescription.Text = "Add switches and parameters to the Yeoman Generator commands."; 209 | // 210 | // lblCommandString 211 | // 212 | this.lblCommandString.AutoSize = true; 213 | this.lblCommandString.Location = new System.Drawing.Point(10, 20); 214 | this.lblCommandString.Name = "lblCommandString"; 215 | this.lblCommandString.Size = new System.Drawing.Size(87, 13); 216 | this.lblCommandString.TabIndex = 1; 217 | this.lblCommandString.Text = "Command String:"; 218 | // 219 | // txtCommandString 220 | // 221 | this.txtCommandString.Location = new System.Drawing.Point(10, 40); 222 | this.txtCommandString.Multiline = true; 223 | this.txtCommandString.Name = "txtCommandString"; 224 | this.txtCommandString.Size = new System.Drawing.Size(560, 150); 225 | this.txtCommandString.TabIndex = 0; 226 | // 227 | // btnGenerate 228 | // 229 | this.btnGenerate.Location = new System.Drawing.Point(10, 285); 230 | this.btnGenerate.Name = "btnGenerate"; 231 | this.btnGenerate.Size = new System.Drawing.Size(75, 23); 232 | this.btnGenerate.TabIndex = 1; 233 | this.btnGenerate.Text = "Generate"; 234 | this.btnGenerate.UseVisualStyleBackColor = true; 235 | this.btnGenerate.Click += new System.EventHandler(this.Generate_Click); 236 | // 237 | // btnCancel 238 | // 239 | this.btnCancel.Location = new System.Drawing.Point(475, 285); 240 | this.btnCancel.Name = "btnCancel"; 241 | this.btnCancel.Size = new System.Drawing.Size(75, 23); 242 | this.btnCancel.TabIndex = 2; 243 | this.btnCancel.Text = "Cancel"; 244 | this.btnCancel.UseVisualStyleBackColor = true; 245 | this.btnCancel.Click += new System.EventHandler(this.Cancel_Click); 246 | // 247 | // lblFooter 248 | // 249 | this.lblFooter.AutoSize = true; 250 | this.lblFooter.Location = new System.Drawing.Point(10, 315); 251 | this.lblFooter.Name = "lblFooter"; 252 | this.lblFooter.Size = new System.Drawing.Size(47, 13); 253 | this.lblFooter.TabIndex = 3; 254 | this.lblFooter.Text = "lblFooter"; 255 | // 256 | // AddItemForm 257 | // 258 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 259 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 260 | this.ClientSize = new System.Drawing.Size(584, 336); 261 | this.Controls.Add(this.lblFooter); 262 | this.Controls.Add(this.btnCancel); 263 | this.Controls.Add(this.btnGenerate); 264 | this.Controls.Add(this.tabControl1); 265 | this.Icon = global::Framework.VSIX.Resources.Global.Extension; 266 | this.Margin = new System.Windows.Forms.Padding(4, 13, 4, 13); 267 | this.Name = "AddItemForm"; 268 | this.Text = "SharePoint Framework Project Configuration"; 269 | this.tabControl1.ResumeLayout(false); 270 | this.tabProps.ResumeLayout(false); 271 | this.tabProps.PerformLayout(); 272 | this.tabAdv.ResumeLayout(false); 273 | this.tabAdv.PerformLayout(); 274 | this.ResumeLayout(false); 275 | this.PerformLayout(); 276 | 277 | } 278 | 279 | #endregion 280 | 281 | private System.Windows.Forms.TabControl tabControl1; 282 | private System.Windows.Forms.TabPage tabProps; 283 | private System.Windows.Forms.TabPage tabAdv; 284 | private System.Windows.Forms.ComboBox cboFramework; 285 | private System.Windows.Forms.Label lblFramework; 286 | private System.Windows.Forms.TextBox txtComponentName; 287 | private System.Windows.Forms.Label lblComponentName; 288 | private System.Windows.Forms.TextBox txtComponentDescription; 289 | private System.Windows.Forms.Label lblComponentDescription; 290 | private System.Windows.Forms.TextBox txtCommandString; 291 | private System.Windows.Forms.ComboBox cboComponentType; 292 | private System.Windows.Forms.Label lblComponentType; 293 | private System.Windows.Forms.ComboBox cboExtensionType; 294 | private System.Windows.Forms.Label lblExtensionType; 295 | private System.Windows.Forms.Label lblCommandString; 296 | private System.Windows.Forms.Button btnGenerate; 297 | private System.Windows.Forms.Button btnCancel; 298 | private System.Windows.Forms.Label lblFooter; 299 | private System.Windows.Forms.Label lblCommandDescription; 300 | private System.Windows.Forms.CheckBox cbxShowWindow; 301 | } 302 | } -------------------------------------------------------------------------------- /Framework.VSIX/AddItemForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Windows.Forms; 5 | using Microsoft.VisualStudio.Shell; 6 | using Microsoft.VisualStudio.Shell.Interop; 7 | using Framework.VSIX.Resources; 8 | 9 | namespace Framework.VSIX 10 | { 11 | public partial class AddItemForm : Form 12 | { 13 | private bool formCancel = false; 14 | private bool commandValid = false; 15 | private string commandString = String.Empty; 16 | 17 | public AddItemForm() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | public void Initialize() 23 | { 24 | if (Package.GetGlobalService(typeof(IUIHostLocale)) is IUIHostLocale hostLocale) 25 | { 26 | var dlgFont = new UIDLGLOGFONT[] { new UIDLGLOGFONT() }; 27 | hostLocale.GetDialogFont(dlgFont); 28 | this.Font = Font.FromLogFont(dlgFont[0]); 29 | } 30 | 31 | // Form settings 32 | this.Name = Global.Form_Item_Name; 33 | this.Text = Global.Form_Item_Title; 34 | this.Icon = Global.Extension; 35 | 36 | // Tab settings 37 | this.tabProps.Text = Global.Form_PropertyTab_Title; 38 | this.tabAdv.Text = Global.Form_AdvancedTab_Title; 39 | 40 | // Framework 41 | lblFramework.Text = Global.Form_Framework; 42 | Dictionary cboFrameworkSource = new Dictionary 43 | { 44 | { "none", "none" }, 45 | { "react", "react" } 46 | }; 47 | cboFramework.DataSource = new BindingSource(cboFrameworkSource, null); 48 | cboFramework.DisplayMember = "Value"; 49 | cboFramework.ValueMember = "Key"; 50 | cboFramework.SelectedIndexChanged += Framework_SelectedIndexChanged; 51 | 52 | // Component Name 53 | lblComponentName.Text = Global.Form_ComponentName; 54 | txtComponentName.TextChanged += ComponentName_TextChanged; 55 | 56 | // Component Description 57 | lblComponentDescription.Text = Global.Form_ComponentDescription; 58 | txtComponentDescription.TextChanged += ComponentDescription_TextChanged; 59 | 60 | // Component Type 61 | lblComponentType.Text = Global.Form_ComponentType; 62 | Dictionary cboComponentTypeSource = new Dictionary 63 | { 64 | { "webpart", "webpart" }, 65 | { "extension", "extension" } 66 | }; 67 | cboComponentType.DataSource = new BindingSource(cboComponentTypeSource, null); 68 | cboComponentType.DisplayMember = "Value"; 69 | cboComponentType.ValueMember = "Key"; 70 | cboComponentType.SelectedIndexChanged += ComponentType_SelectedIndexChanged; 71 | 72 | // Extension type 73 | lblExtensionType.Visible = false; 74 | lblExtensionType.Text = Global.Form_ExtensionType; 75 | cboExtensionType.Visible = false; 76 | Dictionary cboExtensionTypeSource = new Dictionary 77 | { 78 | { "ApplicationCustomizer", "Application Customizer" }, 79 | { "FieldCustomizer", "Field Customizer" }, 80 | { "ListViewCommandSet", "List View CommandSet" } 81 | }; 82 | cboExtensionType.DataSource = new BindingSource(cboExtensionTypeSource, null); 83 | cboExtensionType.DisplayMember = "Value"; 84 | cboExtensionType.ValueMember = "Key"; 85 | cboExtensionType.SelectedIndexChanged += ExtensionType_SelectedIndexChanged; 86 | 87 | // Command string 88 | lblCommandString.Text = Global.Form_CommandString; 89 | lblCommandDescription.Text = Global.Form_AdvancedTab_CommandDescription; 90 | 91 | // Show window 92 | cbxShowWindow.Text = Global.Form_ShowCommandWindow; 93 | 94 | // buttons 95 | btnGenerate.Text = Global.Form_ButtonGenerate; 96 | btnGenerate.Enabled = commandValid; 97 | btnCancel.Text = Global.Form_ButtonCancel; 98 | 99 | // Footer 100 | lblFooter.Text = Global.Form_Footer_GeneratorText; 101 | 102 | // Set control visibility based on version 103 | //if (GeneratorVersion < Utility.gv1_1) 104 | //{ 105 | // lblExtensionType.Visible = false; 106 | // cboExtensionType.Visible = false; 107 | //} 108 | } 109 | 110 | #region Control Event Handlers 111 | 112 | private void ExtensionType_SelectedIndexChanged(object sender, EventArgs e) 113 | { 114 | lblFramework.Visible = (ExtensionType == "FieldCustomizer"); 115 | cboFramework.Visible = (ExtensionType == "FieldCustomizer"); 116 | 117 | SetCommandText(); 118 | SetSubmitState(); 119 | } 120 | 121 | private void ComponentType_SelectedIndexChanged(object sender, EventArgs e) 122 | { 123 | lblExtensionType.Visible = (ComponentType == "extension"); 124 | cboExtensionType.Visible = (ComponentType == "extension"); 125 | 126 | SetCommandText(); 127 | SetSubmitState(); 128 | } 129 | 130 | private void ComponentDescription_TextChanged(object sender, EventArgs e) 131 | { 132 | SetCommandText(); 133 | SetSubmitState(); 134 | } 135 | 136 | private void ComponentName_TextChanged(object sender, EventArgs e) 137 | { 138 | SetCommandText(); 139 | SetSubmitState(); 140 | } 141 | 142 | private void Framework_SelectedIndexChanged(object sender, EventArgs e) 143 | { 144 | SetCommandText(); 145 | SetSubmitState(); 146 | } 147 | 148 | private void SetCommandText() 149 | { 150 | commandValid = Utility.SetItemCommand(Framework, ComponentName, ComponentDescription, 151 | ComponentType, ExtensionType, out commandString); 152 | 153 | txtCommandString.Text = commandString; 154 | } 155 | 156 | protected void SetSubmitState() 157 | { 158 | btnGenerate.Enabled = commandValid; 159 | } 160 | 161 | private void Generate_Click(object sender, EventArgs e) 162 | { 163 | this.Close(); 164 | } 165 | 166 | private void Cancel_Click(object sender, EventArgs e) 167 | { 168 | formCancel = true; 169 | this.Close(); 170 | } 171 | 172 | #endregion 173 | 174 | 175 | #region Properties 176 | 177 | public Version GeneratorVersion { get; set; } 178 | 179 | public string Framework 180 | { 181 | get { return ((KeyValuePair)cboFramework.SelectedItem).Key; } 182 | private set { } 183 | } 184 | public string ComponentName 185 | { 186 | get { return txtComponentName.Text; } 187 | private set { } 188 | } 189 | public string ComponentDescription 190 | { 191 | get { return txtComponentDescription.Text; } 192 | private set { } 193 | } 194 | public string ComponentType 195 | { 196 | get { return ((KeyValuePair)cboComponentType.SelectedItem).Key; } 197 | private set { } 198 | } 199 | public string ExtensionType 200 | { 201 | get { return (ComponentType == "extension") ? ((KeyValuePair)cboExtensionType.SelectedItem).Key : String.Empty; } 202 | private set { } 203 | } 204 | public bool ShowWindow 205 | { 206 | get { return cbxShowWindow.Checked; } 207 | private set { } 208 | } 209 | public string CommandString 210 | { 211 | get { return commandString; } 212 | private set { } 213 | } 214 | public bool FormCancel 215 | { 216 | get { return formCancel; } 217 | private set { } 218 | } 219 | 220 | #endregion 221 | 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /Framework.VSIX/AddItemForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Framework.VSIX/Framework.VSIX.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 15.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | true 9 | 10 | 11 | key.snk 12 | 13 | 14 | 15 | Debug 16 | AnyCPU 17 | 2.0 18 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | {6D837AA6-C615-439A-B129-9F6B09D13A6B} 20 | Library 21 | Properties 22 | Framework.VSIX 23 | Framework.VSIX 24 | v4.6 25 | false 26 | true 27 | true 28 | true 29 | true 30 | false 31 | 32 | 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | 41 | 42 | pdbonly 43 | true 44 | bin\Release\ 45 | TRACE 46 | prompt 47 | 4 48 | 49 | 50 | 51 | Form 52 | 53 | 54 | AddItemForm.cs 55 | 56 | 57 | Form 58 | 59 | 60 | NewProjectForm.cs 61 | 62 | 63 | 64 | True 65 | True 66 | Resources.resx 67 | 68 | 69 | True 70 | True 71 | Global.resx 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Designer 80 | 81 | 82 | 83 | 84 | Designer 85 | 86 | 87 | 88 | 89 | Always 90 | true 91 | 92 | 93 | 94 | Always 95 | true 96 | 97 | 98 | Always 99 | true 100 | 101 | 102 | Always 103 | true 104 | 105 | 106 | 107 | 108 | 109 | 110 | ..\packages\ConsoleControl.1.1.0.0\lib\net40\ConsoleControl.dll 111 | 112 | 113 | ..\packages\ConsoleControl.1.1.0.0\lib\net40\ConsoleControlAPI.dll 114 | 115 | 116 | True 117 | 118 | 119 | ..\packages\Microsoft.ApplicationInsights.2.6.4\lib\net46\Microsoft.ApplicationInsights.dll 120 | 121 | 122 | 123 | ..\packages\Microsoft.VisualStudio.Imaging.14.3.25407\lib\net45\Microsoft.VisualStudio.Imaging.dll 124 | 125 | 126 | ..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll 127 | True 128 | 129 | 130 | ..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll 131 | 132 | 133 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll 134 | True 135 | 136 | 137 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll 138 | True 139 | 140 | 141 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll 142 | True 143 | 144 | 145 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll 146 | True 147 | 148 | 149 | ..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll 150 | True 151 | 152 | 153 | ..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll 154 | True 155 | 156 | 157 | ..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll 158 | True 159 | 160 | 161 | 162 | ..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll 163 | True 164 | 165 | 166 | ..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll 167 | True 168 | 169 | 170 | ..\packages\Microsoft.VisualStudio.Threading.14.1.111\lib\net45\Microsoft.VisualStudio.Threading.dll 171 | 172 | 173 | ..\packages\Microsoft.VisualStudio.Utilities.14.3.25407\lib\net45\Microsoft.VisualStudio.Utilities.dll 174 | 175 | 176 | ..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll 177 | 178 | 179 | 180 | 181 | 182 | 183 | ..\packages\System.Diagnostics.DiagnosticSource.4.4.0\lib\net46\System.Diagnostics.DiagnosticSource.dll 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | {5A1EA45F-0433-4596-A21C-26CEBBE333F4} 194 | Framework.WebPart.Item 195 | ItemTemplates 196 | false 197 | TemplateProjectOutputGroup%3b 198 | 199 | 200 | {7C698161-B9FA-411A-9240-4AC26E91325C} 201 | Framework.WebPart 202 | ProjectTemplates 203 | false 204 | TemplateProjectOutputGroup%3b 205 | 206 | 207 | 208 | 209 | AddItemForm.cs 210 | 211 | 212 | NewProjectForm.cs 213 | 214 | 215 | ResXFileCodeGenerator 216 | Resources.Designer.cs 217 | 218 | 219 | 220 | ResXFileCodeGenerator 221 | Global.Designer.cs 222 | 223 | 224 | 225 | 226 | 233 | -------------------------------------------------------------------------------- /Framework.VSIX/Framework.VSIX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.VSIX/Framework.VSIX.ico -------------------------------------------------------------------------------- /Framework.VSIX/FrameworkProjectWizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Collections.Generic; 4 | using Microsoft.VisualStudio.TemplateWizard; 5 | using System.Windows.Forms; 6 | using EnvDTE; 7 | using System.IO; 8 | using System.Text; 9 | using System.Resources; 10 | using Framework.VSIX.Resources; 11 | using System.Reflection; 12 | using System.Threading.Tasks; 13 | using Microsoft.ApplicationInsights; 14 | using Microsoft.ApplicationInsights.Extensibility; 15 | using Microsoft.ApplicationInsights.DataContracts; 16 | 17 | namespace Framework.VSIX 18 | { 19 | public class FrameworkProjectWizard : IWizard 20 | { 21 | private string solutionName; 22 | private bool showWindow; 23 | private bool skipInstall; 24 | private bool formCancel; 25 | 26 | private string framework; 27 | private string componentName; 28 | private string componentDescription; 29 | private string solutionDir; 30 | private string projectDir; 31 | private string logFile; 32 | private string commandString; 33 | private string environment; 34 | 35 | TelemetryClient telemetry = new TelemetryClient 36 | { 37 | InstrumentationKey = Utility.AppInsightsKey 38 | }; 39 | Dictionary telProps = new Dictionary(); 40 | Guid telOpCtx = Guid.NewGuid(); 41 | 42 | 43 | public void BeforeOpeningFile(ProjectItem projectItem) 44 | { 45 | } 46 | 47 | public void ProjectFinishedGenerating(Project project) 48 | { 49 | if (!formCancel) 50 | { 51 | StringBuilder outputText = new StringBuilder(); 52 | 53 | DirectoryInfo projectDirInfo = new DirectoryInfo(projectDir); 54 | var genDir = projectDirInfo.Parent.FullName; 55 | using (var proc = new System.Diagnostics.Process()) 56 | { 57 | proc.StartInfo.WorkingDirectory = genDir; 58 | proc.StartInfo.FileName = @"cmd.exe"; 59 | 60 | Task outTask = null; 61 | Task errTask = null; 62 | 63 | if (showWindow == false) 64 | { 65 | try 66 | { 67 | proc.StartInfo.Arguments = string.Format(@" /c {0}", commandString); 68 | proc.StartInfo.RedirectStandardInput = true; 69 | proc.StartInfo.RedirectStandardOutput = true; 70 | proc.StartInfo.RedirectStandardError = true; 71 | proc.StartInfo.CreateNoWindow = true; 72 | proc.StartInfo.UseShellExecute = false; 73 | proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; 74 | proc.Start(); 75 | 76 | proc.StandardInput.Flush(); 77 | proc.StandardInput.WriteLine("exit"); 78 | proc.StandardInput.Flush(); 79 | 80 | outTask = Task.Run(() => proc.StandardOutput.ReadToEndAsync()); 81 | errTask = Task.Run(() => proc.StandardError.ReadToEndAsync()); 82 | } 83 | catch (System.Exception ex) 84 | { 85 | //TODO: Log Error 86 | } 87 | } 88 | else 89 | { 90 | proc.StartInfo.Arguments = string.Format(@" /k {0}", commandString); 91 | proc.Start(); 92 | } 93 | 94 | proc.WaitForExit(); 95 | 96 | if (showWindow == false) 97 | { 98 | outputText.Append(outTask.Result); 99 | outputText.Append(errTask.Result); 100 | } 101 | 102 | using (StreamWriter sw = File.AppendText(logFile)) 103 | { 104 | sw.Write(outputText); 105 | } 106 | } 107 | 108 | try 109 | { 110 | telemetry.TrackEvent("project-wizard", telProps, null); 111 | // Allow some time for flushing before shutdown. 112 | telemetry.Flush(); 113 | System.Threading.Thread.Sleep(1000); 114 | } 115 | catch (System.Exception ex) 116 | { 117 | //TODO: Log error 118 | } 119 | 120 | string[] files = Directory.GetFiles(projectDir, "*.*", SearchOption.AllDirectories); 121 | 122 | foreach (string file in files) 123 | { 124 | if (!file.ToLower().Contains("node_modules") && 125 | !file.ToLower().Contains(@"\bin\") && 126 | !file.ToLower().Contains(@"\obj\") && 127 | !file.ToLower().Contains(@"\properties\")) 128 | { 129 | try 130 | { 131 | project.ProjectItems.AddFromFile(file); 132 | } 133 | catch { } 134 | } 135 | } 136 | } 137 | } 138 | 139 | public void ProjectItemFinishedGenerating(ProjectItem projectItem) 140 | { 141 | } 142 | 143 | public void RunFinished() 144 | { 145 | 146 | } 147 | 148 | public void RunStarted(object automationObject, 149 | Dictionary replacementsDictionary, 150 | WizardRunKind runKind, object[] customParams) 151 | { 152 | #if DEBUG 153 | TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true; 154 | #endif 155 | 156 | try 157 | { 158 | //telProps.Add("generator-version", Utility.InstalledGeneratorVersion.ToString()); 159 | //telemetry.Context.Operation.Id = telOpCtx.ToString(); 160 | 161 | //if (Utility.InstalledGeneratorVersion == new Version(0,0)) 162 | //{ 163 | // throw new Exception("Yeoman generator not found"); 164 | //} 165 | 166 | var projectForm = new NewProjectForm() 167 | { 168 | SolutionName = replacementsDictionary["$safeprojectname$"], 169 | //GeneratorVersion = Utility.InstalledGeneratorVersion 170 | }; 171 | projectForm.Initialize(); 172 | projectForm.ShowDialog(); 173 | 174 | formCancel = projectForm.FormCancel; 175 | 176 | if (!formCancel) 177 | { 178 | solutionName = projectForm.SolutionName; 179 | framework = projectForm.Framework; 180 | componentName = projectForm.ComponentName; 181 | componentDescription = projectForm.ComponentDescription; 182 | commandString = projectForm.CommandString; 183 | showWindow = projectForm.ShowWindow; 184 | skipInstall = projectForm.SkipInstall; 185 | environment = projectForm.Environment; 186 | 187 | telProps.Add("framework", framework); 188 | telProps.Add("skipInstall", skipInstall.ToString()); 189 | telProps.Add("environment", projectForm.Environment); 190 | telProps.Add("componentType", projectForm.ComponentType); 191 | telProps.Add("extensionType", projectForm.ExtensionType); 192 | 193 | try 194 | { 195 | replacementsDictionary.Remove("$SolutionName$"); 196 | replacementsDictionary.Remove("$Framework$"); 197 | replacementsDictionary.Remove("$ComponentName$"); 198 | replacementsDictionary.Remove("$ComponentDescription$"); 199 | replacementsDictionary.Remove("$CommandString$"); 200 | } 201 | catch { } 202 | 203 | replacementsDictionary.Add("$SolutionName$", solutionName); 204 | replacementsDictionary.Add("$Framework$", framework); 205 | replacementsDictionary.Add("$ComponentName$", componentName); 206 | replacementsDictionary.Add("$ComponentDescription$", componentDescription); 207 | replacementsDictionary.Add("$CommandString$", commandString); 208 | 209 | solutionDir = System.IO.Path.GetDirectoryName(replacementsDictionary["$destinationdirectory$"]); 210 | projectDir = String.Format(@"{0}\{1}", solutionDir, replacementsDictionary["$safeprojectname$"]); 211 | projectDir = String.Format(@"{0}\{1}", solutionDir, solutionName); 212 | 213 | logFile = String.Format(@"{0}\generator.log", projectDir); 214 | } 215 | } 216 | catch (Exception ex) 217 | { 218 | MessageBox.Show(ex.ToString()); 219 | } 220 | } 221 | 222 | public bool ShouldAddProjectItem(string filePath) 223 | { 224 | return true; 225 | } 226 | } 227 | } 228 | -------------------------------------------------------------------------------- /Framework.VSIX/License.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Microsoft SharePoint 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. 22 | 23 | For more information, refer to https://github.com/SharePoint/sp-dev-fx-vs-extension/blob/master/LICENSE -------------------------------------------------------------------------------- /Framework.VSIX/NewProjectForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Windows.Forms; 5 | using Microsoft.VisualStudio.Shell; 6 | using Microsoft.VisualStudio.Shell.Interop; 7 | using Framework.VSIX.Resources; 8 | 9 | namespace Framework.VSIX 10 | { 11 | public partial class NewProjectForm : Form 12 | { 13 | private bool formCancel = false; 14 | private bool commandValid = false; 15 | private string commandString = String.Empty; 16 | 17 | public NewProjectForm() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | public void Initialize() 23 | { 24 | if (Package.GetGlobalService(typeof(IUIHostLocale)) is IUIHostLocale hostLocale) 25 | { 26 | var dlgFont = new UIDLGLOGFONT[] { new UIDLGLOGFONT() }; 27 | hostLocale.GetDialogFont(dlgFont); 28 | this.Font = Font.FromLogFont(dlgFont[0]); 29 | } 30 | 31 | // Form settings 32 | this.Name = Global.Form_Project_Name; 33 | this.Text = Global.Form_Project_Title; 34 | this.Icon = Global.Extension; 35 | 36 | // Tab settings 37 | this.tabProps.Text = Global.Form_PropertyTab_Title; 38 | this.tabAdv.Text = Global.Form_AdvancedTab_Title; 39 | 40 | // Solution name 41 | lblSolutionName.Text = Global.Form_SolutionName; 42 | txtSolutionName.Enabled = false; 43 | txtSolutionName.TextChanged += SolutionName_TextChanged; 44 | 45 | // Framework 46 | lblFramework.Text = Global.Form_Framework; 47 | Dictionary cboFrameworkSource = new Dictionary 48 | { 49 | { "none", "none" }, 50 | { "react", "react" }, 51 | { "knockout", "knockout" } 52 | }; 53 | cboFramework.DataSource = new BindingSource(cboFrameworkSource, null); 54 | cboFramework.SelectedIndex = 0; 55 | cboFramework.DisplayMember = "Value"; 56 | cboFramework.ValueMember = "Key"; 57 | cboFramework.SelectedIndexChanged += Framework_SelectedIndexChanged; 58 | 59 | // Environment 60 | lblEnvironment.Text = Global.Form_Prompt_Environment_Label; 61 | Dictionary cboEnvironmentSource = new Dictionary 62 | { 63 | { "spo", Global.Form_Prompt_Environment_Option1 }, 64 | { "onprem", Global.Form_Prompt_Environment_Option2 }, 65 | { "onprem19", Global.Form_Prompt_Environment_Option3 } 66 | }; 67 | cboEnvironment.DataSource = new BindingSource(cboEnvironmentSource, null); 68 | cboEnvironment.SelectedIndex = 0; 69 | cboEnvironment.DisplayMember = "Value"; 70 | cboEnvironment.ValueMember = "Key"; 71 | cboEnvironment.SelectedIndexChanged += Environment_SelectedIndexChanged; 72 | 73 | 74 | // Component Name 75 | lblComponentName.Text = Global.Form_ComponentName; 76 | txtComponentName.TextChanged += ComponentName_TextChanged; 77 | 78 | // Component Description 79 | lblComponentDescription.Text = Global.Form_ComponentDescription; 80 | txtComponentDescription.TextChanged += ComponentDescription_TextChanged; 81 | 82 | // Component Type 83 | lblComponentType.Text = Global.Form_ComponentType; 84 | Dictionary cboComponentTypeSource = new Dictionary 85 | { 86 | { "webpart", Global.Form_Prompt_ComponentType_WebPart }, 87 | { "extension", Global.Form_Prompt_ComponentType_Extension } 88 | }; 89 | cboComponentType.DataSource = new BindingSource(cboComponentTypeSource, null); 90 | cboComponentType.SelectedIndex = 0; 91 | cboComponentType.DisplayMember = "Value"; 92 | cboComponentType.ValueMember = "Key"; 93 | cboComponentType.SelectedIndexChanged += ComponentType_SelectedIndexChanged; 94 | 95 | // Extension type 96 | lblExtensionType.Visible = false; 97 | lblExtensionType.Text = Global.Form_ExtensionType; 98 | cboExtensionType.Visible = false; 99 | Dictionary cboExtensionTypeSource = new Dictionary 100 | { 101 | { "ApplicationCustomizer", Global.Form_Prompt_ComponentType_Extension_1 }, 102 | { "FieldCustomizer", Global.Form_Prompt_ComponentType_Extension_2 }, 103 | { "ListViewCommandSet", Global.Form_Prompt_ComponentType_Extension_3 } 104 | }; 105 | cboExtensionType.DataSource = new BindingSource(cboExtensionTypeSource, null); 106 | cboExtensionType.DisplayMember = "Value"; 107 | cboExtensionType.ValueMember = "Key"; 108 | cboExtensionType.SelectedIndexChanged += ExtensionType_SelectedIndexChanged; 109 | 110 | // Package Manager 111 | lblPackageManager.Visible = true; 112 | lblPackageManager.Text = Global.Form_Prompt_PackageManager_Label; 113 | cboPackageManager.Visible = true; 114 | Dictionary cboPackageManagerSource = new Dictionary 115 | { 116 | { "npm", "NPM" }, 117 | { "pnpm", "PNPM" }, 118 | { "yarn", "Yarn" } 119 | }; 120 | cboPackageManager.DataSource = new BindingSource(cboPackageManagerSource, null); 121 | cboPackageManager.SelectedIndex = 0; 122 | cboPackageManager.DisplayMember = "Value"; 123 | cboPackageManager.ValueMember = "Key"; 124 | cboPackageManager.SelectedIndexChanged += cboPackageManager_SelectedIndexChanged; 125 | 126 | // Skip Feature Deployment 127 | cbxSkipFeatureDeployment.Text = Global.Form_Prompt_SkipFeature_Label; 128 | cbxSkipFeatureDeployment.Checked = false; 129 | cbxSkipFeatureDeployment.AutoSize = true; 130 | cbxSkipFeatureDeployment.CheckedChanged += SkipFeatureDeployment_CheckedChanged; 131 | lblSkipFeatureDeploymentInfo.Text = Global.Form_Label_SkipFeatureDeployment_Info; 132 | 133 | // Skip NPM Install 134 | cbxSkipInstall.Text = Global.Form_Prompt_SkipInstall_Label; 135 | cbxSkipInstall.Checked = false; 136 | cbxSkipInstall.AutoSize = true; 137 | cbxSkipInstall.CheckedChanged += SkipInstall_CheckedChanged; 138 | 139 | //Domain Isolation 140 | cbxDomainIsolated.Text = Global.Form_Prompt_Domain_Isolated_Label; 141 | cbxDomainIsolated.Checked = false; 142 | cbxDomainIsolated.AutoSize = false; 143 | cbxDomainIsolated.CheckedChanged += cbxDomainIsolated_CheckedChanged; 144 | lblIsDomainIsolatedInfo.Text = Global.Form_Label_IsDomainIsolated_Info; 145 | 146 | // Beta Features 147 | cbxPlusBeta.Text = Global.Form_Prompt_PlusBeta_Label; 148 | cbxPlusBeta.Checked = false; 149 | cbxPlusBeta.AutoSize = true; 150 | cbxSkipInstall.CheckedChanged += CbxSkipInstall_CheckedChanged; 151 | 152 | // Command string 153 | lblCommandString.Text = Global.Form_CommandString; 154 | lblCommandDescription.Text = Global.Form_AdvancedTab_CommandDescription; 155 | 156 | // Show window 157 | cbxShowWindow.Text = Global.Form_ShowCommandWindow; 158 | 159 | // buttons 160 | btnGenerate.Text = Global.Form_ButtonGenerate; 161 | btnGenerate.Enabled = commandValid; 162 | if (commandValid == true) 163 | { 164 | btnGenerate.ForeColor = Color.White; 165 | btnGenerate.BackColor = Color.Green; 166 | } 167 | btnCancel.Text = Global.Form_ButtonCancel; 168 | btnCancel.ForeColor = Color.White; 169 | btnCancel.BackColor = Color.DarkRed; 170 | 171 | // Footer 172 | lblFooter.Text = Global.Form_Footer_GeneratorText; 173 | lblYeomanVersion.Text = Global.Footer_Yeoman_Version; 174 | 175 | } 176 | 177 | #region Control Event Handlers 178 | 179 | private void SkipFeatureDeployment_CheckedChanged(object sender, EventArgs e) 180 | { 181 | if (cbxSkipFeatureDeployment.Checked) 182 | { 183 | lblSkipFeatureDeploymentInfo.Visible = false; 184 | } 185 | else 186 | { 187 | lblSkipFeatureDeploymentInfo.Visible = true; 188 | } 189 | 190 | SetCommandText(); 191 | SetSubmitState(); 192 | } 193 | 194 | private void Environment_SelectedIndexChanged(object sender, EventArgs e) 195 | { 196 | if (Environment=="onprem") 197 | { 198 | cboComponentType.SelectedValue = "webpart"; 199 | cboComponentType.Enabled = false; 200 | } 201 | else 202 | { 203 | cboComponentType.Enabled = true; 204 | } 205 | SetCommandText(); 206 | SetSubmitState(); 207 | } 208 | 209 | private void ExtensionType_SelectedIndexChanged(object sender, EventArgs e) 210 | { 211 | SetCommandText(); 212 | SetSubmitState(); 213 | } 214 | 215 | private void ComponentType_SelectedIndexChanged(object sender, EventArgs e) 216 | { 217 | if (ComponentType == "extension") 218 | { 219 | lblExtensionType.Visible = true; 220 | cboExtensionType.Visible = true; 221 | cbxDomainIsolated.Visible = false; 222 | lblIsDomainIsolatedInfo.Visible = false; 223 | } 224 | else 225 | { 226 | lblExtensionType.Visible = false; 227 | cboExtensionType.Visible = false; 228 | cbxDomainIsolated.Visible = true; 229 | lblIsDomainIsolatedInfo.Visible = true; 230 | } 231 | SetCommandText(); 232 | SetSubmitState(); 233 | } 234 | 235 | private void SkipInstall_CheckedChanged(object sender, EventArgs e) 236 | { 237 | SetCommandText(); 238 | SetSubmitState(); 239 | } 240 | 241 | private void CbxSkipInstall_CheckedChanged(object sender, EventArgs e) 242 | { 243 | SetCommandText(); 244 | SetSubmitState(); 245 | } 246 | 247 | private void ComponentDescription_TextChanged(object sender, EventArgs e) 248 | { 249 | SetCommandText(); 250 | SetSubmitState(); 251 | } 252 | 253 | private void ComponentName_TextChanged(object sender, EventArgs e) 254 | { 255 | SetCommandText(); 256 | SetSubmitState(); 257 | } 258 | 259 | private void Framework_SelectedIndexChanged(object sender, EventArgs e) 260 | { 261 | SetCommandText(); 262 | SetSubmitState(); 263 | } 264 | 265 | private void SolutionName_TextChanged(object sender, EventArgs e) 266 | { 267 | SolutionName = txtSolutionName.Text; 268 | SetCommandText(); 269 | SetSubmitState(); 270 | } 271 | 272 | private void cboPackageManager_SelectedIndexChanged(object sender, EventArgs e) 273 | { 274 | SetCommandText(); 275 | SetSubmitState(); 276 | } 277 | 278 | private void cbxDomainIsolated_CheckedChanged(object sender, EventArgs e) 279 | { 280 | if (cbxDomainIsolated.Checked) 281 | { 282 | cboComponentType.SelectedValue = "webpart"; 283 | cboComponentType.Enabled = false; 284 | lblIsDomainIsolatedInfo.Visible = false; 285 | } 286 | else 287 | { 288 | cboComponentType.Enabled = true; 289 | lblIsDomainIsolatedInfo.Visible = true; 290 | } 291 | SetCommandText(); 292 | SetSubmitState(); 293 | } 294 | 295 | private void SetCommandText() 296 | { 297 | commandValid = Utility.SetProjectCommand(SolutionName, Framework, ComponentName, 298 | ComponentDescription, ComponentType, ExtensionType, 299 | Environment, SkipFeatureDeployment, SkipInstall, PlusBeta, PackageManager, DomainIsolated, out commandString); 300 | 301 | txtCommandString.Text = commandString; 302 | 303 | if (commandValid == true) 304 | { 305 | btnGenerate.BackColor = Color.Green; 306 | btnGenerate.ForeColor = Color.White; 307 | } 308 | } 309 | 310 | protected void SetSubmitState() 311 | { 312 | btnGenerate.Enabled = commandValid; 313 | if (commandValid == true) 314 | { 315 | btnGenerate.BackColor = Color.Green; 316 | btnGenerate.ForeColor = Color.White; 317 | } 318 | } 319 | 320 | private void Generate_Click(object sender, EventArgs e) 321 | { 322 | this.Close(); 323 | } 324 | 325 | private void Cancel_Click(object sender, EventArgs e) 326 | { 327 | formCancel = true; 328 | this.Close(); 329 | } 330 | 331 | #endregion 332 | 333 | 334 | #region Properties 335 | 336 | public string SolutionName 337 | { 338 | get { return txtSolutionName.Text; } 339 | set { txtSolutionName.Text = value; } 340 | } 341 | public string Framework 342 | { 343 | get { return ((KeyValuePair)cboFramework.SelectedItem).Key; } 344 | private set { } 345 | } 346 | public string Environment 347 | { 348 | get { return ((KeyValuePair)cboEnvironment.SelectedItem).Key; } 349 | private set { } 350 | } 351 | public string ComponentName 352 | { 353 | get { return txtComponentName.Text; } 354 | private set { } 355 | } 356 | public string ComponentDescription 357 | { 358 | get { return txtComponentDescription.Text; } 359 | private set { } 360 | } 361 | public string ComponentType 362 | { 363 | get { return ((KeyValuePair)cboComponentType.SelectedItem).Key; } 364 | private set { } 365 | } 366 | public string ExtensionType 367 | { 368 | get { return (ComponentType == "extension") ? ((KeyValuePair)cboExtensionType.SelectedItem).Key : String.Empty; } 369 | private set { } 370 | } 371 | public bool SkipFeatureDeployment 372 | { 373 | get { return cbxSkipFeatureDeployment.Checked; } 374 | private set { } 375 | } 376 | public bool SkipInstall 377 | { 378 | get { return cbxSkipInstall.Checked; } 379 | private set { } 380 | } 381 | 382 | public bool PlusBeta 383 | { 384 | get { return cbxPlusBeta.Checked; } 385 | private set { } 386 | } 387 | 388 | public bool ShowWindow 389 | { 390 | get { return cbxShowWindow.Checked; } 391 | private set { } 392 | } 393 | public string CommandString 394 | { 395 | get { return commandString; } 396 | private set { } 397 | } 398 | public bool FormCancel 399 | { 400 | get { return formCancel; } 401 | private set { } 402 | } 403 | 404 | public string PackageManager 405 | { 406 | get { return ((KeyValuePair)cboPackageManager.SelectedItem).Key; } 407 | private set { } 408 | } 409 | 410 | public bool DomainIsolated 411 | { 412 | get { return cbxDomainIsolated.Checked; } 413 | private set { } 414 | } 415 | 416 | #endregion 417 | 418 | 419 | } 420 | } 421 | -------------------------------------------------------------------------------- /Framework.VSIX/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Framework.VSIX")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Framework.VSIX")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /Framework.VSIX/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Framework.VSIX.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Framework.VSIX.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Framework.VSIX/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Framework.VSIX/Resources/Extension.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.VSIX/Resources/Extension.ico -------------------------------------------------------------------------------- /Framework.VSIX/Resources/Global.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Framework.VSIX.Resources { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Global { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Global() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Framework.VSIX.Resources.Global", typeof(Global).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 65 | /// 66 | internal static System.Drawing.Icon Extension { 67 | get { 68 | object obj = ResourceManager.GetObject("Extension", resourceCulture); 69 | return ((System.Drawing.Icon)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized string similar to Requires version 1.8 of the SharePoint Framework Yeoman Generator. 75 | /// 76 | internal static string Footer_Yeoman_Version { 77 | get { 78 | return ResourceManager.GetString("Footer_Yeoman_Version", resourceCulture); 79 | } 80 | } 81 | 82 | /// 83 | /// Looks up a localized string similar to Add switches and parameters to the Yeoman Generator commands.. 84 | /// 85 | internal static string Form_AdvancedTab_CommandDescription { 86 | get { 87 | return ResourceManager.GetString("Form_AdvancedTab_CommandDescription", resourceCulture); 88 | } 89 | } 90 | 91 | /// 92 | /// Looks up a localized string similar to Advanced. 93 | /// 94 | internal static string Form_AdvancedTab_Title { 95 | get { 96 | return ResourceManager.GetString("Form_AdvancedTab_Title", resourceCulture); 97 | } 98 | } 99 | 100 | /// 101 | /// Looks up a localized string similar to Cancel. 102 | /// 103 | internal static string Form_ButtonCancel { 104 | get { 105 | return ResourceManager.GetString("Form_ButtonCancel", resourceCulture); 106 | } 107 | } 108 | 109 | /// 110 | /// Looks up a localized string similar to Close. 111 | /// 112 | internal static string Form_ButtonClose { 113 | get { 114 | return ResourceManager.GetString("Form_ButtonClose", resourceCulture); 115 | } 116 | } 117 | 118 | /// 119 | /// Looks up a localized string similar to Generate. 120 | /// 121 | internal static string Form_ButtonGenerate { 122 | get { 123 | return ResourceManager.GetString("Form_ButtonGenerate", resourceCulture); 124 | } 125 | } 126 | 127 | /// 128 | /// Looks up a localized string similar to Command String:. 129 | /// 130 | internal static string Form_CommandString { 131 | get { 132 | return ResourceManager.GetString("Form_CommandString", resourceCulture); 133 | } 134 | } 135 | 136 | /// 137 | /// Looks up a localized string similar to Component Description:. 138 | /// 139 | internal static string Form_ComponentDescription { 140 | get { 141 | return ResourceManager.GetString("Form_ComponentDescription", resourceCulture); 142 | } 143 | } 144 | 145 | /// 146 | /// Looks up a localized string similar to Component Name:. 147 | /// 148 | internal static string Form_ComponentName { 149 | get { 150 | return ResourceManager.GetString("Form_ComponentName", resourceCulture); 151 | } 152 | } 153 | 154 | /// 155 | /// Looks up a localized string similar to ComponentType:. 156 | /// 157 | internal static string Form_ComponentType { 158 | get { 159 | return ResourceManager.GetString("Form_ComponentType", resourceCulture); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized string similar to One or more required fields are empty.. 165 | /// 166 | internal static string Form_EmptyFieldMessage { 167 | get { 168 | return ResourceManager.GetString("Form_EmptyFieldMessage", resourceCulture); 169 | } 170 | } 171 | 172 | /// 173 | /// Looks up a localized string similar to Environment:. 174 | /// 175 | internal static string Form_Environment { 176 | get { 177 | return ResourceManager.GetString("Form_Environment", resourceCulture); 178 | } 179 | } 180 | 181 | /// 182 | /// Looks up a localized string similar to Extension Type:. 183 | /// 184 | internal static string Form_ExtensionType { 185 | get { 186 | return ResourceManager.GetString("Form_ExtensionType", resourceCulture); 187 | } 188 | } 189 | 190 | /// 191 | /// Looks up a localized string similar to NOTE: If you don't skip 'npm install', running the generator may take several minutes. Please wait until it completes.. 192 | /// 193 | internal static string Form_Footer_GeneratorText { 194 | get { 195 | return ResourceManager.GetString("Form_Footer_GeneratorText", resourceCulture); 196 | } 197 | } 198 | 199 | /// 200 | /// Looks up a localized string similar to Framework:. 201 | /// 202 | internal static string Form_Framework { 203 | get { 204 | return ResourceManager.GetString("Form_Framework", resourceCulture); 205 | } 206 | } 207 | 208 | /// 209 | /// Looks up a localized string similar to SharePoint Framework Web Part Configuration. 210 | /// 211 | internal static string Form_Item_Name { 212 | get { 213 | return ResourceManager.GetString("Form_Item_Name", resourceCulture); 214 | } 215 | } 216 | 217 | /// 218 | /// Looks up a localized string similar to SharePoint Framework Web Part Configuration. 219 | /// 220 | internal static string Form_Item_Title { 221 | get { 222 | return ResourceManager.GetString("Form_Item_Title", resourceCulture); 223 | } 224 | } 225 | 226 | /// 227 | /// Looks up a localized string similar to NOTE: If this option is unchecked, the generator will insert a string value of "false" into the package-soluiton.json file. You must change it manually to a boolean false value or the build task will fail.. 228 | /// 229 | internal static string Form_Label_IsDomainIsolated_Info { 230 | get { 231 | return ResourceManager.GetString("Form_Label_IsDomainIsolated_Info", resourceCulture); 232 | } 233 | } 234 | 235 | /// 236 | /// Looks up a localized string similar to NOTE: If this option is unchecked, the generator will insert a string value of "false" into the package-soluiton.json file. You must change it manually to a boolean false value or the build task will fail.. 237 | /// 238 | internal static string Form_Label_SkipFeatureDeployment_Info { 239 | get { 240 | return ResourceManager.GetString("Form_Label_SkipFeatureDeployment_Info", resourceCulture); 241 | } 242 | } 243 | 244 | /// 245 | /// Looks up a localized string similar to Log. 246 | /// 247 | internal static string Form_LogTab_Title { 248 | get { 249 | return ResourceManager.GetString("Form_LogTab_Title", resourceCulture); 250 | } 251 | } 252 | 253 | /// 254 | /// Looks up a localized string similar to Use Beta Features. 255 | /// 256 | internal static string Form_PlusBeta { 257 | get { 258 | return ResourceManager.GetString("Form_PlusBeta", resourceCulture); 259 | } 260 | } 261 | 262 | /// 263 | /// Looks up a localized string similar to SharePoint Framework Project Configuration. 264 | /// 265 | internal static string Form_Project_Name { 266 | get { 267 | return ResourceManager.GetString("Form_Project_Name", resourceCulture); 268 | } 269 | } 270 | 271 | /// 272 | /// Looks up a localized string similar to SharePoint Framework Project Configuration. 273 | /// 274 | internal static string Form_Project_Title { 275 | get { 276 | return ResourceManager.GetString("Form_Project_Title", resourceCulture); 277 | } 278 | } 279 | 280 | /// 281 | /// Looks up a localized string similar to Extension. 282 | /// 283 | internal static string Form_Prompt_ComponentType_Extension { 284 | get { 285 | return ResourceManager.GetString("Form_Prompt_ComponentType_Extension", resourceCulture); 286 | } 287 | } 288 | 289 | /// 290 | /// Looks up a localized string similar to Application Customizer. 291 | /// 292 | internal static string Form_Prompt_ComponentType_Extension_1 { 293 | get { 294 | return ResourceManager.GetString("Form_Prompt_ComponentType_Extension_1", resourceCulture); 295 | } 296 | } 297 | 298 | /// 299 | /// Looks up a localized string similar to Field Customizer. 300 | /// 301 | internal static string Form_Prompt_ComponentType_Extension_2 { 302 | get { 303 | return ResourceManager.GetString("Form_Prompt_ComponentType_Extension_2", resourceCulture); 304 | } 305 | } 306 | 307 | /// 308 | /// Looks up a localized string similar to Command Set. 309 | /// 310 | internal static string Form_Prompt_ComponentType_Extension_3 { 311 | get { 312 | return ResourceManager.GetString("Form_Prompt_ComponentType_Extension_3", resourceCulture); 313 | } 314 | } 315 | 316 | /// 317 | /// Looks up a localized string similar to Web Part. 318 | /// 319 | internal static string Form_Prompt_ComponentType_WebPart { 320 | get { 321 | return ResourceManager.GetString("Form_Prompt_ComponentType_WebPart", resourceCulture); 322 | } 323 | } 324 | 325 | /// 326 | /// Looks up a localized string similar to Components require permissions to access web API's that are unique and not shared with other components in the tenant?. 327 | /// 328 | internal static string Form_Prompt_Domain_Isolated_Label { 329 | get { 330 | return ResourceManager.GetString("Form_Prompt_Domain_Isolated_Label", resourceCulture); 331 | } 332 | } 333 | 334 | /// 335 | /// Looks up a localized string similar to Baseline Packages. 336 | /// 337 | internal static string Form_Prompt_Environment_Label { 338 | get { 339 | return ResourceManager.GetString("Form_Prompt_Environment_Label", resourceCulture); 340 | } 341 | } 342 | 343 | /// 344 | /// Looks up a localized string similar to SharePoint Online only (latest). 345 | /// 346 | internal static string Form_Prompt_Environment_Option1 { 347 | get { 348 | return ResourceManager.GetString("Form_Prompt_Environment_Option1", resourceCulture); 349 | } 350 | } 351 | 352 | /// 353 | /// Looks up a localized string similar to SharePoint 2016 onwards, including 2018 and SharePoint Online. 354 | /// 355 | internal static string Form_Prompt_Environment_Option2 { 356 | get { 357 | return ResourceManager.GetString("Form_Prompt_Environment_Option2", resourceCulture); 358 | } 359 | } 360 | 361 | /// 362 | /// Looks up a localized string similar to SharePoint 2019 onwards, including SharePoint Online. 363 | /// 364 | internal static string Form_Prompt_Environment_Option3 { 365 | get { 366 | return ResourceManager.GetString("Form_Prompt_Environment_Option3", resourceCulture); 367 | } 368 | } 369 | 370 | /// 371 | /// Looks up a localized string similar to Package Manager:. 372 | /// 373 | internal static string Form_Prompt_PackageManager_Label { 374 | get { 375 | return ResourceManager.GetString("Form_Prompt_PackageManager_Label", resourceCulture); 376 | } 377 | } 378 | 379 | /// 380 | /// Looks up a localized string similar to Include preview (beta) features?. 381 | /// 382 | internal static string Form_Prompt_PlusBeta_Label { 383 | get { 384 | return ResourceManager.GetString("Form_Prompt_PlusBeta_Label", resourceCulture); 385 | } 386 | } 387 | 388 | /// 389 | /// Looks up a localized string similar to Skip feature deployment?. 390 | /// 391 | internal static string Form_Prompt_SkipFeature_Label { 392 | get { 393 | return ResourceManager.GetString("Form_Prompt_SkipFeature_Label", resourceCulture); 394 | } 395 | } 396 | 397 | /// 398 | /// Looks up a localized string similar to Skip running "npm install" command?. 399 | /// 400 | internal static string Form_Prompt_SkipInstall_Label { 401 | get { 402 | return ResourceManager.GetString("Form_Prompt_SkipInstall_Label", resourceCulture); 403 | } 404 | } 405 | 406 | /// 407 | /// Looks up a localized string similar to Properties. 408 | /// 409 | internal static string Form_PropertyTab_Title { 410 | get { 411 | return ResourceManager.GetString("Form_PropertyTab_Title", resourceCulture); 412 | } 413 | } 414 | 415 | /// 416 | /// Looks up a localized string similar to Show command window (if checked, manually exit from command window when execution is completed). 417 | /// 418 | internal static string Form_ShowCommandWindow { 419 | get { 420 | return ResourceManager.GetString("Form_ShowCommandWindow", resourceCulture); 421 | } 422 | } 423 | 424 | /// 425 | /// Looks up a localized string similar to Skip Feature Deployment. 426 | /// 427 | internal static string Form_SkipFeatureDeployment { 428 | get { 429 | return ResourceManager.GetString("Form_SkipFeatureDeployment", resourceCulture); 430 | } 431 | } 432 | 433 | /// 434 | /// Looks up a localized string similar to Do not automatically install dependencies (skip "npm install" command). 435 | /// 436 | internal static string Form_SkipInstall { 437 | get { 438 | return ResourceManager.GetString("Form_SkipInstall", resourceCulture); 439 | } 440 | } 441 | 442 | /// 443 | /// Looks up a localized string similar to --skip-install. 444 | /// 445 | internal static string Form_SkipInstall_Flag { 446 | get { 447 | return ResourceManager.GetString("Form_SkipInstall_Flag", resourceCulture); 448 | } 449 | } 450 | 451 | /// 452 | /// Looks up a localized string similar to Solution Name:. 453 | /// 454 | internal static string Form_SolutionName { 455 | get { 456 | return ResourceManager.GetString("Form_SolutionName", resourceCulture); 457 | } 458 | } 459 | 460 | /// 461 | /// Looks up a localized string similar to 1.1.0. 462 | /// 463 | internal static string Yeoman_Generator_ExtensionsVersion { 464 | get { 465 | return ResourceManager.GetString("Yeoman_Generator_ExtensionsVersion", resourceCulture); 466 | } 467 | } 468 | 469 | /// 470 | /// Looks up a localized string similar to npm list @microsoft/generator-sharepoint -g -json. 471 | /// 472 | internal static string Yeoman_Generator_VersionCheck { 473 | get { 474 | return ResourceManager.GetString("Yeoman_Generator_VersionCheck", resourceCulture); 475 | } 476 | } 477 | 478 | /// 479 | /// Looks up a localized string similar to yo @microsoft/sharepoint --component-name "{0}" --component-description "{1}". 480 | /// 481 | internal static string Yeoman_Item_CommandString { 482 | get { 483 | return ResourceManager.GetString("Yeoman_Item_CommandString", resourceCulture); 484 | } 485 | } 486 | 487 | /// 488 | /// Looks up a localized string similar to yo @microsoft/sharepoint --component-name "{0}" --component-description "{1}" --framework "{2}" --component-type "webpart". 489 | /// 490 | internal static string Yeoman_Item_CommandString_Extensions { 491 | get { 492 | return ResourceManager.GetString("Yeoman_Item_CommandString_Extensions", resourceCulture); 493 | } 494 | } 495 | 496 | /// 497 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" {4}. 498 | /// 499 | internal static string Yeoman_Project_CommandString { 500 | get { 501 | return ResourceManager.GetString("Yeoman_Project_CommandString", resourceCulture); 502 | } 503 | } 504 | 505 | /// 506 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" {4}. 507 | /// 508 | internal static string Yeoman_Project_CommandString_1_0 { 509 | get { 510 | return ResourceManager.GetString("Yeoman_Project_CommandString_1_0", resourceCulture); 511 | } 512 | } 513 | 514 | /// 515 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "webpart" {4}. 516 | /// 517 | internal static string Yeoman_Project_CommandString_1_1 { 518 | get { 519 | return ResourceManager.GetString("Yeoman_Project_CommandString_1_1", resourceCulture); 520 | } 521 | } 522 | 523 | /// 524 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "{5}" {4}. 525 | /// 526 | internal static string Yeoman_Project_CommandString_1_3 { 527 | get { 528 | return ResourceManager.GetString("Yeoman_Project_CommandString_1_3", resourceCulture); 529 | } 530 | } 531 | 532 | /// 533 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solution-Name "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "{4}" --environment "{5}" --package-manager "{6}" --is-domain-isolated "{7}" --skip-cache "true" {8}. 534 | /// 535 | internal static string Yeoman_Project_CommandString_1_7 { 536 | get { 537 | return ResourceManager.GetString("Yeoman_Project_CommandString_1_7", resourceCulture); 538 | } 539 | } 540 | 541 | /// 542 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --componentName "{2}" --componentDescription "{3}" --componentType "webpart" {4}. 543 | /// 544 | internal static string Yeoman_Project_CommandString_Extensions { 545 | get { 546 | return ResourceManager.GetString("Yeoman_Project_CommandString_Extensions", resourceCulture); 547 | } 548 | } 549 | 550 | /// 551 | /// Looks up a localized string similar to yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --componentName "{2}" --componentDescription "{3}"{4}. 552 | /// 553 | internal static string Yeoman_Project_DefaultCommandString { 554 | get { 555 | return ResourceManager.GetString("Yeoman_Project_DefaultCommandString", resourceCulture); 556 | } 557 | } 558 | } 559 | } 560 | -------------------------------------------------------------------------------- /Framework.VSIX/Resources/Global.en.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | Extension.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | Extension.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | Requires version 1.8 of the SharePoint Framework Yeoman Generator 129 | 130 | 131 | Add switches and parameters to the Yeoman Generator commands. 132 | 133 | 134 | Advanced 135 | 136 | 137 | Cancel 138 | 139 | 140 | Close 141 | 142 | 143 | Generate 144 | 145 | 146 | Command String: 147 | 148 | 149 | Component Description: 150 | 151 | 152 | Component Name: 153 | 154 | 155 | Component Type: 156 | 157 | 158 | One or more required fields are empty. 159 | 160 | 161 | Environment: 162 | 163 | 164 | Extension Type: 165 | 166 | 167 | NOTE: If you don't skip 'npm install', running the generator may take several minutes. Please wait until it completes. 168 | 169 | 170 | Framework: 171 | 172 | 173 | SharePoint Framework Web Part Configuration 174 | 175 | 176 | SharePoint Framework Web Part Configuration 177 | 178 | 179 | NOTE: If this option is unchecked, the generator will insert a string value of "false" into the package-soluiton.json file. You must change it manually to a boolean false value or the build task will fail. 180 | 181 | 182 | NOTE: If this option is unchecked, the generator will insert a string value of "false" into the package-soluiton.json file. You must change it manually to a boolean false value or the build task will fail. 183 | 184 | 185 | Log 186 | 187 | 188 | Use Beta Features 189 | 190 | 191 | SharePoint Framework Project Configuration 192 | 193 | 194 | SharePoint Framework Project Configuration 195 | 196 | 197 | Extension 198 | 199 | 200 | Application Customizer 201 | 202 | 203 | Field Customizer 204 | 205 | 206 | Command Set 207 | 208 | 209 | Web Part 210 | 211 | 212 | Components require permissions to access web API's that are unique and not shared with other components in the tenant? 213 | 214 | 215 | Baseline Packages 216 | 217 | 218 | SharePoint Online only (latest) 219 | 220 | 221 | SharePoint 2016 onwards, including 2018 and SharePoint Online 222 | 223 | 224 | SharePoint 2019 onwards, including SharePoint Online 225 | 226 | 227 | Package Manager: 228 | 229 | 230 | Include preview (beta) features? 231 | 232 | 233 | Skip feature deployment? 234 | 235 | 236 | Skip running "npm install" command? 237 | 238 | 239 | Properties 240 | 241 | 242 | Show command window (if checked, manually exit from command window when execution is completed) 243 | 244 | 245 | Skip Feature Deployment 246 | 247 | 248 | Do not automatically install dependencies (skip "npm install" command) 249 | 250 | 251 | --skip-install 252 | 253 | 254 | Solution Name: 255 | 256 | 257 | 1.1.0 258 | 259 | 260 | npm list @microsoft/generator-sharepoint -g -json 261 | 262 | 263 | yo @microsoft/sharepoint --component-name "{0}" --component-description "{1}" 264 | 265 | 266 | yo @microsoft/sharepoint --component-name "{0}" --component-description "{1}" --framework "{2}" --component-type "webpart" 267 | 268 | 269 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" {4} 270 | 271 | 272 | yo @microsoft/sharepoint --solution-Name "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "{4}" --environment "{5}" --package-manager "{6}" --is-domain-isolated "{7}" --skip-cache "true" {8} 273 | 274 | 275 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --componentdescription "{3}" --component-type "webpart" {4} 276 | 277 | 278 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --componentdescription "{3}" {4} 279 | 280 | -------------------------------------------------------------------------------- /Framework.VSIX/Resources/Global.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | Extension.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | Requires version 1.8 of the SharePoint Framework Yeoman Generator 126 | 127 | 128 | Add switches and parameters to the Yeoman Generator commands. 129 | 130 | 131 | Advanced 132 | 133 | 134 | Cancel 135 | 136 | 137 | Close 138 | 139 | 140 | Generate 141 | 142 | 143 | Command String: 144 | 145 | 146 | Component Description: 147 | 148 | 149 | Component Name: 150 | 151 | 152 | ComponentType: 153 | 154 | 155 | One or more required fields are empty. 156 | 157 | 158 | Environment: 159 | 160 | 161 | Extension Type: 162 | 163 | 164 | NOTE: If you don't skip 'npm install', running the generator may take several minutes. Please wait until it completes. 165 | 166 | 167 | Framework: 168 | 169 | 170 | SharePoint Framework Web Part Configuration 171 | 172 | 173 | SharePoint Framework Web Part Configuration 174 | 175 | 176 | NOTE: If this option is unchecked, the generator will insert a string value of "false" into the package-soluiton.json file. You must change it manually to a boolean false value or the build task will fail. 177 | 178 | 179 | NOTE: If this option is unchecked, the generator will insert a string value of "false" into the package-soluiton.json file. You must change it manually to a boolean false value or the build task will fail. 180 | 181 | 182 | Log 183 | 184 | 185 | Use Beta Features 186 | 187 | 188 | SharePoint Framework Project Configuration 189 | 190 | 191 | SharePoint Framework Project Configuration 192 | 193 | 194 | Extension 195 | 196 | 197 | Application Customizer 198 | 199 | 200 | Field Customizer 201 | 202 | 203 | Command Set 204 | 205 | 206 | Web Part 207 | 208 | 209 | Components require permissions to access web API's that are unique and not shared with other components in the tenant? 210 | 211 | 212 | Baseline Packages 213 | 214 | 215 | SharePoint Online only (latest) 216 | 217 | 218 | SharePoint 2016 onwards, including 2018 and SharePoint Online 219 | 220 | 221 | SharePoint 2019 onwards, including SharePoint Online 222 | 223 | 224 | Package Manager: 225 | 226 | 227 | Include preview (beta) features? 228 | 229 | 230 | Skip feature deployment? 231 | 232 | 233 | Skip running "npm install" command? 234 | 235 | 236 | Properties 237 | 238 | 239 | Show command window (if checked, manually exit from command window when execution is completed) 240 | 241 | 242 | Skip Feature Deployment 243 | 244 | 245 | Do not automatically install dependencies (skip "npm install" command) 246 | 247 | 248 | --skip-install 249 | 250 | 251 | Solution Name: 252 | 253 | 254 | 1.1.0 255 | 256 | 257 | npm list @microsoft/generator-sharepoint -g -json 258 | 259 | 260 | yo @microsoft/sharepoint --component-name "{0}" --component-description "{1}" 261 | 262 | 263 | yo @microsoft/sharepoint --component-name "{0}" --component-description "{1}" --framework "{2}" --component-type "webpart" 264 | 265 | 266 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" {4} 267 | 268 | 269 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" {4} 270 | 271 | 272 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "webpart" {4} 273 | 274 | 275 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "{5}" {4} 276 | 277 | 278 | yo @microsoft/sharepoint --solution-Name "{0}" --framework "{1}" --component-name "{2}" --component-description "{3}" --component-type "{4}" --environment "{5}" --package-manager "{6}" --is-domain-isolated "{7}" --skip-cache "true" {8} 279 | 280 | 281 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --componentName "{2}" --componentDescription "{3}" --componentType "webpart" {4} 282 | 283 | 284 | yo @microsoft/sharepoint --solutionName "{0}" --framework "{1}" --componentName "{2}" --componentDescription "{3}"{4} 285 | 286 | -------------------------------------------------------------------------------- /Framework.VSIX/SPFxProjectExtension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.VSIX/SPFxProjectExtension.png -------------------------------------------------------------------------------- /Framework.VSIX/Utility.cs: -------------------------------------------------------------------------------- 1 | using Framework.VSIX.Resources; 2 | using System; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Text; 6 | 7 | namespace Framework.VSIX 8 | { 9 | public static class Utility 10 | { 11 | #region Application Insights 12 | 13 | public static string AppInsightsKey = "0475a9f1-215a-41a9-860e-c9c9a337868c"; 14 | 15 | #endregion 16 | 17 | #region Set Command line 18 | 19 | public static bool SetItemCommand(string Framework, string ComponentName, 20 | string ComponentDescription, string ComponentType, 21 | string ExtensionType, out string command) 22 | { 23 | command = String.Empty; 24 | bool result = true; 25 | 26 | if (String.IsNullOrEmpty(ComponentName)) 27 | result = false; 28 | if (String.IsNullOrEmpty(ComponentDescription)) 29 | result = false; 30 | if (String.IsNullOrEmpty(ComponentType)) 31 | result = false; 32 | if (ComponentType == "webpart" && String.IsNullOrEmpty(Framework)) 33 | result = false; 34 | if (ComponentType == "extension" && String.IsNullOrEmpty(ExtensionType)) 35 | result = false; 36 | if (ComponentType == "extension" && ExtensionType == "FieldCustomizer" && String.IsNullOrEmpty(Framework)) 37 | result = false; 38 | 39 | command = SetCommand(null, Framework, ComponentName, ComponentDescription, 40 | ComponentType, ExtensionType, null, false, false, false, null, false); 41 | return result; 42 | } 43 | 44 | public static bool SetProjectCommand(string SolutionName, string Framework, string ComponentName, 45 | string ComponentDescription, string ComponentType, string ExtensionType, 46 | string Environment, bool SkipFeatureDeployment, bool SkipInstall, bool PlusBeta, string PackageManager, bool DomainIsolated, 47 | out string command) 48 | { 49 | command = String.Empty; 50 | bool result = true; 51 | 52 | if (String.IsNullOrEmpty(SolutionName)) 53 | result = false; 54 | if (String.IsNullOrEmpty(Framework)) 55 | result = false; 56 | if (String.IsNullOrEmpty(ComponentName)) 57 | result = false; 58 | if (String.IsNullOrEmpty(ComponentDescription)) 59 | result = false; 60 | if (String.IsNullOrEmpty(ComponentType)) 61 | result = false; 62 | if (ComponentType == "extension" && String.IsNullOrEmpty(ExtensionType)) 63 | result = false; 64 | 65 | command = SetCommand(SolutionName, Framework, ComponentName, ComponentDescription, 66 | ComponentType, ExtensionType, Environment, SkipFeatureDeployment, SkipInstall, PlusBeta, PackageManager, DomainIsolated); 67 | return result; 68 | } 69 | 70 | private static string SetCommand(string SolutionName, string Framework, string ComponentName, 71 | string ComponentDescription, string ComponentType, string ExtensionType, 72 | string Environment, bool SkipFeatureDeployment, bool SkipInstall, bool PlusBeta, string PackageManager, bool DomainIsolated) 73 | { 74 | StringBuilder commandBuilder = new StringBuilder(); 75 | commandBuilder.Append($"yo @microsoft/sharepoint"); 76 | 77 | if (!String.IsNullOrEmpty(SolutionName)) 78 | commandBuilder.Append($" --solution-name \"{SolutionName}\""); 79 | 80 | if (!String.IsNullOrEmpty(ComponentName)) 81 | commandBuilder.Append($" --component-name \"{ComponentName}\""); 82 | 83 | if (!String.IsNullOrEmpty(ComponentDescription)) 84 | commandBuilder.Append($" --component-description \"{ComponentDescription}\""); 85 | 86 | if (!String.IsNullOrEmpty(ComponentType)) 87 | commandBuilder.Append($" --component-type \"{ComponentType}\""); 88 | 89 | if (!String.IsNullOrEmpty(Framework)) 90 | commandBuilder.Append($" --framework \"{Framework}\""); 91 | 92 | if (SkipInstall) 93 | commandBuilder.Append(" --skip-install"); 94 | 95 | if (PlusBeta) 96 | commandBuilder.Append(" --plusbeta"); 97 | 98 | if (!String.IsNullOrEmpty(Environment)) 99 | commandBuilder.Append($" --environment \"{Environment}\""); 100 | 101 | if (!String.IsNullOrEmpty(ExtensionType)) 102 | commandBuilder.Append($" --extension-type \"{ExtensionType}\""); 103 | 104 | if (!String.IsNullOrEmpty(PackageManager)) 105 | { 106 | commandBuilder.Append($" --package-manager \"{PackageManager}\""); 107 | } 108 | 109 | if (SkipFeatureDeployment) 110 | commandBuilder.Append(" --skip-feature-deployment"); 111 | else 112 | commandBuilder.Append(" --skip-feature-deployment \"false\""); 113 | 114 | if (DomainIsolated) 115 | commandBuilder.Append(" --is-domain-isolated"); 116 | else 117 | commandBuilder.Append(" --is-domain-isolated \"false\""); 118 | 119 | commandBuilder.Append(" --skip-cache"); 120 | 121 | return commandBuilder.ToString(); 122 | } 123 | #endregion 124 | 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /Framework.VSIX/WebPartItemWizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Collections.Generic; 4 | using Microsoft.VisualStudio.TemplateWizard; 5 | using System.Windows.Forms; 6 | using System.Drawing; 7 | using Microsoft.CSharp; 8 | using EnvDTE; 9 | using System.IO; 10 | using System.Text; 11 | using System.Globalization; 12 | using System.Threading; 13 | using System.Resources; 14 | using System.Reflection; 15 | using Framework.VSIX.Resources; 16 | using Microsoft.ApplicationInsights; 17 | using Microsoft.ApplicationInsights.Extensibility; 18 | 19 | namespace Framework.VSIX 20 | { 21 | public class WebPartItemWizard : IWizard 22 | { 23 | private AddItemForm inputForm; 24 | private string componentName; 25 | private string componentDescription; 26 | private string commandString; 27 | private bool showWindow; 28 | private bool formCancel; 29 | 30 | TelemetryClient telemetry = new TelemetryClient 31 | { 32 | InstrumentationKey = Utility.AppInsightsKey 33 | }; 34 | Dictionary telProps = new Dictionary(); 35 | Guid telOpCtx = Guid.NewGuid(); 36 | 37 | public void BeforeOpeningFile(ProjectItem projectItem) 38 | { 39 | } 40 | 41 | public void ProjectFinishedGenerating(Project project) 42 | { 43 | } 44 | 45 | public void ProjectItemFinishedGenerating(ProjectItem projectItem) 46 | { 47 | if (!formCancel) 48 | { 49 | string projectDir = projectItem.ContainingProject.FullName; 50 | projectDir = projectDir.Substring(0, projectDir.LastIndexOf("\\")); 51 | string logFile = String.Format(@"{0}\{1}.log", projectDir, componentName); 52 | 53 | StringBuilder outputText = new StringBuilder(); 54 | 55 | using (var proc = new System.Diagnostics.Process()) 56 | { 57 | proc.StartInfo.WorkingDirectory = projectDir; 58 | proc.StartInfo.FileName = @"cmd.exe"; 59 | 60 | if (showWindow == false) 61 | { 62 | proc.StartInfo.Arguments = string.Format(@" /c {0}", commandString); 63 | proc.StartInfo.RedirectStandardInput = true; 64 | proc.StartInfo.RedirectStandardOutput = true; 65 | proc.StartInfo.RedirectStandardError = true; 66 | proc.StartInfo.CreateNoWindow = true; 67 | proc.StartInfo.UseShellExecute = false; 68 | proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; 69 | proc.Start(); 70 | 71 | proc.StandardInput.Flush(); 72 | proc.StandardInput.WriteLine("exit"); 73 | proc.StandardInput.Flush(); 74 | 75 | using (StreamReader reader = proc.StandardOutput) 76 | { 77 | string result = reader.ReadToEnd(); 78 | outputText.Append(result); 79 | } 80 | 81 | using (StreamReader reader = proc.StandardError) 82 | { 83 | string result = reader.ReadToEnd(); 84 | outputText.Append(result); 85 | } 86 | } 87 | else 88 | { 89 | proc.StartInfo.Arguments = string.Format(@" /k {0}", commandString); 90 | proc.Start(); 91 | } 92 | 93 | proc.WaitForExit(); 94 | 95 | using (StreamWriter sw = File.AppendText(logFile)) 96 | { 97 | sw.Write(outputText); 98 | } 99 | } 100 | 101 | telemetry.TrackEvent("item-wizard", telProps, null); 102 | // Allow some time for flushing before shutdown. 103 | telemetry.Flush(); 104 | System.Threading.Thread.Sleep(1000); 105 | 106 | string[] files = Directory.GetFiles(projectDir, "*.*", SearchOption.AllDirectories); 107 | 108 | foreach (string file in files) 109 | { 110 | if (!file.ToLower().Contains("node_modules") && 111 | !file.ToLower().Contains(@"\bin\") && 112 | !file.ToLower().Contains(@"\obj\") && 113 | !file.ToLower().Contains(@"\properties\")) 114 | { 115 | try 116 | { 117 | projectItem.ContainingProject.ProjectItems.AddFromFile(file); 118 | } 119 | catch { } 120 | } 121 | } 122 | } 123 | } 124 | 125 | public void RunFinished() 126 | { 127 | 128 | } 129 | 130 | public void RunStarted(object automationObject, Dictionary replacementsDictionary, 131 | WizardRunKind runKind, object[] customParams) 132 | { 133 | #if DEBUG 134 | TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true; 135 | #endif 136 | 137 | try 138 | { 139 | //telProps.Add("generator-version", Utility.InstalledGeneratorVersion.ToString()); 140 | //telemetry.Context.Operation.Id = telOpCtx.ToString(); 141 | 142 | //if (Utility.InstalledGeneratorVersion == new Version(0, 0)) 143 | //{ 144 | // throw new Exception("Yeoman generator not found"); 145 | //} 146 | 147 | inputForm = new AddItemForm() 148 | { 149 | //GeneratorVersion = Utility.InstalledGeneratorVersion 150 | }; 151 | inputForm.Initialize(); 152 | inputForm.ShowDialog(); 153 | 154 | formCancel = inputForm.FormCancel; 155 | 156 | if (!formCancel) 157 | { 158 | componentName = inputForm.ComponentName; 159 | componentDescription = inputForm.ComponentDescription; 160 | commandString = inputForm.CommandString; 161 | showWindow = inputForm.ShowWindow; 162 | 163 | telProps.Add("framework", inputForm.Framework); 164 | telProps.Add("componentType", inputForm.ComponentType); 165 | telProps.Add("extensionType", inputForm.ExtensionType); 166 | 167 | try 168 | { 169 | replacementsDictionary.Remove("$ComponentName$"); 170 | replacementsDictionary.Remove("$ComponentDescription$"); 171 | replacementsDictionary.Remove("$CommandString$"); 172 | } 173 | catch { } 174 | 175 | replacementsDictionary.Add("$ComponentName$", componentName); 176 | replacementsDictionary.Add("$ComponentDescription$", componentDescription); 177 | replacementsDictionary.Add("$CommandString$", commandString); 178 | } 179 | } 180 | catch (Exception ex) 181 | { 182 | MessageBox.Show(ex.ToString()); 183 | } 184 | } 185 | 186 | public bool ShouldAddProjectItem(string filePath) 187 | { 188 | return true; 189 | } 190 | } 191 | 192 | //public partial class WebPartInputForm : Form 193 | //{ 194 | // private static string componentName; 195 | // private static string componentDescription; 196 | // private static string framework = "none"; 197 | // private static string commandString; 198 | // private static string showWindow; 199 | // private static bool formCancel = false; 200 | // private bool genVersion; 201 | // private string _command = string.Empty; 202 | // private ComboBox _framework; 203 | // private TextBox _componentName; 204 | // private TextBox _componentDescription; 205 | // private TextBox _commandString; 206 | // private Button button1; 207 | // private Button button2; 208 | // private CheckBox _showWindow; 209 | // ResourceManager rm = new ResourceManager("Framework.VSIX.Resources.Global", Assembly.GetExecutingAssembly()); 210 | 211 | 212 | // public WebPartInputForm() 213 | // { 214 | // genVersion = Utility.CheckGeneratorVersion(Global.Yeoman_Generator_ExtensionsVersion); 215 | // _command = genVersion == true ? Global.Yeoman_Item_CommandString_Extensions : Global.Yeoman_Item_CommandString; 216 | 217 | // this.Size = new System.Drawing.Size(600, 450); 218 | // this.Name = Global.Form_Item_Name; 219 | // this.Text = Global.Form_Item_Title; 220 | // this.Icon = Global.Extension; 221 | 222 | // TabControl tabCtrl = new TabControl 223 | // { 224 | // Name = "ConfigTabControl", 225 | // Width = 600, 226 | // Height = 350 227 | // }; 228 | 229 | // TabPage tabProps = new TabPage 230 | // { 231 | // Name = "ConfigTabPageProps", 232 | // Text = Global.Form_PropertyTab_Title, 233 | // Height = 350, 234 | // Width = 600 235 | // }; 236 | // tabProps.Click += TabProps_Click; 237 | 238 | // Label _label3 = new Label 239 | // { 240 | // Location = new System.Drawing.Point(10, 20), 241 | // Size = new System.Drawing.Size(200, 20), 242 | // Text = Global.Form_ComponentName 243 | // }; 244 | // tabProps.Controls.Add(_label3); 245 | 246 | // _componentName = new TextBox 247 | // { 248 | // Location = new System.Drawing.Point(10, 40), 249 | // Size = new System.Drawing.Size(400, 20) 250 | // }; 251 | // _componentName.TextChanged += _componentName_TextChanged; 252 | // tabProps.Controls.Add(_componentName); 253 | 254 | // Label _label2 = new Label 255 | // { 256 | // Location = new System.Drawing.Point(10, 70), 257 | // Size = new System.Drawing.Size(200, 20), 258 | // Text = Global.Form_Framework 259 | // }; 260 | // tabProps.Controls.Add(_label2); 261 | 262 | // _framework = new ComboBox 263 | // { 264 | // Location = new System.Drawing.Point(10, 90), 265 | // Size = new System.Drawing.Size(150, 20), 266 | // Enabled = genVersion == true ? true : false 267 | // }; 268 | 269 | // Dictionary comboSource = new Dictionary(); 270 | // comboSource.Add("none", "none"); 271 | // comboSource.Add("react", "react"); 272 | // comboSource.Add("knockout", "knockout"); 273 | 274 | // _framework.DataSource = new BindingSource(comboSource, null); 275 | // _framework.DisplayMember = "Value"; 276 | // _framework.ValueMember = "Key"; 277 | // _framework.SelectedIndexChanged += _framework_SelectedIndexChanged; 278 | 279 | // tabProps.Controls.Add(_framework); 280 | 281 | // Label _label4 = new Label 282 | // { 283 | // Location = new System.Drawing.Point(10, 120), 284 | // Size = new System.Drawing.Size(200, 20), 285 | // Text = Global.Form_ComponentDescription 286 | // }; 287 | // tabProps.Controls.Add(_label4); 288 | 289 | // _componentDescription = new TextBox 290 | // { 291 | // Location = new System.Drawing.Point(10, 140), 292 | // Size = new System.Drawing.Size(400, 20) 293 | // }; 294 | // _componentDescription.TextChanged += _componentDescription_TextChanged; 295 | // tabProps.Controls.Add(_componentDescription); 296 | 297 | // tabCtrl.Controls.Add(tabProps); 298 | 299 | // TabPage tabAdv = new TabPage 300 | // { 301 | // Name = "ConfigTabPageAdvanced", 302 | // Text = Global.Form_AdvancedTab_Title, 303 | // Height = 350, 304 | // Width = 600 305 | // }; 306 | // tabAdv.Click += TabAdv_Click; 307 | 308 | // Label _label6 = new Label 309 | // { 310 | // Location = new System.Drawing.Point(10, 20), 311 | // Size = new System.Drawing.Size(200, 20), 312 | // Text = Global.Form_CommandString 313 | // }; 314 | // tabAdv.Controls.Add(_label6); 315 | 316 | // _commandString = new TextBox 317 | // { 318 | // Location = new System.Drawing.Point(10, 40), 319 | // Size = new System.Drawing.Size(560, 200), 320 | // Multiline = true, 321 | // ScrollBars = ScrollBars.Vertical, 322 | // Text = genVersion == true ? string.Format(_command, componentName, componentDescription, framework) : string.Format(_command, componentName, componentDescription) 323 | // }; 324 | // tabAdv.Controls.Add(_commandString); 325 | 326 | // Label _label7 = new Label 327 | // { 328 | // Location = new System.Drawing.Point(10, 245), 329 | // Size = new System.Drawing.Size(500, 40), 330 | // Text = Global.Form_AdvancedTab_CommandDescription, 331 | // MaximumSize = new System.Drawing.Size(500, 40), 332 | // AutoSize = true 333 | // }; 334 | // tabAdv.Controls.Add(_label7); 335 | 336 | // _showWindow = new CheckBox 337 | // { 338 | // Location = new System.Drawing.Point(10, 270), 339 | // Checked = false, 340 | // Text = Global.Form_ShowCommandWindow, 341 | // AutoSize = true 342 | // }; 343 | // tabAdv.Controls.Add(_showWindow); 344 | 345 | // tabCtrl.TabPages.Add(tabAdv); 346 | 347 | // this.Controls.Add(tabCtrl); 348 | 349 | // button1 = new Button 350 | // { 351 | // Location = new System.Drawing.Point(10, 360), 352 | // Size = new System.Drawing.Size(100, 25), 353 | // Text = Global.Form_ButtonGenerate, 354 | // Enabled = false 355 | // }; 356 | // button1.Click += button1_Click; 357 | 358 | // this.Controls.Add(button1); 359 | 360 | // button2 = new Button 361 | // { 362 | // Location = new System.Drawing.Point(475, 360), 363 | // Size = new System.Drawing.Size(100, 25), 364 | // Text = Global.Form_ButtonCancel 365 | // }; 366 | // button2.Click += Button2_Click; 367 | // this.Controls.Add(button2); 368 | 369 | // Label _label5 = new Label 370 | // { 371 | // Location = new System.Drawing.Point(10, 390), 372 | // Size = new System.Drawing.Size(500, 20), 373 | // Text = Global.Form_Footer_GeneratorText 374 | // }; 375 | // this.Controls.Add(_label5); 376 | 377 | // } 378 | 379 | // private void SetCommandText() 380 | // { 381 | // _commandString.Text = genVersion == true ? string.Format(_command, componentName, componentDescription, framework) : string.Format(_command, componentName, componentDescription); 382 | // } 383 | 384 | // private void Button2_Click(object sender, EventArgs e) 385 | // { 386 | // formCancel = true; 387 | // this.Close(); 388 | // } 389 | 390 | // private void TabAdv_Click(object sender, EventArgs e) 391 | // { 392 | 393 | // } 394 | 395 | // private void _framework_SelectedIndexChanged(object sender, EventArgs e) 396 | // { 397 | // framework = ((KeyValuePair)_framework.SelectedItem).Key; 398 | // SetCommandText(); 399 | // SetSubmitState(); 400 | // } 401 | 402 | // private void _componentDescription_TextChanged(object sender, EventArgs e) 403 | // { 404 | // componentDescription = _componentDescription.Text; 405 | // SetCommandText(); 406 | // SetSubmitState(); 407 | // } 408 | 409 | // private void _componentName_TextChanged(object sender, EventArgs e) 410 | // { 411 | // componentName = _componentName.Text; 412 | // SetCommandText(); 413 | // SetSubmitState(); 414 | // } 415 | 416 | // private void TabProps_Click(object sender, EventArgs e) 417 | // { 418 | 419 | // } 420 | 421 | // public static string Framework 422 | // { 423 | // get 424 | // { 425 | // return framework; 426 | // } 427 | // set 428 | // { 429 | // framework = value; 430 | // } 431 | // } 432 | 433 | // public static string ComponentName 434 | // { 435 | // get 436 | // { 437 | // return componentName; 438 | // } 439 | // set 440 | // { 441 | // componentName = value; 442 | // } 443 | // } 444 | 445 | // public static string ComponentDescription 446 | // { 447 | // get 448 | // { 449 | // return componentDescription; 450 | // } 451 | // set 452 | // { 453 | // componentDescription = value; 454 | // } 455 | // } 456 | 457 | // public static string CommandString 458 | // { 459 | // get { return commandString; } 460 | // set { commandString = value; } 461 | // } 462 | 463 | // public static string ShowWindow 464 | // { 465 | // get { return showWindow; } 466 | // set { showWindow = value; } 467 | // } 468 | 469 | // public static bool FormCancel 470 | // { 471 | // get { return formCancel; } 472 | // set { formCancel = value; } 473 | // } 474 | 475 | // protected void button1_Click(object sender, EventArgs e) 476 | // { 477 | // componentName = _componentName.Text; 478 | // framework = ((KeyValuePair)_framework.SelectedItem).Key; 479 | // componentDescription = _componentDescription.Text; 480 | // commandString = _commandString.Text; 481 | // showWindow = _showWindow.Checked == true ? "true" : "false"; 482 | // this.Close(); 483 | // } 484 | 485 | // protected void SetSubmitState() 486 | // { 487 | // if (!string.IsNullOrWhiteSpace(_componentName.Text) && !string.IsNullOrWhiteSpace(_componentDescription.Text)) 488 | // button1.Enabled = true; 489 | // } 490 | //} 491 | } 492 | -------------------------------------------------------------------------------- /Framework.VSIX/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Framework.VSIX/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | Getting Started 9 | 10 | 11 | 12 |
13 | 17 | 18 |
19 |
20 |

Creating a Visual Studio Extension

21 | 22 |

This project enables developers to create an extension for Visual Studio. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.

23 |

Add new features

24 | 25 |
    26 |
  1. Right-click the project node in Solution Explorer and select Add>New Item.
  2. 27 |
  3. In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.
  4. 28 |
  5. Choose from the available item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Command, Tool Window, Toolbox Control, and then click Add.
  6. 29 |
30 | 31 |

The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add additional item templates.

32 | 33 |

Run and debug

34 |

To run the project, press F5. Visual Studio will:

35 | 36 |
    37 |
  • Build the extension from the VSIX project.
  • 38 |
  • Create a VSIX package from the VSIX project.
  • 39 |
  • When debugging, start an experimental instance of Visual Studio with the VSIX package installed.
  • 40 |
41 | 42 |

In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.

43 | 44 |
45 |
46 |
47 |

Visual Studio Extensibility Resources

48 | 49 |
    50 |
  1. MSDN documentation
    Detailed documentation and API reference material for building extensions.
  2. 51 |
  3. Extension samples on GitHub
    Use a sample project to kickstart your development.
  4. 52 |
  5. Extensibility chat room on Gitter
    Meet other extension developers and exchange tips and tricks for extension development.
  6. 53 |
  7. Channel 9 videos on extensibility
    Watch videos from the product team on Visual Studio extensibility.
  8. 54 |
  9. Extensibility Tools 2015
    Install an optional helper tool that adds extra IDE support for extension authors.
  10. 55 |
56 |

Give us feedback

57 | 60 |
61 |
62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /Framework.VSIX/key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.VSIX/key.snk -------------------------------------------------------------------------------- /Framework.VSIX/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Framework.VSIX/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SPFx Project Template 6 | New SharePoint Framework Project. 7 | https://github.com/SharePoint/sp-dev-fx-vs-extension 8 | License.txt 9 | https://github.com/SharePoint/sp-dev-fx-vs-extension/wiki/Getting-Started 10 | Resources\Extension.ico 11 | Framework.VSIX.ico 12 | SharePoint Framework 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Framework.VSIX/stylesheet.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | border: 0; 5 | color: #1E1E1E; 6 | font-size: 13px; 7 | font-family: "Segoe UI", Helvetica, Arial, sans-serif; 8 | line-height: 1.45; 9 | word-wrap: break-word; 10 | } 11 | 12 | /* General & 'Reset' Stuff */ 13 | 14 | 15 | .container { 16 | width: 980px; 17 | margin: 0 auto; 18 | } 19 | 20 | section { 21 | display: block; 22 | margin: 0; 23 | } 24 | 25 | h1, h2, h3, h4, h5, h6 { 26 | margin: 0; 27 | } 28 | 29 | /* Header,
30 | header - container 31 | h1 - project name 32 | h2 - project description 33 | */ 34 | 35 | #header { 36 | color: #FFF; 37 | background: #68217a; 38 | position:relative; 39 | } 40 | #hangcloud { 41 | width: 190px; 42 | height: 160px; 43 | background: url("../images/bannerart03.png"); 44 | position: absolute; 45 | top: 0; 46 | right: -30px; 47 | } 48 | h1, h2 { 49 | font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; 50 | line-height: 1; 51 | margin: 0 18px; 52 | padding: 0; 53 | } 54 | #header h1 { 55 | font-size: 3.4em; 56 | padding-top: 18px; 57 | font-weight: normal; 58 | margin-left: 15px; 59 | } 60 | 61 | #header h2 { 62 | font-size: 1.5em; 63 | margin-top: 10px; 64 | padding-bottom: 18px; 65 | font-weight: normal; 66 | } 67 | 68 | 69 | #main_content { 70 | width: 100%; 71 | display: flex; 72 | flex-direction: row; 73 | } 74 | 75 | 76 | h1, h2, h3, h4, h5, h6 { 77 | font-weight: bolder; 78 | } 79 | 80 | #main_content h1 { 81 | font-size: 1.8em; 82 | margin-top: 34px; 83 | } 84 | 85 | #main_content h1:first-child { 86 | margin-top: 30px; 87 | } 88 | 89 | #main_content h2 { 90 | font-size: 1.4em; 91 | font-weight: bold; 92 | } 93 | p, ul { 94 | margin: 11px 18px; 95 | } 96 | 97 | #main_content a { 98 | color: #06C; 99 | text-decoration: none; 100 | } 101 | ul { 102 | margin-top: 13px; 103 | margin-left: 18px; 104 | padding-left: 0; 105 | } 106 | ul li { 107 | margin-left: 18px; 108 | padding-left: 0; 109 | } 110 | #lpanel { 111 | width: 620px; 112 | float: left; 113 | } 114 | #rpanel ul { 115 | list-style-type: none; 116 | width: 300px; 117 | } 118 | #rpanel ul li { 119 | line-height: 1.8em; 120 | } 121 | #rpanel { 122 | background: #e7e7e7; 123 | width: 360px; 124 | float: right; 125 | } 126 | 127 | #rpanel div { 128 | width: 300px; 129 | } 130 | -------------------------------------------------------------------------------- /Framework.VSIX/yeoman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.VSIX/yeoman.png -------------------------------------------------------------------------------- /Framework.WebPart.Item/Framework.WebPart.Item.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 15.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 12 | {5A1EA45F-0433-4596-A21C-26CEBBE333F4} 13 | Library 14 | Properties 15 | Framework.WebPart.Item 16 | Framework.WebPart.Item 17 | v4.5.2 18 | 512 19 | false 20 | false 21 | false 22 | false 23 | false 24 | false 25 | false 26 | false 27 | false 28 | false 29 | 30 | 31 | true 32 | full 33 | false 34 | bin\Debug\ 35 | DEBUG;TRACE 36 | prompt 37 | 4 38 | 39 | 40 | pdbonly 41 | true 42 | bin\Release\ 43 | TRACE 44 | prompt 45 | 4 46 | 47 | 48 | 49 | False 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Office/SharePoint\SharePoint Framework 66 | 67 | 68 | 69 | 70 | 77 | -------------------------------------------------------------------------------- /Framework.WebPart.Item/Framework.WebPart.Item.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.WebPart.Item/Framework.WebPart.Item.ico -------------------------------------------------------------------------------- /Framework.WebPart.Item/Framework.WebPart.Item.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | SPFx Item 5 | SharePoint Framework Item 6 | Framework.WebPart.Item.ico 7 | db2af22d-5451-4039-942c-ba6306d26d68 8 | CSharp 9 | 2.0 10 | 1 11 | MySPFxItem 12 | true 13 | 14 | 15 | WebPart.log 16 | 17 | 18 | 19 | 20 | 21 | 22 | Framework.VSIX, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=32dc2f71f129b85d 23 | Framework.VSIX.WebPartItemWizard 24 | 25 | -------------------------------------------------------------------------------- /Framework.WebPart.Item/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Framework.WebPart.Item")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Eric Shupps")] 12 | [assembly: AssemblyProduct("Framework.WebPart.Item")] 13 | [assembly: AssemblyCopyright("Copyright © Eric Shupps 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5a1ea45f-0433-4596-a21c-26cebbe333f4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.4")] 36 | [assembly: AssemblyFileVersion("1.0.0.4")] 37 | -------------------------------------------------------------------------------- /Framework.WebPart.Item/WebPart.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.WebPart.Item/WebPart.log -------------------------------------------------------------------------------- /Framework.WebPart/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("$projectname$")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("$registeredorganization$")] 12 | [assembly: AssemblyProduct("$projectname$")] 13 | [assembly: AssemblyCopyright("Copyright $year$")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("$guid1$")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Framework.WebPart/Framework.WebPart.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 15.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 12 | {7C698161-B9FA-411A-9240-4AC26E91325C} 13 | Library 14 | Properties 15 | Framework.WebPart 16 | Framework.WebPart 17 | v4.5.2 18 | 512 19 | false 20 | false 21 | false 22 | false 23 | false 24 | false 25 | false 26 | false 27 | false 28 | false 29 | 30 | 31 | true 32 | full 33 | false 34 | bin\Debug\ 35 | DEBUG;TRACE 36 | prompt 37 | 4 38 | 39 | 40 | pdbonly 41 | true 42 | bin\Release\ 43 | TRACE 44 | prompt 45 | 4 46 | 47 | 48 | 49 | False 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Designer 63 | Office/SharePoint\SharePoint Framework 64 | 65 | 66 | 67 | 68 | Designer 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 85 | -------------------------------------------------------------------------------- /Framework.WebPart/Framework.WebPart.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.WebPart/Framework.WebPart.ico -------------------------------------------------------------------------------- /Framework.WebPart/Framework.WebPart.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | SPFx Project 5 | SharePoint Framework Project 6 | Framework.WebPart.ico 7 | CSharp 8 | 2.0 9 | 1000 10 | 257cf6a8-0a18-454a-a767-79aadef96d09 11 | true 12 | MySPFxProject 13 | true 14 | 1 15 | 16 | 17 | 18 | AssemblyInfo.cs 19 | generator.log 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | Framework.VSIX, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=32dc2f71f129b85d 30 | Framework.VSIX.FrameworkProjectWizard 31 | 32 | -------------------------------------------------------------------------------- /Framework.WebPart/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Framework.WebPart")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Framework.WebPart")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.5")] 33 | [assembly: AssemblyFileVersion("1.0.0.5")] 34 | -------------------------------------------------------------------------------- /Framework.WebPart/WebPart.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | $guid1$ 9 | Library 10 | bin\Debug\ 11 | Properties 12 | $safeprojectname$ 13 | $safeprojectname$ 14 | v$targetframeworkversion$ 15 | 512 16 | Program 17 | C:\Windows\System32\cmd.exe 18 | /K gulp serve 19 | 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | Program 30 | C:\Windows\System32\cmd.exe 31 | /K gulp serve 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Framework.WebPart/generator.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pnp/sp-dev-fx-vs-extension/4a3693b36113fdd6d930d4a7c9c4db0faa7862f8/Framework.WebPart/generator.log -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Microsoft SharePoint 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Visual Studio extension for SharePoint Framework projects 2 | The SharePoint Framework introduces a new set of tools for client-side web development that may be unfamiliar for many enterprise developers and which may not fit well with existing ALM processes, especially those tightly integrated with Team Foundation Server and IDE extensions. This repository contains the source code and releases of a Visual Studio extension for SharePoint Framework that integrates the traditional solution, build, debug and project management tools of Visual Studio with open-source tools like Node.js, Gulp and Yeoman generators. Creating new Framework projects is now as easy as selecting File > New > Project, just like any standard MVC, Web API or ASP.NET application. 3 | 4 | The Visual Studio Extension for SharePoint Framework wraps the command-line UI of the Microsoft Yeoman Generator (yo @microsoft/sharepoint) into a familiar Windows Forms experience, executes the generator project scaffolding behind the scenes and creates a Visual Studio project that includes all the necessary files for a complete web part project. Also included is a web part item template for adding new web parts to an existing Framework project. Developers can launch the Workbench local sandbox environment to test their web parts by pressing F5 or by binding to the Gulp Serve event in the Task Runner Explorer. For developers who wish to dive deeper and learn more about the new web development toolchain used by the Framework, the Advanced mode provides full access to the Yeoman generator command parameters and an optional cmd.exe window to view the generator tasks in real time. 5 | 6 | # Additional resources 7 | 8 | * [Overview of the SharePoint Framework](http://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview) 9 | * [SharePoint Framework development tools and libraries](http://dev.office.com/sharepoint/docs/spfx/tools-and-libraries) 10 | * [SharePoint Framework Reference](https://sharepoint.github.io/) 11 | 12 | # Installation 13 | 14 | ## Pre-requisites 15 | 16 | * [Set up your Office 365 tenant](https://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant) 17 | * [Set up your development environment](https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment) 18 | * Install the extension in Visual Studio: 19 | * Download the .vsix file from the repo [Releases page](../../releases/latest) or from the [Visual Studio Extension Gallery](https://marketplace.visualstudio.com/items?itemName=SharePointPnP.SPFxProjectTemplate) 20 | * Ensure Visual Studio is closed 21 | * Double-click on the downloaded .vsix file 22 | * Follow the installation prompts 23 | * Restart Visual Studio when the installer has completed 24 | 25 | # Getting Started 26 | A template named 'SPFx Web Part Project' is added to the template list in Visual Studio. Select this template to invoke a wizard that runs the Yeoman generator and creates the project. Additional web parts can be added to an existing solution using the "Add New Item" menu options. 27 | 28 | Additional details are in the [Getting Started guide](../../wiki/Getting-Started). 29 | 30 | ![SPFx Web Part Project Template in VS2017/2019](https://github.com/SharePoint/sp-dev-fx-vs-extension/wiki/images/VS2015new.png) 31 | 32 | ![Custom Project Configuration Wizard](http://www.ericshupps.com/wp-content/uploads/2019/03/spfx-vs-extension-properties.png) 33 | 34 | NOTE: An issue exists in the SPFx Yeoman Generator that prevents specific values from being set as command-line arguments. The issue has been raised to the product team and [remains open](https://github.com/SharePoint/sp-dev-docs/issues/3042). Until it is fixed, we cannot resolve the problem within the extension so we have added instructions to the UI when the affected options are selected on how to supply the correct values in the generated project files. 35 | 36 | ## Contributions 37 | 38 | We welcome your input on issues and suggestions for new features. We are also interested in community contributions to enhance and expand the capabilities of the extension. Let us know if you have any questions or comments. 39 | 40 | Please have a look on our [Contribution Guidance](./.github/CONTRIBUTING.md) before submitting your pull requests, so that we can get your contribution processed as fast as possible. Thanks! 41 | 42 | > Sharing is caring! 43 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | pull_requests: 3 | do_not_increment_build_number: true 4 | skip_non_tags: true 5 | image: Visual Studio 2017 6 | configuration: Release 7 | platform: Any CPU 8 | before_build: 9 | - ps: >- 10 | Write-Host "$env:APPVEYOR_REPO_TAG_NAME" 11 | 12 | $manPath = Resolve-Path .\Framework.VSIX\source.extension.vsixmanifest 13 | 14 | [Xml] $manifest = Get-Content $manPath 15 | 16 | $manifest.PackageManifest.Metadata.Identity.Version = "$env:APPVEYOR_REPO_TAG_NAME" 17 | 18 | $manifest.Save($manPath) 19 | 20 | 21 | nuget restore 22 | build: 23 | verbosity: minimal 24 | artifacts: 25 | - path: Framework.VSIX\bin\$(configuration)\Framework.VSIX.vsix 26 | deploy: 27 | - provider: GitHub 28 | release: v$(APPVEYOR_REPO_TAG_NAME) 29 | description: 'Release description' 30 | auth_token: 31 | secure: zK12v9qF0HKPG0fqWlWh8nEnjXQFRTsYXm4HTNCIFMwKlcKgfEGesEpe1uPlqMIt 32 | artifact: Framework.VSIX\bin\$(configuration)\Framework.VSIX.vsix 33 | draft: true 34 | prerelease: false 35 | on: 36 | branch: master 37 | appveyor_repo_tag: true --------------------------------------------------------------------------------