Skip to content

Commit

Permalink
Support Net6 target for DynamoCoreTests.dll (WIP for feedback) (Dynam…
Browse files Browse the repository at this point in the history
…oDS#13766)

* add new action

* try general var syntax

* update

* dont use regen in core

* try also not generating resource binaries for string resources

* pull actual code changes

* linux paths

* test command

* add single test project to sln

* add new nuspec

* add post script

* revert adding test proj
build portable pdbs

* build portable in release
update nuspec

* remove publish script

* remove test from github action

* review comments

* by hook or by crook we'll reuse existing test base classes.

* this works

* both solutions build at this point
unclear if tests pass

* try running some linux tests

* build current branch from fork

* updates

* updates

* update

* ugh fix bug

* fix test

* fix more tests

* fix more tests

* fix mono build

* try cat = unittests

* linux not finding any tests

* Update dynamoNet6.0_linux_build.yml

* dont run tests

* dont include castle core in build
upgrade moq

* remove net60smoketests
unify on 17 version of ms.net.test.sdk

* update python and fix refs

* remove duplicate ms.net.test.sdk ref

* introduce junit logger
add back ms test sdk - its needed in bin folder.

* use custom dictionary comparison function in nunit

* compare keys and values when encountering dictionary - toString was not precise enough.

* fix test
mark test failure

* introduce a failure

* update dscpython with split

* fix build for nunit2

* remove failure

* copy moqs deps to test deps directory

* fix

* find moq for tests that were failing

* review comments

* review comments

* mark failure
  • Loading branch information
mjkkirschner authored and sm6srw committed Mar 29, 2023
1 parent 57b41c5 commit 7fd4129
Show file tree
Hide file tree
Showing 82 changed files with 699 additions and 314 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/dynamoNet6.0_linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ jobs:
uses: actions/checkout@v2
with:
path: Dynamo
repository: DynamoDS/Dynamo
ref: master
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Install dependencies for linux runtime
run: dotnet restore ${{ github.workspace }}/Dynamo/src/DynamoCore.net6.sln -p:Platform=NET60_Linux --runtime=linux-x64
Expand All @@ -27,11 +23,12 @@ jobs:
cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
echo "***Locating DynamoCLI for Linux!***"
test "./DynamoCLI.exe" && echo "DynamoCLI exists!"
#TODO_NET6 - return to this when we can build subset of tests in net6/7/8
# - name: Run smoke tests
# run: |
# cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
# echo "***Running Smoke tests on linux***"
# dotnet test DynamoCoreTests.dll --test-adapter-path ~/.nuget/packages/nunittestadapter/2.3.0/build/ --filter TestCategory=SmokeTest
- name: Run smoke tests
run: |
cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
echo "***Running Smoke tests on linux***"
#TODO unfortunately dotnet does not find any tests in this assembly.
#dotnet test DynamoCoreTests.dll --filter "TestCategory~UnitTest"
Binary file not shown.
Binary file modified extern/Python/CPython_netstd20/Python.Included.dll
Binary file not shown.
Binary file modified extern/Python/CPython_netstd20/Python.Runtime.dll
Binary file not shown.
5 changes: 2 additions & 3 deletions src/DynamoApplications/StartupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal class CMDLineOptions
[Option('x', "ConvertFile", Required = false, HelpText = "When used in combination with the 'O' flag, opens a .dyn file from the specified path and converts it to .json." +
"File will have the .json extension and be located in the same directory as the original file.")]
public bool ConvertFile { get; set; }
[Option('g', "Geometry", Required = false, HelpText = "Instruct Dynamo to output geometry from all evaluations to a json file at this path.")]
[Option( "Geometry", Required = false, HelpText = "Instruct Dynamo to output geometry from all evaluations to a json file at this path.")]
public string GeometryFilePath { get; set; } = String.Empty;
[Option('i', "Import", Required = false, HelpText = "Instruct Dynamo to import an assembly as a node library.This argument should be a filepath to a single.dll" +
" - if you wish to import multiple dlls - list the dlls separated by a space: -i 'assembly1.dll' 'assembly2.dll'")]
Expand Down Expand Up @@ -223,10 +223,9 @@ public static CommandLineArguments Parse(string[] args)
.Add("hn=|HN=|hostname", "Identify Dynamo variation associated with host", hn => hostname = hn)
.Add("si=|SI=|sessionId", "Identify Dynamo host analytics session id", si => sessionId = si)
.Add("pi=|PI=|parentId", "Identify Dynamo host analytics parent id", pi => parentId = pi)
.Add("da|DA|disableAnalytics", "Disables analytics in Dynamo for the process liftime", da => disableAnalytics = da != null)
.Add("da|DA|disableAnalytics|DisableAnalytics", "Disables analytics in Dynamo for the process liftime", da => disableAnalytics = da != null)
.Add("cr=|CR=|cerLocation", "Specify the crash error report tool location on disk ", cr => cerLocation = cr)
.Add("s|S|service mode", "Service mode, bypasses certain Dynamo launch steps for maximum startup performance", s => serviceMode = s != null);

optionsSet.Parse(args);

if (showHelp)
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private static DynamoModel StartupDynamo(StartupUtils.CommandLineArguments cmdLi

model.ShutdownCompleted += (m) => { ShutDown(); };

cmdLineArgs.ImportedPaths.ToList().ForEach(path =>
cmdLineArgs.ImportedPaths?.ToList().ForEach(path =>
{
CommandLineRunner.ImportAssembly(model, path);
});
Expand Down
78 changes: 78 additions & 0 deletions src/DynamoCore.net6.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Watch3DNodeModels", "Librar
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migrations", "Migrations\Migrations.csproj", "{06B9E5B0-7C50-4351-9D88-E159DC25755F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{5B9B5B6B-0BA7-4606-B8E5-70C958346D57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestServices", "..\test\Libraries\TestServices\TestServices.csproj", "{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSOffice", "Libraries\DSOffice\DSOffice.csproj", "{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamoCoreTests", "..\test\DynamoCoreTests\DynamoCoreTests.csproj", "{472084ED-1067-4B2C-8737-3839A6143EB2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFITarget", "..\test\Engine\FFITarget\FFITarget.csproj", "{C70FE632-5500-4C57-B3D6-9B5574137551}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -569,6 +579,70 @@ Global
{06B9E5B0-7C50-4351-9D88-E159DC25755F}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{06B9E5B0-7C50-4351-9D88-E159DC25755F}.Release|x64.ActiveCfg = Release|x64
{06B9E5B0-7C50-4351-9D88-E159DC25755F}.Release|x64.Build.0 = Release|x64
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|NET60_Linux.ActiveCfg = Debug|NET60_Linux
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|NET60_Linux.Build.0 = Debug|NET60_Linux
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|x64.ActiveCfg = Debug|x64
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Debug|x64.Build.0 = Debug|x64
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|Any CPU.Build.0 = Release|Any CPU
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|NET60_Linux.ActiveCfg = Release|NET60_Linux
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|NET60_Linux.Build.0 = Release|NET60_Linux
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|x64.ActiveCfg = Release|x64
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419}.Release|x64.Build.0 = Release|x64
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|NET60_Linux.ActiveCfg = Debug|NET60_Linux
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|NET60_Linux.Build.0 = Debug|NET60_Linux
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|x64.ActiveCfg = Debug|x64
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Debug|x64.Build.0 = Debug|x64
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|Any CPU.Build.0 = Release|Any CPU
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|NET60_Linux.ActiveCfg = Release|NET60_Linux
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|NET60_Linux.Build.0 = Release|NET60_Linux
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|x64.ActiveCfg = Release|x64
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7}.Release|x64.Build.0 = Release|x64
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|NET60_Linux.ActiveCfg = Debug|NET60_Linux
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|NET60_Linux.Build.0 = Debug|NET60_Linux
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|x64.ActiveCfg = Debug|x64
{472084ED-1067-4B2C-8737-3839A6143EB2}.Debug|x64.Build.0 = Debug|x64
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|Any CPU.Build.0 = Release|Any CPU
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|NET60_Linux.ActiveCfg = Release|NET60_Linux
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|NET60_Linux.Build.0 = Release|NET60_Linux
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|x64.ActiveCfg = Release|x64
{472084ED-1067-4B2C-8737-3839A6143EB2}.Release|x64.Build.0 = Release|x64
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|NET60_Linux.ActiveCfg = Debug|NET60_Linux
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|NET60_Linux.Build.0 = Debug|NET60_Linux
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|x64.ActiveCfg = Debug|x64
{C70FE632-5500-4C57-B3D6-9B5574137551}.Debug|x64.Build.0 = Debug|x64
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|Any CPU.Build.0 = Release|Any CPU
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|NET60_Linux.ActiveCfg = Release|NET60_Linux
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|NET60_Linux.Build.0 = Release|NET60_Linux
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|x64.ActiveCfg = Release|x64
{C70FE632-5500-4C57-B3D6-9B5574137551}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -597,6 +671,10 @@ Global
{D6279651-D099-4F8D-A319-5BF12ED9F269} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{31183026-DE70-49CB-BC7C-0DFD0A088F62} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{06B9E5B0-7C50-4351-9D88-E159DC25755F} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{6CD0F0CF-8199-49F9-B0EA-0B9598B44419} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{9B4FDC96-E2F9-4B8F-894A-4294405D50E7} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{472084ED-1067-4B2C-8737-3839A6143EB2} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{C70FE632-5500-4C57-B3D6-9B5574137551} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {89CB19C6-BF0A-4E6A-BFDA-79D143EAB59D}
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@
[assembly: InternalsVisibleTo("ExportSampleImagesViewExtension")]
[assembly: InternalsVisibleTo("DocumentationBrowserViewExtension")]


[assembly: TypeForwardedTo(typeof(Dynamo.Scheduler.Disposable))]
5 changes: 3 additions & 2 deletions src/DynamoInstall/Release.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<!--NOTE! THESE excludes do not affect the harvest folder-->

<!--Exclude *.xml-->
<xsl:key name="xml-search" match="wix:Component[contains(@Directory, 'INSTALLDIR') and (contains(wix:File/@Source, '.xml') or contains(wix:File/@Source, '.XML')) and not(contains(wix:File/@Source, '_DynamoCustomization.xml') or contains(wix:File/@Source, '.Migrations.xml'))]" use="@Id"/>
<xsl:template match="wix:Component[key('xml-search', @Id)]" />
Expand Down Expand Up @@ -88,4 +89,4 @@
<xsl:template match="wix:Directory[@Name = 'samples']" />
<xsl:key name="samples-search" match="wix:Component[contains(wix:File/@Source, '\samples\')]" use="@Id"/>
<xsl:template match="wix:Component[key('samples-search', @Id)]" />
</xsl:stylesheet>
</xsl:stylesheet>
13 changes: 10 additions & 3 deletions src/Libraries/DSCPython/DSCPython.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@
<RootNamespace>DSCPython</RootNamespace>
<AssemblyName>DSCPython</AssemblyName>
</PropertyGroup>
<ItemGroup>

</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<Reference Include="Python.Included, Version=2.5.2.6664, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Python.Included, Version=2.5.2.7426, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\extern\Python\CPython_netstd20\Python.Included.dll</HintPath>
</Reference>
<Reference Include="Python.Runtime, Version=2.5.2.6664, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Python.Included.SciPy, Version=2.5.2.7426, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\extern\Python\CPython_netstd20\Python.Included.SciPy.dll</HintPath>
</Reference>
<Reference Include="Python.Runtime, Version=2.5.2.7426, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\extern\Python\CPython_netstd20\Python.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="Python.Included, Version=2.5.2.7426, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Python.Included, Version=2.5.2.7426, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\extern\Python\Python.Included.dll</HintPath>
</Reference>
Expand Down
12 changes: 7 additions & 5 deletions src/Libraries/DSOffice/DSOffice.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config\CS_SDK.props" />
</ImportGroup>
Expand All @@ -10,11 +10,13 @@
<AssemblyName>DSOffice</AssemblyName>
<DocumentationFile>$(OutputPath)\$(UICulture)\DSOffice.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<PackageReference Include="Microsoft.Office.Interop.Excel" Version="15.0.4795.1000">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="2.12.3" CopyXML="true" />
<PackageReference Include="Microsoft.Office.Interop.Excel" Version="15.0.4795.1000">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -72,7 +74,7 @@
<Target Name="CopyFiles" BeforeTargets="Build">
<Copy SourceFiles="$(ProjectDir)DSOffice_DynamoCustomization.xml" DestinationFiles="$(OutDir)DSOffice_DynamoCustomization.xml" />
</Target>
<Target Name="GenerateFiles" AfterTargets="Build" Condition=" '$(OS)' != 'Unix' ">
<Target Name="GenerateFiles" AfterTargets="Build" Condition=" '$(OS)' != 'Unix' AND '$(TargetFramework)' == 'net48'">
<!-- Get System.Drawing.dll -->
<GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=$(ResourceGeneration_FrameworkVersion)">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" />
Expand Down
12 changes: 8 additions & 4 deletions src/Libraries/DSOffice/Excel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
#if NETFRAMEWORK
using Microsoft.Office.Interop.Excel;
#endif
using DynamoServices;
using Autodesk.DesignScript.Runtime;
using Dynamo.Graph.Nodes;
Expand All @@ -15,6 +17,7 @@

namespace DSOffice
{
#if NETFRAMEWORK
internal class ExcelCloseEventArgs : EventArgs
{
public ExcelCloseEventArgs(bool saveWorkbooks = true)
Expand Down Expand Up @@ -341,7 +344,7 @@ internal static object[][] WriteData(string filePath, string sheetName, int star
[IsVisibleInDynamoLibrary(false)]
public class WorkSheet
{
#region Helper methods
#region Helper methods

private static object[][] ConvertToJaggedArray(object[,] input, bool convertToString = false)
{
Expand Down Expand Up @@ -447,7 +450,7 @@ private static object[][] ConvertToJaggedArray(object[,] input, bool convertToSt
return output;
}

#endregion
#endregion
/// <summary>
/// Returns data from given worksheet (GetDataFromExcelWorksheet node)
/// </summary>
Expand Down Expand Up @@ -703,7 +706,7 @@ internal WorkSheet GetWorksheetByName(string sheetName)
}

}

#endif
/// <summary>
/// Methods for Import/Export category.
/// </summary>
Expand Down Expand Up @@ -806,6 +809,7 @@ public static IList ImportCSV(string filePath, bool transpose = false)
if (transpose) return CSVdatalist;
else return DSCore.List.Transpose(CSVdatalist);
}
#if NETFRAMEWORK

/// <summary>
/// Read data from a Microsoft Excel spreadsheet. Data is read by row and
Expand Down Expand Up @@ -869,7 +873,7 @@ public static object[][] ExportToExcel(string filePath, string sheetName, int st
{
return Excel.WriteData(filePath, sheetName, startRow, startColumn, data, overWrite, writeAsString);
}

#endif
/// <summary>
/// Read data from a Microsoft Excel spreadsheet by using the Open XML standard.
/// Data is read by row and returned in a series of lists by row.
Expand Down
3 changes: 2 additions & 1 deletion src/Libraries/DesignScriptBuiltin/Dictionary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
Expand Down Expand Up @@ -129,6 +129,7 @@ public override string ToString()
result.Append("}");
return result.ToString();
}

}
}
}
4 changes: 2 additions & 2 deletions src/PythonMigrationViewExtension/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand All @@ -13,4 +13,4 @@

// Visible to DynamoCoreWpfTests dll for unit testing
[assembly: InternalsVisibleTo("IronPythonTests")]
[assembly: InternalsVisibleTo("DynamoCoreTests")]
[assembly: InternalsVisibleTo("DynamoPythonTests")]
43 changes: 43 additions & 0 deletions src/VisualizationTests/Setups.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using System.IO;
using System.Reflection;
using Dynamo.Utilities;
using NUnit.Framework;

[SetUpFixture]
public class Setup
{
private AssemblyHelper assemblyHelper;

#if NETFRAMEWORK
[SetUp]
#elif NET6_0_OR_GREATER
[OneTimeSetUp]
#endif
public void RunBeforeAllTests()
{
var assemblyPath = Assembly.GetExecutingAssembly().Location;
var moduleRootFolder = new DirectoryInfo(assemblyPath).Parent;

var resolutionPaths = new[]
{
// These tests need "CoreNodeModels.dll" under "nodes" folder.
Path.Combine(moduleRootFolder.FullName, "nodes"),
Path.Combine(moduleRootFolder.Parent.Parent.Parent.FullName, "test", "test_dependencies")
};

assemblyHelper = new AssemblyHelper(moduleRootFolder.FullName, resolutionPaths);
AppDomain.CurrentDomain.AssemblyResolve += assemblyHelper.ResolveAssembly;
}

#if NETFRAMEWORK
[TearDown]
#elif NET6_0_OR_GREATER
[OneTimeTearDown]
#endif
public void RunAfterAllTests()
{
AppDomain.CurrentDomain.AssemblyResolve -= assemblyHelper.ResolveAssembly;
assemblyHelper = null;
}
}
Loading

0 comments on commit 7fd4129

Please sign in to comment.