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

Cross platform DynamoCore local setup (part1) #13547

Merged
merged 41 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9cb07b6
update
pinzart Nov 18, 2022
59023a2
update
pinzart Nov 18, 2022
4776219
update
pinzart Nov 18, 2022
ee7512c
update
pinzart Nov 18, 2022
d4d5635
update
pinzart Nov 18, 2022
776c3b4
update
pinzart Nov 18, 2022
444136a
Update DynamoCLI.csproj
pinzart Nov 21, 2022
2335036
update
pinzart Nov 21, 2022
918753d
Merge branch 'master' into stuff
pinzart90 Nov 21, 2022
2c6c5d9
update
pinzart Nov 21, 2022
3c527a7
Update PathHelper.cs
pinzart Nov 21, 2022
d7870c6
update
pinzart Nov 21, 2022
6b8eeee
update
pinzart Nov 21, 2022
8fd0322
Update Program.cs
pinzart Nov 21, 2022
a9e1787
Update Program.cs
pinzart Nov 21, 2022
93a802c
update
pinzart Nov 21, 2022
b515670
update
pinzart Nov 30, 2022
0f91091
Update PathHelper.cs
pinzart Dec 2, 2022
d8685f1
update
pinzart Dec 3, 2022
4af3fad
update
pinzart Dec 5, 2022
efffd0f
update
pinzart Dec 5, 2022
d91f5fd
Merge branch 'master' into stuff
pinzart90 Dec 6, 2022
71c948a
Merge branch 'master' into stuff
pinzart Dec 6, 2022
edaef93
Merge branch 'stuff' of https://github.com/DynamoDS/Dynamo into stuff
pinzart Dec 7, 2022
087615a
update
pinzart Dec 7, 2022
64167db
Merge branch 'master' into stuff
pinzart90 Dec 7, 2022
3b1f24c
Update DynamoCLI.csproj
pinzart Dec 7, 2022
631f2bc
Merge branch 'stuff' of https://github.com/DynamoDS/Dynamo into stuff
pinzart Dec 7, 2022
e9b53de
Merge branch 'master' into stuff
pinzart Dec 8, 2022
2cf6044
update
pinzart Dec 8, 2022
0820844
Update DynamoCoreWpf.csproj
pinzart Dec 8, 2022
2f85822
Update CS_SDK.props
pinzart Dec 8, 2022
ead7eec
Update CS_SDK.props
pinzart Dec 8, 2022
d4cebb0
Update CS_SDK.props
pinzart Dec 8, 2022
26a7566
Create dynamoNet6.0_build.yml
pinzart Dec 8, 2022
a7d8b6d
Update dynamoNet6.0_build.yml
pinzart Dec 8, 2022
6c6bb7b
Update dynamoNet6.0_build.yml
pinzart Dec 8, 2022
6e8b297
Update dynamoNet6.0_build.yml
pinzart Dec 8, 2022
6cc218f
Update dynamoNet6.0_build.yml
pinzart Dec 8, 2022
30445f6
switch to cmdlin
pinzart Dec 13, 2022
66229a4
update
pinzart Dec 15, 2022
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
41 changes: 41 additions & 0 deletions .github/workflows/dynamoNet6.0_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Build Dynamo using latest VS and DotNET
name: Dynamo-net6.0-Build
on: [push,pull_request]
jobs:
build:
runs-on: windows-latest
Copy link
Member

@mjkkirschner mjkkirschner Dec 8, 2022

Choose a reason for hiding this comment

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

should this also build on Ubuntu?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need msbuild for now. Not sure if msbuild is available on liinux machines

Copy link
Member

@mjkkirschner mjkkirschner Dec 14, 2022

Choose a reason for hiding this comment

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

well you can do mono msbuild...
Why do we need msbuild?

I guess it's not super important because msbuild supports cross compiling - is that correct?... kind of a pain to maintain a windows build machine though?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we will need a windows build machine to build Dynamo.net6.All (with UI)
DynamoCore (no UI) should be able to build on linux and run on any machine.

I guess if we need a windows machine for all of dynamo (with ui) anyway, then we can just build every part of it there

steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v2
with:
path: Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Install dependencies for windows runtime
run: dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.net6.sln --runtime=win10-x64
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are using dotnet restore because it allows us to specify the target runtime (windows or linux)
nuget does not have this option.
This is an issue because we are using a common properties file (CS_SDK.props) with the default configs set for DynamoAll and not DynamoCore builds.
This can be remediated in other ways....but I think it is good enough for now

