Once you've discussed your proposed feature/fix/etc. with a team member, and you've agreed on an approach or a spec has been written and approved, it's time to start development:
- Fork the repo if you haven't already
- Clone your fork locally
- Create & push a feature branch
- Work on your changes
- Follow the pattern of what you already see in the code.
- Coding style.
- Try to package new ideas/components into libraries that have nicely defined interfaces.
- Package new ideas into classes or refactor existing ideas into a class as you extend.
- When adding new classes/methods/changing existing code: add new unit tests or update the existing tests.
There are two ways to compile locally.
- Open the Developer Command Prompt for Visual Studio
- Run
Build
from Dev Home's root directory. You can pass in a list of platforms/configurations - The Dev Home MSIX will be in your repo under
AppxPackages\x64\debug
Alternatively
- Open
DevHome.sln
in Visual Studio, in theSolutions Configuration
drop-down menu selectRelease
orDebug
, from theBuild
menu chooseBuild Solution
.
- Create a new directory with your tool's name under
tools
with three subdirectoriessrc
,test
, anduitest
- Create a new
WinUI 3 Class Library
project in yoursrc
directory - Create the
Strings\en-us
directories undersrc
. AddResources.resw
and include the following code:<data name="NavigationPane.Content" xml:space="preserve"> <value>[Name of your tool that will appear in navigation menu]</value> </data>
- Add a project reference from
DevHome
to your project - Add a project reference from your project to
DevHome.Common
project under common - Create your XAML view and viewmodel. Your view class must inherit from
ToolPage
and implement requirements. Specifications for the Dev Home tools API. - Update NavConfig.json with your tool. Specifications for the NavConfig.json schema.
Example:
public partial class SampleToolPage : ToolPage
{
public override string ShortName => "SampleTool";
}
The Dev Home project contains the wrapping framework for the Dev Home application. It's responsible for:
- Loading the individual Dev Home tools.
- Definition of the interface used by Dev Home framework to manage the tools. All tools must implement this interface.
The common lib, as the name suggests, contains code shared by multiple tools and the Dev Home framework