microsoft / vsprojectsystem Goto Github PK
View Code? Open in Web Editor NEWDocumentation for extending Visual Studio with new types of projects.
License: Other
Documentation for extending Visual Studio with new types of projects.
License: Other
Now with the image monikers used by the image service in Dev14, we should lead customers to the docs that describe how to convert their ICO file to the image service to get an image moniker back.
This will be particularly relevant to the IProjectTreeModifier extension.
Look for onenote:
or http://index/
links
In C# embedded resources tend to take on a namespace based on the RootNamespace
project property, concatenated with the folder structure within which the resource is found in the project source tree.
XamlPropertyRule is configured by default to drop all generated code into RootNamespace
directly. We should fix this to match other C# behavior.
After #64 was merged, I found a couple issues with it. This issue tracks fixing those.
What is the best method to add item templates to sub-levels of a Project Type? As an example, I want to have the following structure below when right-clicking my project > Add > New Item...:
Installed
----Boo
--------Scripts
------------Hoo
------------Casper
So when I click the Casper sub-level, it will show the different item templates included for Casper. How would you add the sub-level and its items? Any docs/links to help?
When creating a CPS Project Type project and running in VS hive, there is a PowerShell installed template and a few related item templates to select. This is also the same when right-clicking the project to add new item.
Is there a way to hide the PowerShell items in your Project Type project? If so, any docs/steps to do so?
Thanks
We should at least consider:
Are there any plans to provide a roadmap for this project? I believe this is a really good start, but it seems there would be more transparency on related topics since this is the future extension foundation. Below are a few examples I could quickly think of (in no particular order).
I understand this is extra work for the team to include during regular work, but would be very helpful. Thanks again and look forward to future releases :)
Currently the documentation is present as markdown files, It'd be a great idea if the same documents could have a beautiful web interface and be rendered via gh-pages
This capability would be declared for projects that have build authoring to read project.json and inject assembly references into the project at build time.
ASP.NET vNext invented this
Let's say I have a few folders added with a new Project Type project. As an example, it includes One, Two and Three. Is there a way to only show specific types of items templates to be added within a specific folder? A further detailed example... let's say the user right-clicked the One folder > Add > New Item... Within the Add New Item dialog, there would be specific templates that could be added (e.g. One.cs). And if the user did the same for Two folder, it would show a different list of items that could be added (e.g. Two.py). TIA
A MicroBuild NuGet package dependency was inadvertently added to the publicly released NuGet packages
We also are forcing a dependency on Nerdbank.GitVersioning
on people. :(
We should remove this (by adding developmentDependency="true"
to those entries of our packages.config files).
We should include a sample use of the ExportDynamicEnumValuesProviderAttribute
and how to activate the extension from the XAML rule file, including passing in parameters using <DynamicEnumProperty.ProviderSettings>
CPS never calls the following methods from IDynamicEnumValuesGenerator
AllowCustomValues
- when specifying false, the values it should not allow random strings
TryCreateEnumValueAsync
- when random string entered, it should be called in order to attempt to match the entered value against allowed values
Invalid links in the document https://github.com/Microsoft/VSProjectSystem/blob/master/doc/automation/add_a_source_item_with_specific_item_type.md
These defaults can be augmented.
2.Automatically add the item to Solution Explorer, DTE, and raise other appropriate events if indeed the item you're adding has an item type that belongs to the set of source item types.
Showing link for https://github.com/Microsoft/VSProjectSystem/blob/master/doc/automation/custom_item_types.md
First, thank you for making this information finally public! I've been trying to implement my own project system based on CPS with partial success, and this documentation is extremely helpful!
It would be awesome if you could make available a complete implementation of a project system to serve as reference. I propose the NuGet project system by @terrajobst, and if at all possible, aspnet vNext!
I'm working on a Exe project kind of project system, and I need Build disabled, but I do need debug targets, debug, configurations, per configuration property pages, and property pages working.
The shell can do some of this by checking the ADDVP_ExcludeFromBuild, but that only works for virtual projects, and virtual projects do not work with project factories. The other way is by querying IVsBuildableProjectCfg set of interfaces, and CPS has a way of disabling some of this thru the conditions on BuildableProjectConfig, which it disables if a project has the SharedAssetsProject capability. Adding this capability to my project disables the build, but also takes away debug and debug targets. Is there a way to make this not take away debug targets?
How would you add a custom context command for a specific file/folder in the Solution Explorer? As an example, let's say I right-click a file named (MyScript.py). I would like a custom command to only be shown if it was a specific file name (or possibly specific extension) in my project.
ASP.NET vNext invented this
If the source for the CPS were opened up, that would probably make it a lot easier to understand. And who knows, it might even lead to some improvements being contributed.
We need to fill in descriptions and add capabilities to this table.
At a high level, it's a really simple question. If I create a hypothetical language called B♭, and provide a B♭ compiler, what is the step-by-step list of things I need to do to get Visual Studio to create, load, and build a B♭ project? But trying to find answers cam be maddening!
It would be very nice if there was a tutorial that explained all of the necessary steps (and the "not strictly necessary but this would be helpful if you implemented it" steps, and clearly denoted which is which kind) to add support for a new language. Even nicer if it can be made to appear at or near the top of relevant Google searches, but one thing at a time, I suppose...
With my current basic knowledge about the Project Type, it appears this project is a form of project that can be added to a VSIX. Is it possible today (or planned later) to upload these types of projects to the Visual Studio? What would you need to do? Create a VSIX project in VS and add the project type project? Is there any documentation to do this today or is it in the roadmap? TIA
I added a new item type following the instructions here:
https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/contentitem_types.md
I modified the ProjectItemsSchema.xaml and .targets files.
I then added an item template as described in the referenced MSDN article.
However, I till don't see the item in the dialog.
Also, I couldn't find an example for this in the nuproj reference implementation.
The capitalization for the various item templates are not consistent. As an example, there is one for Custom Debugger Extension and one for Project Deploy extension. The capitalization for word 'extension' is different.
We should refer to CPS in the docs consistently with its new moniker of "Visual Studio project system" or "project system extensibility SDK".
Found another invalid link.
For the capability expression, please see Extensibility Points.
We have a lot of code snippets in the docs. We should change them all to use the ```csharp syntax so that they are colorized.
First of all, thank you for VSProjectSystem!
When I build it automatically copies the project's props, targets and rules to "%localappdata%/CustomProjectSystems/ProjectType1". The project file in the project template refers to that folder. So far, so good, everything works fine in exp instance.
The .vsix that gets created when I build doesn't have any of those build system files included. That's bad news :(
Will .vsix be extended to support deployment to "%localappdata%/CustomProjectSystems" ? There are some nice advantages to deploying as a .vsix, it would be nice to one day be able to use it! As a custom project type, deployment of msbuild files is the main thing that forces you to use .msi. I hope I'm wrong though :)
Rather than compiling sources, this project targets the DNX runtime.
Hi,
I'm trying to migrate my extension to Visual Studio 2015 RC and can't get IVsTrackProjectDocumentsEvents2.OnAfterRenameFiles working for folder rename/move actions in projects based on CPS(tried on ASP.NET vNext and JavaScript). Could you please confirm that it's a bug(in CPS itself or in its implementation in ASP.NET vNext, JavaScript) and will be fixed in RTM or
it's expected behavior of new project system and will remain in RTM?
Thanks.
Regards,
Nikita Govorov.
In the description field on the VS 2015 Debugger Launch Extension (https://visualstudiogallery.msdn.microsoft.com/7fe7f19f-ceb9-47e3-b440-c62df2b85281) it says 2013 rather than 2015
Currently if you click F4 (Properties) on a project's folder there will be no properties displayed even though I define xaml rule for Folder item type.
As we determined in the email thread it is not currently supported in CPS, but in csproj project folders do have their properties. So to have similar functionality we also would need to provide some properties for our folders.
I'm trying to disable the Reference folder in a project system that needs it both on or off depending on the value of a MSBUILD property, the capability is declared as such:
<ProjectCapability Condition="'$(DisableReferencesFolder)' != 'true'" Include="ReferencesFolder" />
That does not work, it seems that CPS does not evaluate the conditon, I also tried:
<ProjectCapability Include="ReferencesFolder" />
and later on:
<ProjectCapability Include="!ReferencesFolder" />
But that doesn't work either. Am I missing something, or is my syntax bad? Otherwise, is there a way to do it programmatically using the CPS OM?
I tried to follow the VS2013 to VS2015 porting instruction for dynamic-enum-provider and failed.
Isn't there anything extra required or this feature doesn't work in VS2015 RC yet?
My package is MEF-enabled. I apply ExportDynamicEnumValuesProvider
to class implementing IDynamicEnumValuesProvider
interface and nothing actually happens (when project with such a rule is loaded). However the same class works fine in VS2013 using Export
and DynamicEnumCategory
.
Project and provider implemenation can be found here.
Thanks
To reproduce:
1>------ Rebuild All started: Project: ProjectType3.ProjectTemplate, Configuration: Debug Any CPU ------
1> ProjectType3.ProjectTemplate -> D:\dev\csharp\DevArch\ProjectType3\ProjectType3\ProjectType3.ProjectTemplate\bin\Debug\ProjectTemplates\ProjectType3\1033\ProjectType3.zip
1> ProjectType3.ProjectTemplate ->
2>------ Rebuild All started: Project: ProjectType3.ProjectType, Configuration: Debug Any CPU ------
2> ProjectType3.ProjectType ->
2> ProjectType3.ProjectType ->
2> ProjectType3.ProjectType -> D:\dev\csharp\DevArch\ProjectType3\ProjectType3\ProjectType3.ProjectType\bin\Debug\ProjectType3.dll
2> Creating intermediate PkgDef file.
2> Creating VSIX Container...
2> ProjectType3.ProjectType -> D:\dev\csharp\DevArch\ProjectType3\ProjectType3\ProjectType3.ProjectType\bin\Debug\ProjectType3.vsix
2>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\VSSDK\Microsoft.VsSDK.targets(653,5): error VSSDK1031: Extension 'ProjectType3.ProjectType..46f10d4a-3105-49a3-8cec-0d401288da4f' could not be found. Please make sure the extension has been installed.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
This also occurs if the two projects are wrapped in another vsix container.
I am fairly new to VS extension development, I have written a DDEX provider for VS, but that is about it.
I am looking for guidance for the following idea.
I would like a project based upon an ASP.NET WebForms project but with the following tweaks:
Number 2 is where I am struggling. I need to try and find the appropriate extensivity point so that when the project is "Run" the following happens:
So really, the project is essentially an ASP.NET WebForms project that produces a custom output package when it is built, and when it is run, I want to start my own host process, deploy to that process, and then "Attach"
If anyone can point me in the right direction - in terms of approaches / extensivity points I would need to implement - I would be very greatful! Starting whether this should be a Project "Flavour" or a full blown new Project type..
What do you modify in the Project Type project to display within the New Project > Installed Templates? This would be compared to the Visual C# template. As an example, what if I wanted a multiple word project type (called My Boo)? So what file and item do you modify to display New Project > Installed Templates > My Boo?
Multiple customers have requested this, including this one.
So, there is now a convention for where to put analyzers in a NuGet package, and it's important to follow this convention if you want them to work properly with anything other than the old packages.config
format, since that's the only situation in which install.ps1
and uninstall.ps1
will ever run: neither Paket nor NuGet v3 in project.json
mode will pick up analyzers that aren't located according to the convention.
The convention is basically to put analyzers in an analyzers/dotnet
directory within their package, and to further split any language-specific analyzer DLLs into cs
and vb
subdirectories under that. (Or you could follow the links above for the details, most of which are fairly irrelevant so far.)
Btw, this concerns the packages:
(Not sure the latter is strictly-speaking yours, but the package doesn't exactly point at a bug tracker and your "Project Type" template pulls it in, so I might as well list it while I'm here ...)
I'm not sure where to raise issues for this SDK as its an odd hybrid of closed source code and open source docs. But here goes in the hope it has the desired effect,
If there is a better place to raise issues for the code rather than the Docs perhaps you could point me to the documentation of that place.
To reproduce the above:
Create a new "Project Type" project.
Change nothing.
Press F5 to execute.
In the experimental instance create a new project of the new type.
Build the new project - all is well.
Change the project "Output Type" preperty to "Class Library"
Build the new project - error CSC : error CS2019: Invalid target type for /target: must specify 'exe', 'winexe', 'library', or 'module'
The intro page under "Limitations" mentions :
No (or very limited) app designer support. Project properties are typically accessed via the Property Pages dialog instead.
Could you please elaborate a bit more on what this means ? Does this limitation only apply to the design surface for "Projects" and not the files contained within it ?
I'm currently implementing an extension that provides a XAML based UI for editing a custom file type. These file types will eventually be part of my project system. See this as an example of what I'm trying to build:
https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/WPFDesigner_XML
Will a CPS based project system not be compatible with extensions built using the regular VS SDK APIs ? Or is my scenario supported ?
Thanks.
Up-to-date check providers can use this for faster file timestamp checks. We should document how to use it.
VC++ is only mentioned briefly in "How to detect whether a project is a CPS project":
The following code snippet demonstrates how to detect whether a given project is a "pure" CPS-based project system (e.g. JavaScript, and not VC++ which is only half CPS).
So what does this "half CPS" mean?
And will there be an easier way to modify C++ projects or invoke the Ctrl+F7 "compile file functionality" than VCCLCompilerTool and all the hoops you have to jump through to even get there?
I've been trying to create a new Project System that still uses C# source files. I've had a persistent issue where Intellisense only sees types defined in referenced assemblies that are in the Framework folder of the "Add Reference" dialog. My projects are requiring .NET 3.5 if that makes a difference.
(These is for making it easier to make mods for Kerbal Space Program.)
The Custom Reference Types pages says that "You can define a References node by exporting IProjectTreeProvider . Implementations of this interface should derive from ProjectTreeProviderBase ."
I've found a couple aspects of this to be confusing:
If I use [AppliesTo(MyUnconfiguredProject.UniqueCapability)]
on the IProjectTreeProvider export, my implementation of ProjectTreeProviderBase doesn't get called. If I do [AppliesTo("")]
instead, my code is called, but obviously is getting applied to more project types than I want. I am only trying to target a new project type that I am creating - is there any reason that [AppliesTo(MyUnconfiguredProject.UniqueCapability)]
shouldn't produce the desired effect?
As far as adding the actual node for the References Folder, I gathered that I should be using the NewTree()
method of ProjectTreeProviderBase to create the new node, but if that's the case, I'm not seeing where/how to add this node to the existing tree. Any further clarifications on this?
Currently if our project would have items with Visible=false metadata , those items would be not visible in Solution Explorer nor in normal view neither when "Show all Files " is checked.
Csproj projects do show Visible=false files when "Show all files" is checked, CPS should also follow same logic.
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.