Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Net6 target for DynamoCoreTests.dll (WIP for feedback) #13766

Merged
merged 54 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4daf4dd
add new action
mjkkirschner Feb 8, 2023
fcc572e
try general var syntax
mjkkirschner Feb 8, 2023
de39a63
update
mjkkirschner Feb 8, 2023
802367b
dont use regen in core
mjkkirschner Feb 8, 2023
2258630
try also not generating resource binaries for string resources
mjkkirschner Feb 8, 2023
7377cdb
pull actual code changes
mjkkirschner Feb 9, 2023
7e66e50
linux paths
mjkkirschner Feb 9, 2023
4ee22ff
test command
mjkkirschner Feb 9, 2023
e1a5e7e
add single test project to sln
mjkkirschner Feb 9, 2023
22435c3
add new nuspec
mjkkirschner Feb 13, 2023
24ffb90
add post script
mjkkirschner Feb 13, 2023
d1b5e73
revert adding test proj
mjkkirschner Feb 13, 2023
a2df0ca
build portable in release
mjkkirschner Feb 14, 2023
cc08b3a
remove publish script
mjkkirschner Feb 15, 2023
d7e1abf
remove test from github action
mjkkirschner Feb 15, 2023
46ec462
review comments
mjkkirschner Feb 17, 2023
2f0a375
by hook or by crook we'll reuse existing test base classes.
mjkkirschner Feb 17, 2023
8f6ed83
this works
mjkkirschner Feb 17, 2023
abb1490
both solutions build at this point
mjkkirschner Feb 17, 2023
48ee12e
try running some linux tests
mjkkirschner Feb 21, 2023
c296bbf
build current branch from fork
mjkkirschner Feb 21, 2023
e919593
updates
mjkkirschner Feb 21, 2023
352ee50
updates
mjkkirschner Feb 22, 2023
53dc2d5
update
mjkkirschner Feb 24, 2023
05c43a3
ugh fix bug
mjkkirschner Feb 24, 2023
2543b1c
fix test
mjkkirschner Feb 24, 2023
a95f53e
fix more tests
mjkkirschner Feb 24, 2023
e04d5e2
fix more tests
mjkkirschner Feb 27, 2023
40c24b6
Merge branch 'master' into net60tests
mjkkirschner Feb 27, 2023
b8a6f62
fix mono build
mjkkirschner Feb 27, 2023
5ec9b2e
try cat = unittests
mjkkirschner Feb 27, 2023
6a2fde2
linux not finding any tests
mjkkirschner Feb 27, 2023
7b46b2f
Update dynamoNet6.0_linux_build.yml
mjkkirschner Feb 27, 2023
f03fe35
dont run tests
mjkkirschner Feb 28, 2023
4b2fff7
dont include castle core in build
mjkkirschner Feb 28, 2023
e21c743
remove net60smoketests
mjkkirschner Feb 28, 2023
03b0602
Merge branch 'net60tests' of https://github.com/mjkkirschner/Dynamo i…
mjkkirschner Feb 28, 2023
1695362
update python and fix refs
mjkkirschner Mar 1, 2023
bceedca
remove duplicate ms.net.test.sdk ref
mjkkirschner Mar 2, 2023
d2a5e47
introduce junit logger
mjkkirschner Mar 2, 2023
9d8c90c
use custom dictionary comparison function in nunit
mjkkirschner Mar 2, 2023
ac55692
compare keys and values when encountering dictionary - toString was n…
mjkkirschner Mar 2, 2023
1e0d11b
fix test
mjkkirschner Mar 2, 2023
8bd66fc
introduce a failure
mjkkirschner Mar 2, 2023
67fe4c3
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into net6…
mjkkirschner Mar 3, 2023
4243d4a
update dscpython with split
mjkkirschner Mar 3, 2023
a842eb1
fix build for nunit2
mjkkirschner Mar 3, 2023
dc882b3
remove failure
mjkkirschner Mar 3, 2023
2f8ecfd
copy moqs deps to test deps directory
mjkkirschner Mar 4, 2023
aaf1061
fix
mjkkirschner Mar 4, 2023
3fbbac0
find moq for tests that were failing
mjkkirschner Mar 4, 2023
25e1919
review comments
mjkkirschner Mar 4, 2023
77207e1
review comments
mjkkirschner Mar 6, 2023
767ac54
mark failure
mjkkirschner Mar 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
pinzart90 marked this conversation as resolved.
Show resolved Hide resolved
.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}"
aparajit-pratap marked this conversation as resolved.
Show resolved Hide resolved
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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot tell, but did you add dsoffice to the Linux part of the solution?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it for NET6 in general - so yes. DSOffice also includes openxml and CSV nodes.

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' ">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why we would avoid Excel on linux but why are we limiting it to netframework only ?
Does it not work on dotnet6+ ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will leave this for another time and file a followup if thats ok.

<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