- name: Build Dynamo with MSBuild for Windows
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
aparajit-pratap marked this conversation as resolved.
Show resolved Hide resolved
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.net6.sln /p:Configuration=Release /p:Platform=NET60_Windows
# look for Dynamo
- name: Navigate to Dynamo Windows Folder
run: |
cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\NET60_Windows\Release"
echo "***Locating DynamoCLI for Windows!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Install dependencies for linux runtime
run: dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.net6.sln --runtime=linux-x64
- name: Build Dynamo with MSBuild for Linux
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.net6.sln /p:Configuration=Release /p:Platform=NET60_Linux
- name: Navigate to Dynamo Linux Folder
run: |
cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\NET60_Linux\Release"
echo "***Locating DynamoCLI for Linux!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
43 changes: 38 additions & 5 deletions src/Config/CS_SDK.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project>
<PropertyGroup>
<Platforms>AnyCPU;NET60_Windows;NET60_Linux;</Platforms>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<PlatformTarget >AnyCPU</PlatformTarget>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Platform can have any value. It is user-defined.
PlatformTarget must have a valid value of AnyCPU, x86, x64, ARM,

Copy link
Member

@mjkkirschner mjkkirschner Dec 8, 2022

Choose a reason for hiding this comment

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

maybe not the time for it, but we don't really support x86 (AnyCPU) anymore.

<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion>
<TargetFramework>net48</TargetFramework>
<FileAlignment>512</FileAlignment>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<OutputPath Condition=" '$(OutputPath)' == '' ">$(SolutionDir)..\bin\AnyCPU\$(Configuration)</OutputPath>
<BaseIntermediateOutputPath>int\</BaseIntermediateOutputPath>
<OutputPath Condition=" '$(OutputPath)' == '' ">$(SolutionDir)..\bin\$(Platform)\$(Configuration)</OutputPath>
<NunitPath Condition=" '$(NunitPath)' == '' ">$(SolutionDir)..\extern\NUnit</NunitPath>
<SharpDXDirectXVersion>DirectX11</SharpDXDirectXVersion>
<ErrorReport>prompt</ErrorReport>
Expand All @@ -19,8 +20,6 @@
<TestProjectDefaults Condition="$(MSBuildProjectDirectory.Contains('test'))">true</TestProjectDefaults>
<TestProjectDefaults Condition=" '$(TestProjectDefaults)' == '' ">false</TestProjectDefaults>
<NoWarn>MSB3539</NoWarn><!--The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild-->
<!--This is used to set the framework version for icon resource dll generation (lookup of system.drawing.dll)-->
<ResourceGeneration_FrameworkVersion>v4.8</ResourceGeneration_FrameworkVersion>
mjkkirschner marked this conversation as resolved.
Show resolved Hide resolved
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
Expand All @@ -34,18 +33,37 @@
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Platform.Contains('NET60'))" >
<TargetFramework>net6.0</TargetFramework>
<!--Needed to copy nuget package assemblies to output folder. Anet6 issue-->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Copy link
Member

@mjkkirschner mjkkirschner Dec 14, 2022

Choose a reason for hiding this comment

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

so... does this turn all nuget references into copy local true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it copies all referenced assemblies in the output path

Copy link
Member

Choose a reason for hiding this comment

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

that sounds dangerous - do we have duplicate copies now of things like newtonsoft.json in the /nodes and /bin folders?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

