ligershark / side-waffle Goto Github PK
View Code? Open in Web Editor NEWA collection of Item- and Project Templates for Visual Studio
License: Other
A collection of Item- and Project Templates for Visual Studio
License: Other
How to embed new javascript library like twitter-bootstrap javascript library in xxxExtension.js as jquery and signalR are there?
Simply, I want to use bootstrap.js in xxxExtension.js.
Currently the Item Template and Project Template creation process is not incremental. It should be.
Currently we have a convention which allows users to easily place templates in locations such as Visual C#\Web\SideWaffle
. In some cases it would make more sense to fully control the location where the template will be created.
We should have a mechanism where it's easy to control this fully.
Items under ItemTemplates\Web_Samples are included in the compiled VSIX
Currently when we go through the CreateTemplateTask
to generate the fully expanded .vstemplate file we use the MSBuild APIs to load the project file and to get the list of files that it contains.
This requires that all the template dependencies (i.e. .targets files) are on disk.
We should update the CreateTemplateTask so that the .targets files are not required. We should see if @mlorbetske PR on TemplateBuilder ligershark/template-builder#38. That may introduce other issues though (what if the Include value has a property in it?).
If the MSBuild.Construction namespace doesn't help us here, then we may need to fall back to a standard XML reader.
In the current workflow users have to copy their source projects and paste them into a template pack project. It would be much better if users could have a project template created via a project reference.
We should add support for creating Project Templates. Below are some details on how we can implement this.
The support for Project Templates should be consistent with that of creating Item Templates.
Project templates will be defined under the /ProjectTemplates
folder. Each project template will be defined in its own folder. The folder must contain the following files.
Project Name\
<files that the project contains>
Definitions\
CSharp.vstemplate --> If you want the template to show up for C# projects
VB.vstemplate --> If you want the template to show up for VB projects
The tree node in the Add New Project dialog will be determined similarly to how Item Templates work. The name of the first folder under the ProjectTemplates
folder will be the name of the node. Only 1 level of nesting is supported. All other sub folders will be ignored.
The template report is not including TemplateReference projects.
When building the .vsix it would be good to see a report which included the following details:
Depends on the template-builder feature ligershark/template-builder#22
Currently the side-waffle item templates are not available in Visual Studio node.js Projects. (Project file Extension .njsproj)
see http://nodejstools.codeplex.com/
Is it possible to support this project type as well?
<ProjectTypeGuids>
{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};
{349c5851-65df-11da-9384-00065b846f21};
{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}
</ProjectTypeGuids>
We need to make sure that SideWaffle templates doesn't show up above the built-in templates in the Add New Item dialog. Sort order should probably be 5000 and we might want to look at creating groups as well
With the new method we have for create project templates via a reference the only way that your project template can have a custom icon is to include that file as a part of the project. This is because we get the list of files to copy from the project file itself.
We should add an item group that has a list of extensions for files that should always be copied over to the dest. It should be pre-populated with standard image file extensions.
This is blocking #87
Currently outputs from referenced projects that are built into a project template are included in the final .vsix. This should be prevented. We should also have an MSBuild property to override this default behavior.
We now have support for snippets, but we need a few minor changes. For .snippet files under the Snippets
folder we should ensure the following are true:
Related to: ligershark/template-builder#21
Step.
"Browser Link Extension (simple)" project template has not this problem.
Creating project templates is still too hard. Ideally we want to get to the point where users can continue to load the .csproj file in VS and F5 the project to test it out. There are two challenges here:
$safeitemname$
Using the _preprocess.xml we should be able to preserve all the standard text in the files. Now the gap that remains is the handling of the files listed in .csproj/.vbproj.
The flow that we want to light up is the following:
ProjectTemplates\
_preprocess.xml
file(s) as needed to perform replacementsFrom that point forward users should be able to continue partying on the .csproj file as they normally would and then when
Add a WebJobs console project template
We should update the Chrome templates to hook up CTRL+F5,F5. Since we are hacking the web project system here this may not be 100% reliable but if we can come up with a solution for 80% of cases that would be nice.
Currently all of the templates are showing up under the Web
node in the Add New Item dialog.
Better than this is to use the directory structure for the name of the node. We can base it on the first folder under ItemTemplates
For example if you have some files under ItemTemplates\Web
they will show up in the Web node. Similarly if you have ItemTemplates\WPF
then they will show up under the WPF node.
Note: any folder structure under the first folder is ignored.
FYI template-builder now has this support
As a consequence of overloading the concept of ProjectReference for a project template all the outputs of these projects are now being placed into the .vsix itself.
This is bad for a number of reasons.
Instead of ProjectReference we should change this to something else. Eventually we should create tooling for this as well.
This is impacting #87
We should have a right-click menu option Add->Template Reference when the user invokes this he will see a dialog that show the projects loaded in the solution. When the user picks an item we should create the following item in the project file.
<TemplateReference Include="..path\MyProj.csproj" />
@madskristensen can you help here? Could you add the Add->Template Reference gesture and the UI to pick the project? You could reuse most of what you created for webjobs here. If you handle the UI then I can go in and implement the MSBuild code to update the project.
With the new technique that we have for project templates if a user has custom Wizard elements they are removed when the .vsix is generated. We should preserve all custom elements. See the repro at https://github.com/dmohl/FSharpCommunityTemplates/blob/master/VisualStudio/ServiceStack/ServiceStackSelfHost/_definitions/_project.vstemplate.xml.
With VS2013 you can customize the views/controllers (all files) which are generated by the New Scaffolded Item dialog. To do this you need to copy files from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates
to the local project. It would be nice to have these inside of an item template so that they can be easily added to an existing project.
We should split out the files based on VB/C#.
I would do it, but in order to develop for the Visual Studio SDK a Pro or higher edition is required. The HotTowel extension from Mr. John Papa is available so I guess is possible.
For templates that don't use C# or VB, such as JavaScript, it would be nice if you could put them in their own category.
For example, even if I'm not using one of the SideWaffle item templates if I was creating my own PHP template, I'd like to be able to create a Web category and then create a PHP subcategory. I'd then put the template in that category.
If we use msbuild.exe from C:\Program Files (x86)\MSBuild\12.0\Bin
then the build will fail with the error below.
Workaround for now use msbuild.exe from C:\Windows\Microsoft.NET\Framework\v4.0.30319
.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: The "ValidateVsixManifest" task failed unexpectedly.\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities'
threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Settings.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities..cctor()\r [C:\Data\mycode\side-waffle\TemplatePack\Templ
atePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: --- End of inner exception stack trace ---\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.GetPathToVSInstallDir()\r [C:\Data\mycode\side-waffle\Tem
platePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.ValidateVsixManifestUtilities.ValidateVsix(TaskLoggingHelper log, String manifestTo
Validate, String vsixSchemaPath, String& name, String& id)\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: at Microsoft.VsSDK.Build.Tasks.ValidateVsixManifest.Execute()\r [C:\Data\mycode\side-waffle\TemplatePack\TemplateP
ack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\Data\mycod
e\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [C:\Data\mycode\side-waffle\Templ
atePack\TemplatePack.csproj]
When attempting to create a new project from the MultiProj template I get an error in visual studio:
Error: this template attempted to load component assembly 'TemplateBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates.
I've checked the documentation at:
http://msdn.microsoft.com/en-us/library/dd631936.aspx
But have found nothing.
It would be really nice if the was a Project Template for the SideWaffle Project Template
Steve
We should update the build logic to exclude folders starting with _Sample
from the build process when building on Release
mode.
When building in Debug
we should include all templates. This will make it easy to have samples in the repo for developers to reference while excluding them from released packages.
After integrating this be sure to build on Release mode before a release.
Related to: ligershark/template-builder#18
I keep having this error when i create a new NancyFX project template:
There is a circular dependency in the target dependency graph involving target "ls-DiscoverProjectTemplatesFromProjectReferences". TemplatePack
Any help?
With a previous commit we moved the templates temporary folder from obj\
to under %localappdata%
because it was suspected that VS was incorrectly picking up the .csproj when it was copied under obj\
. It turns out that the file is loaded even from %localappdata%
. We'll need to get to a real fix for that issue.
In the mean time we should move the temp folder back under obj\
because it will make it easier for folks who do run into the build issue to get around it.
Build.proj should pass through the TemplateBuilderTargets property to the MSBuild
task when building if it is specified. This makes testing with a different .targets file easier.
For single project templates we now support the ability to author a partial .vstemplate file and then have the build process fill in the Project
element with files and folders. Unfortunately multi-project templates cannot leverage this feature. We need a way for multi-project templates to get this same functionality.
We should update the support to check in the .targets file which performs all the item template/project template goodness. See the related discussion at sayedihashimi/slow-cheetah#113 as to why this is a good idea.
Related to: ligershark/template-builder#19
The .zip file is getting a little big. I tried VsixCompress a while back and it seemed to make the .zip file smaller. We should try again and then add it if the resulting .zip file is smaller.
The generated code is like:
interface Idirectives extends ng.IDirective {
directiveId: string;
}
interface IdirectivesScope extends ng.IScope {
greeting: string;
changeGreeting: () => void;
}
class directives implements Idirectives {
static directiveId: string = "directives";
restrict: string = "A";
constructor(private $window: ng.IWindowService) {
}
link(scope: IdirectivesScope, element, attrs) {
scope.greeting = "Hi!";
scope.changeGreeting = () => {
scope.greeting = "See ya!";
};
}
}
But I get an error from TypeScript like:
Class directives declares interface Idirectives but does not implement it: Type 'directives' is missing property 'directiveId' from type 'Idirectives'.
Is seems when adding a static property in the class does not implement the interface.
Create a sample showing an Item Template which creates more than one file during the create process.
With a previous commit we moved the templates temporary folder from obj\
to under %localappdata%
because it was suspected that VS was incorrectly picking up the .csproj when it was copied under obj\
. It turns out that the file is loaded even from %localappdata%
. We'll need to get to a real fix for that issue.
In the mean time we should move the temp folder back under obj\
because it will make it easier for folks who do run into the build issue to get around it.
We should have a simple workflow to test out changes to TemplateBuilder changes. When we run a build we'll need to update the following items.
We should update the name of the folder from Definitions
to _Defintions
. By doing this it will appear at the top of the list of folders/files.
Currently the templates are all showing up in the Web
node. It would be better to drop them in Web\SideWaffle
and have them also roll up to the Web
node.
We should create an item template that can be used to easily create new SideWaffle Item Templates.
We should have better support for multi-project templates.
The main issue that we have today is the usage of $safeprojectname$
. When there are multiple projects being created the value of ```$safeprojectname$ changes based on the project being created. This makes it difficult (impossible?) to create templates which create multiple projects.
To solve this we will create a custom wizards which introduces a new template parameter $saferootprojectname$
.
These wizards should be created in a new project in TemplateBuilder, and this assembly should be delivered in the TemplateBuilder NuGet package. Then we can reference this in SideWaffle and others who are creating template packs can use it as well.
Here are some notes from Imar Spaanjaars who prototyped this.
We will need two different wizards RootWizard
and ChildWizard
. RootWizard
is invoked by the main solution template
Added two IWizard implementations: RootWizard and ChildWizard. RootWizard is invoked by the main solution template (more on that later) and ChildWizard is invoked by each child project that opts in on it.
<Assets>
...
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="CustomWizards" Path="|CustomWizards|" AssemblyName="|CustomWizards;AssemblyName|" />
</Assets>
<WizardExtension>
<Assembly>CustomWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly>
<FullClassName>CustomWizards.RootWizard</FullClassName>
</WizardExtension>
<WizardExtension>
<Assembly>CustomWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly>
<FullClassName>CustomWizards.ChildWizard</FullClassName>
</WizardExtension>
This is an opt-in model so you can skip this for separate projects that don't need the root namespace.
using $saferootprojectname$.Model;
namespace $saferootprojectname$.Web {
and another one from the references in the Web.csproj:
<ItemGroup>
<ProjectReference Include="..\$saferootprojectname$.Model\$saferootprojectname$.Model.csproj">
<Project>{86b92706-ef8d-4894-8a0a-5a13aabd1012}</Project>
<Name>$saferootprojectname$.Model</Name>
</ProjectReference>
</ItemGroup>
It works, but I sure wish this stuff was a little easier. File | Export Solution to Template would be nice ;-)
You can download my work in progress here:
http://imar.spaanjaars.com/Downloads/Other/SideWaffle/side-waffle-master.zip
Any questions: fire away.
Imar
When we clean the files in the intermediate obj folder are not deleted. This may cause issues when a file is removed from the source.
We need to enable full support for F# templates.
Depends on ligershark/template-builder#25
We should move the TemplateBuilder code from https://github.com/ligershark/template-builder directly into the SideWaffle repo. We should keep the NuGet package split out so that users can still create their own template packs, but all the code will be in the same repo.
This will make it easier for development as well as tracking history.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.