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

Updated ClickToBuild.cmd to support VS2019 (v16) and VS2022 (v17) #8764

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 4 additions & 17 deletions ClickToBuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,18 @@
REM Necessary for the InstallDir variable to work inside the MsBuild-finding loop below.
SETLOCAL ENABLEDELAYEDEXPANSION

for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[15.0,16.0)" -requires Microsoft.Component.MSBuild`) do (
for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[16.0,18.0)" -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" (
set InstallDir=%%j
echo !InstallDir!
if exist "!InstallDir!\MSBuild\15.0\Bin\MSBuild.exe" (
echo "Using MSBuild from Visual Studio 2017"
set msbuild="!InstallDir!\MSBuild\15.0\Bin\MSBuild.exe"
if exist "!InstallDir!\MSBuild\Current\Bin\MSBuild.exe" (
echo "Using MSBuild from !InstallDir!"
set msbuild="!InstallDir!\MSBuild\Current\Bin\MSBuild.exe"
goto build
)
)
)

FOR %%b in (
"%VS140COMNTOOLS%\vsvars32.bat"
"%VS120COMNTOOLS%\vsvars32.bat"
"%VS110COMNTOOLS%\vsvars32.bat"
) do (
if exist %%b (
echo "Using MSBuild from %%b"
call %%b
set msbuild="msbuild"
goto build
)
)

echo "Unable to detect suitable environment. Build may not succeed."

:build
Expand Down
Binary file modified lib/nuget/nuget.exe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public int Port {
set { this.Store(x => x.Port, value); }
}

[Obsolete($"Use {nameof(AutoSelectEncryption)} and/or {nameof(EncryptionMethod)} instead.")]
[Obsolete("Use " + nameof(AutoSelectEncryption) + " and/or "+ nameof(EncryptionMethod) + " instead.")]
public bool EnableSsl => this.Retrieve(x => x.EnableSsl);

public SmtpEncryptionMethod EncryptionMethod {
Expand Down
Loading