duplicate copies will not happen because all projects that have the outputPath to /nodes also have a redirect attribute

    <ReferenceCopyLocalPaths>
	  <!--Copy all assembly references to the OutputPath parent dir (/nodes/../) -->
	  <DestinationSubDirectory>..\</DestinationSubDirectory>
    </ReferenceCopyLocalPaths>
    ```

<GenerateDependencyFile>false</GenerateDependencyFile>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I turned this off because it is causing issues (could not find assembly references in the app directory) with the existing Copy local=false settings in Dynamo. We do not need the deps files at the moment

.deps.json - A list of dependencies, as well as compilation context data and compilation dependencies. 
Not technically required, but required to use the servicing or package cache/shared package install features. 
It can be used to configure dynamic linking to assemblies that come from packages. 
As mentioned above, .NET Core can be configured to dynamically load assemblies from multiple locations. These locations include:

App base directory (in the same folder as the entry point application, no config required)
Package cache folders (NuGet restore cache or NuGet fallback folders)
An optimized package cache or runtime packages store
The servicing index (rarely used. For Windows Update purposes.)
Shared framework (configured via runtimeconfig.json)

</PropertyGroup>
<PropertyGroup Condition="$(Platform.Contains('Windows'))" >
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="$(Platform.Contains('Linux'))" >
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup>
<BaseIntermediateOutputPath>int\$(TargetFramework)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\$(TargetFramework)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Remove="obj\**" />
<EmbeddedResource Remove="obj\**" />
<None Remove="obj\**" />
<None Remove="*.resources" />
<Compile Remove="int\**" />
<EmbeddedResource Remove="int\**" />
<None Remove="int\**" />
</ItemGroup>
<ItemGroup>
<Compile Condition="'$(ProjectName)'!='AssemblyInfoGenerator'" Include="$(SolutionDir)AssemblySharedInfoGenerator\AssemblySharedInfo.cs">
<Link>Properties\AssemblySharedInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(TargetFramework)' == 'net48' ">
<ProjectReference>
<Private>false</Private>
</ProjectReference>
Expand Down Expand Up @@ -91,4 +109,19 @@
<Copy SourceFiles="@(PDBContent)" DestinationFolder="$(OutDir)$(PackagesOutputSubdirectory)" Condition="Exists('%(FullPath)')" />
<Copy SourceFiles="@(DLLContent)" DestinationFolder="$(OutDir)$(PackagesOutputSubdirectory)$(Local_CopyToSubdirectory)" Condition="Exists('%(FullPath)')" />
</Target>
<Target Name="ResolveSateliteResDeps" AfterTargets="Build" Condition=" '$(OS)' != 'Unix' ">
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is $(OS) defined? Built in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is built in

<!-- Get System.Drawing.dll -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net48' ">
<!--This is used to set the framework version for icon resource dll generation (lookup of system.drawing.dll)-->
<ResourceGeneration_FrameworkVersion>v4.8</ResourceGeneration_FrameworkVersion>
</PropertyGroup>
<GetReferenceAssemblyPaths Condition=" '$(TargetFramework)' == 'net48' " TargetFrameworkMoniker=".NETFramework, Version=$(ResourceGeneration_FrameworkVersion)">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" />
</GetReferenceAssemblyPaths>
<PropertyGroup>
<SystemDrawingDllPath Condition=" '$(TargetFramework)' == 'net48' ">$(FrameworkAssembliesPath)System.Drawing.dll</SystemDrawingDllPath>
<!--Requires a reference to "System.Drawing.Common" Version="7.0.0" -->
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is marked in our wiki as a TODO.
Currently it looks like the APIs we are using are ok for windows and linux.
In the future, we can either switch to a new crossplatform package or stop generating icons/resources for dynamo core builds (linux and/or windows ...)

<SystemDrawingDllPath Condition=" '$(TargetFramework)' == 'net60' ">$(PkgSystem_Drawing_Common)\lib\net6.0\System.Drawing.Common.dll</SystemDrawingDllPath>
</PropertyGroup>
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/Dynamo.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -1013,4 +1013,4 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {89CB19C6-BF0A-4E6A-BFDA-79D143EAB59D}
EndGlobalSection
EndGlobal
EndGlobal
9 changes: 6 additions & 3 deletions src/DynamoApplications/DynamoApplications.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 @@ -9,8 +9,11 @@
<RootNamespace>DynamoApplications</RootNamespace>
<AssemblyName>DynamoApplications</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NDesk.Options" Version="0.2.1" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="NDesk.Options.Patched" Version="0.3.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<PackageReference Include="NDesk.Options" Version="0.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DynamoCore\DynamoCore.csproj">
Expand Down
24 changes: 21 additions & 3 deletions src/DynamoApplications/StartupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,31 @@
using Dynamo.Updates;
using DynamoApplications.Properties;
using DynamoShapeManager;
using DynamoUtilities;
using Microsoft.Win32;
using NDesk.Options;

namespace Dynamo.Applications
{
#if NET6_0_OR_GREATER
// Add the same signature for the OptionSet.Add method as found in the NDesk.Options package for net48
internal static class OptionsExtensions
Copy link
Member

Choose a reason for hiding this comment

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

maybe a better solution is to switch to

<PackageReference Include="CommandLineParser" Version="2.8.0" />

like we use in newer parts of the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CommandLineParser as a different arguments model. It does not allow 3 argument styles
ex:
The old/existing way you could do:
cd=|CD=|commondata
-cd=
-CD=
--commondata=
You cannot do this with CommandLineParser
My thoughts were that replacing it just for dotnet6 would be too much refactored code
For dotnet6 we are not set into these packages yet. We can change them at any time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be done if we decide it is better to keep the packages to a minimum but with more if def code

Copy link
Contributor Author

@pinzart90 pinzart90 Dec 8, 2022

Choose a reason for hiding this comment

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

Note that whatever package we choose, will be part of our releases.
I do not think the NodeDocumentationMarkdownGenerator and its references are part of the release

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it strictly necessary to keep combability here? I think we can get close enough. Maybe something we do for 3.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Compatibility was not the main reason.
The main reason was to minimize the #if def code for dotnet6 and maximize common code

{
public static OptionSet Add(this OptionSet opts, string prototype, string description, Action<string> action) => opts.Add(prototype, () => description, action);
}
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to use a separate internal class for the CommandLine options. Hopefully this is less cluttered and more readable.

public class StartupUtils
{
//TODO internal?
/// <summary>
/// Raised when loading of the ASM binaries fails. A failure message is passed as a parameter.
/// </summary>
public static event Action<string> ASMPreloadFailure;


#if NET6_0_OR_GREATER
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
internal class SandboxLookUp : DynamoLookUp
{
public override IEnumerable<string> GetDynamoInstallLocations()
Expand Down Expand Up @@ -205,6 +217,9 @@ private static void ShowHelp(OptionSet opSet)
/// </summary>
/// <param name="geometryFactoryPath">libG ProtoInterface path</param>
/// <param name="preloaderLocation">libG folder path</param>
#if NET6_0_OR_GREATER
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
aparajit-pratap marked this conversation as resolved.
Show resolved Hide resolved
#endif
public static void PreloadShapeManager(ref string geometryFactoryPath, ref string preloaderLocation)
{
var exePath = Assembly.GetExecutingAssembly().Location;
Expand All @@ -227,6 +242,9 @@ public static void PreloadShapeManager(ref string geometryFactoryPath, ref strin
///for now, building an updatemanager instance requires finding Dynamo install location
///which if we are running on mac os or *nix will use different logic then SandboxLookup
/// </summary>
#if NET6_0_OR_GREATER
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
private static IUpdateManager InitializeUpdateManager()
{
var cfg = UpdateManagerConfiguration.GetSettings(new SandboxLookUp());
Expand Down Expand Up @@ -312,7 +330,7 @@ public static DynamoModel MakeModel(bool CLImode)

private static bool PreloadASM(string asmPath, out string geometryFactoryPath, out string preloaderLocation )
{
if (string.IsNullOrEmpty(asmPath))
if (string.IsNullOrEmpty(asmPath) && OSHelper.IsWindows())
{
geometryFactoryPath = string.Empty;
preloaderLocation = string.Empty;
Expand Down Expand Up @@ -378,7 +396,7 @@ private static DynamoModel StartDynamoWithDefaultConfig(bool CLImode,
CLIMode = CLImode
};
config.AuthProvider = CLImode ? null : new Core.IDSDKManager();
config.UpdateManager = CLImode ? null : InitializeUpdateManager();
config.UpdateManager = CLImode ? null : OSHelper.IsWindows() ? InitializeUpdateManager() : null;
Copy link
Member

Choose a reason for hiding this comment

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

what is windows only about updatemanager?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SandboxLookUp is the one. Used inside the InitializeUpdateManager
I did not try to make it work for linux yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hopefully we can get rid of most of the Windows only APIs from DynamoCore
This can be done in steps

config.StartInTestMode = CLImode;
config.PathResolver = CLImode ? new CLIPathResolver(preloaderLocation, userDataFolder, commonDataFolder) as IPathResolver : new SandboxPathResolver(preloaderLocation) as IPathResolver;

Expand Down
6 changes: 4 additions & 2 deletions src/DynamoCLI/DynamoCLI.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 @@ -8,11 +8,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DynamoCLI</RootNamespace>
<AssemblyName>DynamoCLI</AssemblyName>
<SelfContained>false</SelfContained>
Copy link
Member

Choose a reason for hiding this comment

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

just curious - what happens if this is true, the exe also includes all the binaries in the bin folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SelfContained = true will copy all the dotnet6 runtime dlls

</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="Microsoft.CSharp" />
<Reference Include="WindowsBase" />
</ItemGroup>
Expand Down Expand Up @@ -40,6 +41,7 @@
<ProjectReference Include="..\Libraries\DesignScriptBuiltin\DesignScriptBuiltin.csproj">
<Project>{c0d6dee5-5532-4345-9c66-4c00d7fdb8be}</Project>
<Name>DesignScriptBuiltin</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\NodeServices\DynamoServices.csproj">
<Project>{ef879a10-041d-4c68-83e7-3192685f1bae}</Project>
Expand Down
5 changes: 2 additions & 3 deletions src/DynamoCLI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using Dynamo.Applications;
using Dynamo.Models;
Expand Down Expand Up @@ -30,7 +32,6 @@ static internal void Main(string[] args)
var thread = new Thread(() => RunKeepAlive(cmdLineArgs));

thread.Name = "DynamoModelKeepAlive";
thread.SetApartmentState(ApartmentState.STA);
thread.Start();

if (!useConsole)
Expand Down Expand Up @@ -85,8 +86,6 @@ private static void RunKeepAlive(StartupUtils.CommandLineArguments cmdLineArgs)
Console.WriteLine("DynamoCLI is running in keepalive mode");
Console.WriteLine("Press Enter to shutdown...");
}

System.Windows.Threading.Dispatcher.Run();
}
catch
{
Expand Down
Loading