From 16354cdfac67157c6866694d2179076f01bee655 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Tue, 18 Jun 2024 18:01:10 +0100 Subject: [PATCH 1/6] TuneUp upgraded to NET8 builds without errors --- TuneUp/TuneUp.csproj | 61 ++++++++++++++++------------------ TuneUpTests/TuneUpTests.csproj | 52 ++++++++++++++++------------- 2 files changed, 58 insertions(+), 55 deletions(-) diff --git a/TuneUp/TuneUp.csproj b/TuneUp/TuneUp.csproj index 13550b2..8e4d92c 100644 --- a/TuneUp/TuneUp.csproj +++ b/TuneUp/TuneUp.csproj @@ -1,23 +1,21 @@  - + + - Debug - AnyCPU - 8.0.30703 - 2.0 - {6FF12D3A-025E-49A5-A773-D99AB82778A3} - Library - Properties + false + net8.0-windows + true TuneUp TuneUp - v4.8 + Library Program C:\Program Files\Dynamo\Dynamo Core\2\DynamoSandbox.exe 512 - PackageReference - + false + false - + + true full false @@ -26,7 +24,8 @@ prompt 4 - + + pdbonly true bin\Release\ @@ -34,6 +33,7 @@ prompt 4 + @@ -48,50 +48,45 @@ + + TuneUpWindow.xaml - + Designer MSBuild:Compile + - - 2.12.0.5650 + runtime compile; build; native; contentfiles; analyzers - - 2.12.0.5650 + runtime compile; build; native; contentfiles; analyzers - - 2.12.0.5650 + runtime compile; build; native; contentfiles; analyzers + - - + + 2.12 TuneUp @@ -104,6 +99,7 @@ + @@ -116,10 +112,11 @@ - - + + + @@ -135,7 +132,7 @@ - - + + \ No newline at end of file diff --git a/TuneUpTests/TuneUpTests.csproj b/TuneUpTests/TuneUpTests.csproj index 883c770..20aa9cf 100644 --- a/TuneUpTests/TuneUpTests.csproj +++ b/TuneUpTests/TuneUpTests.csproj @@ -1,36 +1,33 @@  - - + + + + - Debug - AnyCPU - {B6817785-AFD9-4AF5-9562-5808E74B53E7} - Library - Properties + false + net8.0-windows TuneUpTests TuneUpTests - v4.8 + Library + Properties 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages False UnitTest - - - - + + + true - full + portable false bin\Debug\ DEBUG;TRACE prompt 4 - + + + pdbonly true bin\Release\ @@ -38,6 +35,8 @@ prompt 4 + + @@ -53,28 +52,34 @@ + + + + {6ff12d3a-025e-49a5-a773-d99ab82778a3} TuneUp + + - 2.12.0.5650 + 3.0.0.7186 - 2.12.0.5650 + 3.0.0.7186 - 2.12.0.5650 + 3.0.0.7186 - 2.12.0.5650 + 3.0.0.7186 1.3.2 @@ -86,6 +91,7 @@ 2.2.0 + + - \ No newline at end of file From d2cfdb4e854be77f77ae4a1beb7e96a225cdece7 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Fri, 21 Jun 2024 06:16:43 +0100 Subject: [PATCH 2/6] .NET8 except binaries --- TuneUp/TuneUp.csproj | 14 ++++++++++---- TuneUpTests/TuneUpTests.cs | 7 ++++--- TuneUpTests/TuneUpTests.csproj | 13 +++++++------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/TuneUp/TuneUp.csproj b/TuneUp/TuneUp.csproj index 8e4d92c..658334b 100644 --- a/TuneUp/TuneUp.csproj +++ b/TuneUp/TuneUp.csproj @@ -2,6 +2,7 @@ + false net8.0-windows true @@ -9,9 +10,11 @@ TuneUp Library Program - C:\Program Files\Dynamo\Dynamo Core\2\DynamoSandbox.exe + C:\Program Files\Dynamo\Dynamo Core\3\DynamoSandbox.exe 512 + false + false @@ -67,10 +70,10 @@ - - runtime + + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers @@ -79,6 +82,9 @@ runtime compile; build; native; contentfiles; analyzers + + + diff --git a/TuneUpTests/TuneUpTests.cs b/TuneUpTests/TuneUpTests.cs index 09c61e5..4fd1040 100644 --- a/TuneUpTests/TuneUpTests.cs +++ b/TuneUpTests/TuneUpTests.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Threading; using System.Windows; using System.Windows.Controls; using Dynamo.Graph.Workspaces; @@ -30,7 +31,7 @@ internal TuneUpViewExtension GetTuneUpViewExtension() return tuneUpVE as TuneUpViewExtension; } - [Test, RequiresSTA] + [Test, Apartment(ApartmentState.STA)] public void TuneUpCreatesProfilingDataForEveryNodeInWorkspace() { // Open test graph @@ -63,7 +64,7 @@ public void TuneUpCreatesProfilingDataForEveryNodeInWorkspace() } } - [Test, RequiresSTA] + [Test, Apartment(ApartmentState.STA)] public void TuneUpMaintainsProfiledNodeState() { // Open test graph @@ -122,7 +123,7 @@ public void TuneUpMaintainsProfiledNodeState() } } - [Test, RequiresSTA] + [Test, Apartment(ApartmentState.STA)] public void TuneUpDeterminesCorrectNodeExecutionOrder() { // Expected execution order diff --git a/TuneUpTests/TuneUpTests.csproj b/TuneUpTests/TuneUpTests.csproj index 20aa9cf..639a614 100644 --- a/TuneUpTests/TuneUpTests.csproj +++ b/TuneUpTests/TuneUpTests.csproj @@ -4,6 +4,7 @@ + false net8.0-windows TuneUpTests @@ -13,6 +14,8 @@ 512 False UnitTest + + false @@ -69,9 +72,7 @@ - - 3.0.0.7186 - + 3.0.0.7186 @@ -81,15 +82,15 @@ 3.0.0.7186 + 1.3.2 1.3.2 - - 2.2.0 - + + From 89fcfc1fb7a0578dd147097b550069ab16b50f28 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Fri, 21 Jun 2024 09:18:27 +0100 Subject: [PATCH 3/6] updated packages --- TuneUp/TuneUp.csproj | 30 +++++++++++++++++------------- TuneUpTests/TuneUpTests.csproj | 26 ++++++++++++++++---------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/TuneUp/TuneUp.csproj b/TuneUp/TuneUp.csproj index 658334b..5fe0fb7 100644 --- a/TuneUp/TuneUp.csproj +++ b/TuneUp/TuneUp.csproj @@ -70,19 +70,23 @@ - - runtime - compile; build; native; contentfiles; analyzers - - - runtime - compile; build; native; contentfiles; analyzers - - - runtime - compile; build; native; contentfiles; analyzers - - + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + diff --git a/TuneUpTests/TuneUpTests.csproj b/TuneUpTests/TuneUpTests.csproj index 639a614..a492c90 100644 --- a/TuneUpTests/TuneUpTests.csproj +++ b/TuneUpTests/TuneUpTests.csproj @@ -72,16 +72,22 @@ - - - 3.0.0.7186 - - - 3.0.0.7186 - - - 3.0.0.7186 - + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + 1.3.2 From 7e6c0d70bc1be924bfb8bf46c5d1f84653e71301 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Mon, 24 Jun 2024 18:41:54 +0100 Subject: [PATCH 4/6] loads in 3.1+ now loads in all versions from the Extensions menu --- TuneUp/TuneUp.csproj | 18 +++--------------- TuneUp/TuneUpViewExtension.cs | 6 +++++- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/TuneUp/TuneUp.csproj b/TuneUp/TuneUp.csproj index 5fe0fb7..99fbbe8 100644 --- a/TuneUp/TuneUp.csproj +++ b/TuneUp/TuneUp.csproj @@ -1,9 +1,5 @@ - - - + - - false net8.0-windows true TuneUp @@ -12,12 +8,13 @@ Program C:\Program Files\Dynamo\Dynamo Core\3\DynamoSandbox.exe 512 + + false false false - true full @@ -27,7 +24,6 @@ prompt 4 - pdbonly true @@ -36,7 +32,6 @@ prompt 4 - @@ -51,7 +46,6 @@ - @@ -61,14 +55,12 @@ TuneUpWindow.xaml - Designer MSBuild:Compile - runtime @@ -90,12 +82,10 @@ - - 2.12 @@ -109,7 +99,6 @@ - @@ -126,7 +115,6 @@ - diff --git a/TuneUp/TuneUpViewExtension.cs b/TuneUp/TuneUpViewExtension.cs index d31875a..fa83d03 100644 --- a/TuneUp/TuneUpViewExtension.cs +++ b/TuneUp/TuneUpViewExtension.cs @@ -54,7 +54,11 @@ public override void Loaded(ViewLoadedParams p) // Add this view extension's menu item to the Extensions tab or View tab accordingly. var dynamoMenuItems = p.dynamoMenu.Items.OfType(); - var extensionsMenuItem = dynamoMenuItems.Where(item => item.Header.ToString() == "_Extensions"); + // TODO: Investigate why TuneUpMenuItem is not added to the specified MenuItem + // When _Extensions is specified, TuneUpMenuItem goes to the View menu in Dynamo 3.0- + // and does not appear in Dynamo 3.1+. + // We need to specify _View for TuneUpMenuItem to be added to the Extensions menu + var extensionsMenuItem = dynamoMenuItems.Where(item => item.Header.ToString() == "_View"); if (extensionsMenuItem.Count() > 0) { From 35382a6290b5c173ad4ae4d79a58a548d832ff71 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Mon, 24 Jun 2024 19:32:17 +0100 Subject: [PATCH 5/6] readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4d007e6..ae3b999 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ TuneUp is in `beta`. TuneUp is a view extension for analyzing the performance of Dynamo graphs. TuneUp allows you to see overall graph execution time, per-node execution time, and other helpful information about what's happening under the hood, e.g. nodes run in the current execution v.s. nodes run in the previous execution (which were skipped during the most recent graph run for optimization/ caching). -Here is a short demo of how to utilize it as of now: +Here is a short demo of how to utilize it as of now (now loading from the Extensions menu): ![TuneUp](design/gifs/TuneUpScroll.gif) Here is a mock up of the future design: @@ -16,8 +16,8 @@ Here is a mock up of the future design: ### Recommended Build Environment -- VisualStudio 2019 -- .Net Framework 4.7 Developer Pack +- VisualStudio 2022 or later +- .NET 8.0 Developer Pack - Dynamo repository cloned and built on the same level of TuneUp repository which means your Dynamo repo and TuneUp repo should exist under the same parent folder. ### Result Binaries @@ -32,7 +32,7 @@ Under `TuneUp\dist\TuneUp`, there is a sample package wrapped up ready for publi - TuneUp does not work with .dyfs (custom nodes) yet. - TuneUp binaries are not semantically versioned and are not intended to be built on top of as an API. Do not treat these binaries like DynamoCore. -- TuneUp requires Dynamo 2.5 or higher for access to new extension APIs. +- TuneUp requires Dynamo 3.0 or higher for access to new extension APIs. - When user have TuneUp open, after switching workspace in Dynamo, the first graph run does not give execution time and nodes order. - Although it's not an issue by itself, TuneUp profiles the execution of graphs even if not showing on the extension bar. - In some cases TuneUp may calculate incorrect execution times for nodes, we cannot reproduce this consistently, if you see this occur and can reproduce it please file an issue! @@ -43,7 +43,7 @@ Under `TuneUp\dist\TuneUp`, there is a sample package wrapped up ready for publi Please check out known issues before trying to setup testing. -- Download DynamoCoreRuntime 2.5.0 (or higher) from [dynamobuilds.com](https://dynamobuilds.com/). Alternatively, you can build Dynamo from Dynamo repository and use the bin folder equivalently. +- Download DynamoCoreRuntime 3.0.0 (or higher) from [dynamobuilds.com](https://dynamobuilds.com/). Alternatively, you can build Dynamo from Dynamo repository and use the bin folder equivalently. - Copy all contents of the DynamoCoreRuntime to `TuneUp\TuneUpTests\bin\Debug\`. If you are building Dynamo locally, copy all contents of Dynamo from `Dynamo/bin/AnyCPU/Debug` to `TuneUp\TuneUpTests\bin\Debug\` - Copy `TuneUp_ViewExtensionDefinition.xml` from `TuneUp\TuneUp\manifests\` to `TuneUp\TuneUpTests\bin\Debug\viewExtensions\` - Open the copied `TuneUp_ViewExtensionDefinition.xml` and change the assemply path to `..\TuneUp.dll` @@ -52,6 +52,6 @@ Please check out known issues before trying to setup testing. ### Running TuneUp Unit Tests -- Install NUnit 2 Test Adapter from VisualStudio->Extensions->Manage Extensions->Online. +- Install NUnit3TestAdapter from VisualStudio->Extensions->Manage Extensions->Online. - Open Test Explorer from VisualStudio->Test->Test Explorer. Now you should see a list of TuneUpTests. - Click the target test to run or run them all. From 46069e8ad6a93cbf47318d0e82eb6300dc8bac6a Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Mon, 1 Jul 2024 18:29:17 +0100 Subject: [PATCH 6/6] with directory.build.props --- Directory.Build.props | 21 +++++++++++++++++++++ TuneUp/TuneUp.csproj | 34 +++++++++++++++++----------------- TuneUpTests/TuneUpTests.csproj | 32 ++++++-------------------------- 3 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 Directory.Build.props diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..174f668 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,21 @@ + + + net8.0-windows + true + 512 + false + false + false + + + + 3.2.1.5366 + 1.3.2 + + + + + + + + \ No newline at end of file diff --git a/TuneUp/TuneUp.csproj b/TuneUp/TuneUp.csproj index 99fbbe8..ce983c7 100644 --- a/TuneUp/TuneUp.csproj +++ b/TuneUp/TuneUp.csproj @@ -1,20 +1,15 @@  + net8.0-windows - true TuneUp TuneUp Library Program - C:\Program Files\Dynamo\Dynamo Core\3\DynamoSandbox.exe - 512 - + C:\Program Files\Dynamo\Dynamo Core\3.2\DynamoSandbox.exe false - - false - - false + true full @@ -24,6 +19,7 @@ prompt 4 + pdbonly true @@ -32,6 +28,7 @@ prompt 4 + @@ -46,6 +43,7 @@ + @@ -55,32 +53,31 @@ TuneUpWindow.xaml + Designer MSBuild:Compile + - + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers - - - - + @@ -88,17 +85,19 @@ - 2.12 + 3.2 TuneUp $(ProjectDir)dist\$(PackageName)\ $(PackageFolder)bin\ $(PackageFolder)extra\ $(PackageFolder)dyf\ + + @@ -115,6 +114,7 @@ + diff --git a/TuneUpTests/TuneUpTests.csproj b/TuneUpTests/TuneUpTests.csproj index a492c90..e377d52 100644 --- a/TuneUpTests/TuneUpTests.csproj +++ b/TuneUpTests/TuneUpTests.csproj @@ -1,23 +1,16 @@  - - - false net8.0-windows TuneUpTests TuneUpTests Library Properties - 512 False UnitTest - - false - true @@ -28,7 +21,6 @@ prompt 4 - pdbonly @@ -38,7 +30,6 @@ prompt 4 - @@ -55,13 +46,11 @@ - - @@ -69,36 +58,27 @@ TuneUp - - + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers - + runtime compile; build; native; contentfiles; analyzers - - - 1.3.2 - - - 1.3.2 - - - + + - \ No newline at end of file