Skip to content

Commit

Permalink
Dotnet8 local config (#14618)
Browse files Browse the repository at this point in the history
* update

* Update CS_SDK.props

* Update CS_SDK.props

* update

* Update DynamoCoreTests.csproj

* update

* Update Md2Html.csproj

* update

---------

Co-authored-by: pinzart <[email protected]>
  • Loading branch information
pinzart90 and pinzart authored Nov 20, 2023
1 parent 96fb3f0 commit 358dce3
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Install dependencies for windows runtime
run: dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln --runtime=win10-x64
run: dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln --runtime=win-x64
- name: Build Dynamo with MSBuild for Windows
run: |
echo "***Continue with the build, Good luck developer!***"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dynamoAllNet6.0_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install dependencies for windows runtime
run: |
dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win10-x64
dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64
- name: Build Dynamo with MSBuild for Windows
run: |
echo "***Continue with the build, Good luck developer!***"
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/dynamoAllNet8.0_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Build Dynamo using latest VS and DotNET
name: DynamoAllNet8.0-Build
on: [push,pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v4
with:
path: Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Disable problem matcher
run: echo "::remove-matcher owner=csc::"

- name: Install dependencies for windows runtime
run: |
dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 -p:DotNet=net8.0
- 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\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:Configuration=Release /p:DotNet=net8.0
# look for Dynamo
- name: Navigate to Dynamo Windows Folder
run: |
cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\AnyCPU\Release"
echo "***Locating DynamoCLI for Windows!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DynamoSandbox
path: ${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
if-no-files-found: warn
retention-days: 3
4 changes: 2 additions & 2 deletions .github/workflows/dynamoBinDiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: echo "::remove-matcher owner=csc::"
- name: Install dependencies for windows runtime
run: |
dotnet restore $Env:GITHUB_WORKSPACE\net60_Win_Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win10-x64
dotnet restore $Env:GITHUB_WORKSPACE\net60_Win_Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64
- name: Build Dynamo current branch with MSBuild for NET60-Windows
run: |
echo "***Continue with the build, Good luck developer!***"
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
run: echo "::remove-matcher owner=csc::"
- name: Install dependencies for windows runtime
run: |
dotnet restore $Env:GITHUB_WORKSPACE\master_net60_Win_Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win10-x64
dotnet restore $Env:GITHUB_WORKSPACE\master_net60_Win_Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64
- name: Build Dynamo master branch with MSBuild for NET60-Windows
run: |
echo "***Continue with the build, Good luck developer!***"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dynamoNet6.0_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install dependencies for windows runtime
run: |
dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.sln /p:Configuration=Release --runtime=win10-x64
dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.sln /p:Configuration=Release --runtime=win-x64
- name: Build Dynamo with MSBuild for Windows
run: |
echo "***Continue with the build, Good luck developer!***"
Expand Down
7 changes: 5 additions & 2 deletions src/Config/CS_SDK.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<PlatformTarget >x64</PlatformTarget>
<!--Use the property DotNet to set TargetFramework from commandline without forcing it on all projects-->
<!--Ex. DynamoServices uses TargetFramework netstandard2.0 -->
<DotNet>net6.0</DotNet>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotNet)</TargetFramework>
<FileAlignment>512</FileAlignment>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Expand Down Expand Up @@ -49,7 +52,7 @@
<GenerateDependencyFile>false</GenerateDependencyFile>
</PropertyGroup>
<PropertyGroup Condition="$(Platform.Contains('AnyCPU'))" >
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DefineConstants>$(DefineConstants);_WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Platform.Contains('Linux'))" >
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<PackageReference Include="SharpDX.Mathematics" Version="4.2.0" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="6.0.0" />
<Reference Include="Dynamo.Microsoft.Xaml.Behaviors">
<HintPath>..\..\extern\Microsoft.Xaml.Behaviors\$(TargetFramework)\Dynamo.Microsoft.Xaml.Behaviors.dll</HintPath>
<HintPath>..\..\extern\Microsoft.Xaml.Behaviors\net6.0-windows\Dynamo.Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>

<PackageReference Include="Prism.Core" Version="8.1.97" />
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/DSOffice/DSOffice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CSVNodes.cs" />
<Compile Include="Excel.cs" Condition=" '$(RuntimeIdentifier)' == 'win10-x64' " />
<Compile Include="Excel.cs" Condition=" $(RuntimeIdentifier.Contains('win')) " />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/DSOfficeUtilities/DSOfficeUtilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<WrapperTool>tlbimp</WrapperTool>
<Private>False</Private>
</Reference>
<COMReference Include="Microsoft.Office.Core" Condition=" '$(RuntimeIdentifier)' == 'win10-x64' ">
<COMReference Include="Microsoft.Office.Core" Condition=" $(RuntimeIdentifier.Contains('win')) ">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>8</VersionMinor>
Expand Down
1 change: 1 addition & 0 deletions src/Libraries/DynamoUnits/UnitsCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<Target Name="CopyFiles" BeforeTargets="Build">
<Copy SourceFiles="$(ProjectDir)DynamoUnits_DynamoCustomization.xml" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(PkgForgeUnits_NET)\lib\net6.0\ForgeUnitsManaged.dll" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(PkgForgeUnits_NET)\runtimes\win10-x64\native\ForgeUnits.dll" DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="GenerateFiles" AfterTargets="ResolveSateliteResDeps" Condition=" '$(OS)' != 'Unix' ">
<!-- Generate customization dll -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="Dynamo.Microsoft.Xaml.Behaviors">
<HintPath>..\..\extern\Microsoft.Xaml.Behaviors\$(TargetFramework)\Dynamo.Microsoft.Xaml.Behaviors.dll</HintPath>
<HintPath>..\..\extern\Microsoft.Xaml.Behaviors\net6.0-windows\Dynamo.Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Tools/Md2Html/Md2Html.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<Target Name="Publish dotnet" Condition="'$([MSBuild]::IsOSPlatform(`Windows`))' == 'True' " AfterTargets="Build">
<CallTarget Targets="Publish" />
<Exec Command="if not exist $(SharedOutputPath) mkdir $(SharedOutputPath)"/>
<Copy Condition=" '$(RuntimeIdentifier)' == 'win10-x64' " SourceFiles="$(OutputPath)$(RuntimeIdentifier)\publish\Md2Html.exe" DestinationFolder="$(SharedOutputPath)" />
<Copy Condition=" '$(RuntimeIdentifier)' == 'win10-x64' " SourceFiles="$(OutputPath)\Md2Html.runtimeconfig.json" DestinationFolder="$(SharedOutputPath)" />
<Copy Condition=" '$(RuntimeIdentifier)' == 'linux-x64' " SourceFiles="$(OutputPath)$(RuntimeIdentifier)\publish\Md2Html" DestinationFolder="$(SharedOutputPath)" />
<Copy Condition=" $(RuntimeIdentifier.Contains('win')) " SourceFiles="$(OutputPath)$(RuntimeIdentifier)\publish\Md2Html.exe" DestinationFolder="$(SharedOutputPath)" />
<Copy Condition=" $(RuntimeIdentifier.Contains('win')) " SourceFiles="$(OutputPath)\Md2Html.runtimeconfig.json" DestinationFolder="$(SharedOutputPath)" />
<Copy Condition=" $(RuntimeIdentifier.Contains('linux')) " SourceFiles="$(OutputPath)$(RuntimeIdentifier)\publish\Md2Html" DestinationFolder="$(SharedOutputPath)" />
</Target>
</Project>
5 changes: 3 additions & 2 deletions src/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<PropertyGroup>
<Solution>Dynamo.All.sln</Solution>
<Platform>Any CPU</Platform>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<DotNet>net6.0</DotNet>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<NuGetPath>$(MSBuildProjectDirectory)\..\tools\Nuget\NuGet.exe</NuGetPath>
</PropertyGroup>

Expand All @@ -21,7 +22,7 @@

<Target Name="RestorePackages">
<Exec Condition="!Exists($(NuGetPath))" Command="powershell.exe -ExecutionPolicy ByPass -Command Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $(NuGetPath)" />
<Exec Command="dotnet restore $(Solution) --runtime=$(RuntimeIdentifier)"/>
<Exec Command="dotnet restore $(Solution) --runtime=$(RuntimeIdentifier) -p:DotNet=$(DotNet)"/>
</Target>

</Project>

0 comments on commit 358dce3

Please sign in to comment.