diff --git a/CreateDLL/CreateDLL.csproj b/CreateDLL/CreateDLL.csproj index fdf158d3..4e04f288 100644 --- a/CreateDLL/CreateDLL.csproj +++ b/CreateDLL/CreateDLL.csproj @@ -9,6 +9,7 @@ Properties CreateDLL NuGetForUnity + net472 v4.7.2 512 @@ -42,10 +43,10 @@ - C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.dll + C:\Program Files\Unity\Hub\Editor\2020.3.20f1\Editor\Data\Managed\UnityEditor.dll - C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll + C:\Program Files\Unity\Hub\Editor\2020.3.20f1\Editor\Data\Managed\UnityEngine.dll diff --git a/Packager/NuGetForUnity.unitypackage b/Packager/NuGetForUnity.unitypackage index 8432e1a8..fb1ea828 100644 Binary files a/Packager/NuGetForUnity.unitypackage and b/Packager/NuGetForUnity.unitypackage differ diff --git a/build.ps1 b/build.ps1 index 73c1b078..5d6d1a68 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,7 +1,7 @@ param([string]$OutputDirectory = ".\bin") Import-Module UnitySetup -ErrorAction Stop -MinimumVersion 4.0.97 -Import-Module VSSetup -ErrorAction Stop -MinimumVersion 2.0.1.32208 +# Import-Module VSSetup -ErrorAction Stop -MinimumVersion 2.0.1.32208 Write-Host "Build NuGetForUnity " -ForegroundColor Green @@ -18,13 +18,16 @@ Write-Host "Building package with Unity $projectVersion" -ForegroundColor Green # Build the NuGetForUnity .dlls -$vspath = Get-VSSetupInstance | - Select-VSSetupInstance -Require Microsoft.Component.MSBuild -Latest | - Select-Object -ExpandProperty InstallationPath +# $vspath = Get-VSSetupInstance | +# Select-VSSetupInstance -Require Microsoft.Component.MSBuild -Latest | +# Select-Object -ExpandProperty InstallationPath -$msbuild = Get-ChildItem "$vspath" -Filter msbuild.exe -Recurse | Select-Object -First 1 -ExpandProperty FullName +$msbuild = Get-ChildItem "C:\Program Files\JetBrains\JetBrains Rider*\tools\MSBuild\Current\Bin\" -Filter msbuild.exe -Recurse | Select-Object -First 1 -ExpandProperty FullName if ( !$msbuild -or $msbuild -eq "" ) { - throw "Could not find msbuild" + $msbuild = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\*\*\MSBuild\Current\Bin\" -Filter msbuild.exe -Recurse | Select-Object -First 1 -ExpandProperty FullName + if ( !$msbuild -or $msbuild -eq "" ) { + throw "Could not find msbuild" + } } $ReferencePath = "$unityPath\Editor\Data\Managed\"