Quantcast
Channel: mpfproj Forum Rss Feed
Viewing all articles
Browse latest Browse all 23

New Post: Need help with MSFProj

$
0
0
Hi Mu,
  1. This about how to create a new custom project type - Walkthrough: Part 1 - Creating a Basic Project System and Walkthrough: Part 2 - Creating a Basic Project System
  2. See the walkthroughs above. All stuff you see in Add new dialog is apper from Project and Item templates (aka 'vstemplate'). NOte that in addution to custom project type (for all stuff related to Soolution Explorer and project things management) you will need to create custom language service (for syntax highlighting, associating yout custom file types with your new Language, which is linked to your vstemplates. etc.., Tools -> Options -> Language settings, etc..). Search for Microsoft.VisualStudio.Package.LanguageService to start
  3. You will need to create your custom msbuild targets file (xml + dll with custom commands running your compiler) and refer this .targets file in yout custom project file template (to make it visible for your custom project type). So you will develop custom tasks for Build, Clean, etc.. All of them will be inherited from MsBuild class ToolTask. And you will need to prepare custom XML file YourProject.targets which override starndard MSBuild commans like Compile - <Target Name="Compile" DependsOnTargets=""> and <Target Name="ReBuild" DependsOnTargets="Clean;Build"> and <Target Name="Clean"> etc..
  4. To Run your application (your custom 'code' files by F5 in Visual Studio) you need to have CustomProjectConfig : ProjectConfig (inherited from base MPF ProjectConfig class, which you provide an instance in CustomConfigProvider : ConfigProvider ). So F5 will call this method in your CustomProjectConfig "public override int DebugLaunch(uint flags) {...}"
A bit more details about for enabling/disabling the standard commands. In your class CustomProjectNode : ProjectNode you can control what commands to enable / disable and how to handle them. As a starting point use these method names to search the relevant documentation:
  • public override int QueryStatusCommand(uint itemId, ref Guid guidCmdGroup, uint cCmds, OLECMD[] cmds, IntPtr pCmdText)
  • protected override QueryStatusResult QueryStatusSelectionOnNodes(IList<HierarchyNode> selectedNodes,
  • protected override int ExecCommandIndependentOfSelection(Guid guidCmdGroup, uint cmdId, uint cmdExecOpt, IntPtr vaIn, IntPtr vaOut, CommandOrigin commandOrigin, out bool handled)
  • protected override int ExecCommandThatDependsOnSelectedNodes(Guid guidCmdGroup,
Hope you got you have enough information for further investigation.

Viewing all articles
Browse latest Browse all 23

Latest Images

Trending Articles





Latest Images