diff --git a/tools/NuGet/BuildPackages.bat b/tools/NuGet/BuildPackages.bat index a91a285bd79..d6ba089a87a 100644 --- a/tools/NuGet/BuildPackages.bat +++ b/tools/NuGet/BuildPackages.bat @@ -37,6 +37,13 @@ for /f %%f in ('cscript //Nologo ..\install\GetFileVersion.vbs %harvestPath%\Dyn setlocal DisableDelayedExpansion set version=%Major%.%Minor%.%Build%-beta%Revision% +:: Get target framework from build.xml +for /f %%f in ('cscript //Nologo .\GetTargetFramework.vbs ..\..\src\build.xml') do ( + setlocal EnableDelayedExpansion + set targetFramework=%%f +) +setlocal DisableDelayedExpansion + :: Clean files generated from the previous run if exist *.nupkg ( del *.nupkg ) @@ -45,8 +52,8 @@ for %%f in (%1\*.nuspec) do ( :: Check if nuspec file name containing "Symbols" echo %%f|find "Symbols" >nul :: When nuget pack symbols, set to release path where the symbol files live - if errorlevel 1 ( nuget pack %%f -basepath %harvestPath% -properties Version=%version%) else (nuget pack %%f -basepath %releasePath% -properties Version=%version%) + if errorlevel 1 ( nuget pack %%f -basepath %harvestPath% -properties Version=%version%;TargetFramework=%targetFramework%) else (nuget pack %%f -basepath %releasePath% -properties Version=%version%;TargetFramework=%targetFramework%) if not exist %%~nf.%version%.nupkg ( exit /b 1 ) -) \ No newline at end of file +) diff --git a/tools/NuGet/GetTargetFramework.vbs b/tools/NuGet/GetTargetFramework.vbs new file mode 100644 index 00000000000..d1e13193a60 --- /dev/null +++ b/tools/NuGet/GetTargetFramework.vbs @@ -0,0 +1,6 @@ +Set arguments = WScript.Arguments +Set xmlDoc = CreateObject("Msxml2.DOMDocument") +xmlDoc.load(arguments(0)) +Set dotnet = xmlDoc.selectSingleNode("/Project/PropertyGroup/DotNet") +Wscript.Echo dotnet.text +Wscript.Quit diff --git a/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreRuntime.nuspec b/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreRuntime.nuspec index f24f2ed13b2..d3a0b445a30 100644 --- a/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreRuntime.nuspec +++ b/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreRuntime.nuspec @@ -13,13 +13,13 @@ Built targeting Windows Net6 with exclusion of test libraries and symbol files. Copyright Autodesk 2023 - + - + diff --git a/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreSymbols.nuspec b/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreSymbols.nuspec index df785739765..ffd5b605baf 100644 --- a/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreSymbols.nuspec +++ b/tools/NuGet/template-artifactory/DynamoVisualProgramming.DynamoCoreSymbols.nuspec @@ -12,13 +12,13 @@ This package bundles all symbol files from the Dynamo bin folder. Copyright Autodesk 2023 - + - - + + diff --git a/tools/NuGet/template-artifactory/DynamoVisualProgramming.Tests.nuspec b/tools/NuGet/template-artifactory/DynamoVisualProgramming.Tests.nuspec index 801531cc3d2..2e1ccddb92c 100644 --- a/tools/NuGet/template-artifactory/DynamoVisualProgramming.Tests.nuspec +++ b/tools/NuGet/template-artifactory/DynamoVisualProgramming.Tests.nuspec @@ -16,16 +16,16 @@ This package contains all that is required to get up and running creating tests for Dynamo libraries. Copyright Autodesk 2023 - + - - - + + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec index 99e7907668a..bd2127d8cd4 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec @@ -26,7 +26,7 @@ Copyright Autodesk 2023 - + @@ -36,25 +36,25 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec index 5e082bd1d0a..26bcb36c694 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec @@ -20,7 +20,7 @@ Copyright Autodesk 2023 - + @@ -28,18 +28,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec index 801531cc3d2..2e1ccddb92c 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec @@ -16,16 +16,16 @@ This package contains all that is required to get up and running creating tests for Dynamo libraries. Copyright Autodesk 2023 - + - - - + + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec index 500865df450..84a8254e081 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec @@ -23,7 +23,7 @@ - + @@ -31,9 +31,9 @@ - - - + + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec index 0a5eba75278..b756cebe764 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec @@ -15,17 +15,17 @@ This package contains all that is required to get up and running building zero touch libraries for the Dynamo Visual Programming language. Copyright Autodesk 2023 - + - - - - + + + +