diff --git a/docs/dev/index.md b/docs/dev/index.md index 864762ce..cf140b98 100644 --- a/docs/dev/index.md +++ b/docs/dev/index.md @@ -29,11 +29,27 @@ First clone the repo: ``` git clone https://github.com/microsoft/XmlNotepad.git ``` -Then: + +From the command line initialize your ApiKey.cs file: +```shell +echo namespace XmlNotepad { public partial class AppAnalytics { private const string ApiKey="%XMLNOTEPAD_ANALYTICSKEY%"; } } > src\model\ApiKey.cs +``` + +Then restore all the nuget packages +``` +nuget restore xmlnotepad.sln +``` + +Then you can build it: +``` +msbuild xmlnotepad.sln +``` + +Using Visual Studio: - Load `src/XmlNotepad.sln` into Visual Studio. - Select Debug or Release and target "Any CPU". -- Run Build Solution. +- Run Rebuild Solution (rebuild also installs any missing nuget packages) ### Debug the app @@ -54,6 +70,10 @@ The tests all pass on Windows 10, but currently some tests fail on Windows 11, t some breaking changes in the Windows Automation layer that XML notepad tests are using. This is being investigated. +Note: [bug 10244](https://github.com/dotnet/winforms/issues/10244) is still open +in in .net 4.8 System.Windows.Automation of menu items that blocks the tests, so +checkout the branch `clovett/net472` to run the unit tests. + ### UpdateVersions The `UpdateVersions` project synchronizes the `Version.props` information diff --git a/src/UnitTests/window.cs b/src/UnitTests/window.cs index 132c7a91..c1e2c84e 100644 --- a/src/UnitTests/window.cs +++ b/src/UnitTests/window.cs @@ -406,7 +406,7 @@ void LoadMenuItems(AutomationElement menuItem, List names) _menuItems[childId] = new AutomationWrapper(subMenuItem); LoadMenuItems(subMenuItem, names); } - if (pattern != null) { + if (pattern != null) { pattern.Collapse(); } } @@ -627,7 +627,7 @@ public void InvokeAsyncMenuItem(string menuItemName) this.WaitForIdle(1000); Sleep(1000); - // BUFBUG: This blocks on .NET 4.8 but works fine on .NET 4.7.2 + // BUGBUG: This blocks on .NET 4.8 but works fine on .NET 4.7.2 // See https://github.com/dotnet/winforms/issues/10244. item.Invoke(); this.WaitForIdle(1000);