Skip to content

Commit 9c60ed5

Browse files
authored
Merge pull request #386 from TheGoddessInari/vs2019
Minimally support Visual Studio 2019.
2 parents caf78d5 + ca14a1c commit 9c60ed5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/windows_registry.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ pub enum VsVers {
103103
Vs14,
104104
/// Visual Studio 15 (2017)
105105
Vs15,
106+
/// Visual Studio 16 (2019)
107+
Vs16,
106108

107109
/// Hidden variant that should not be matched on. Callers that want to
108110
/// handle an enumeration of `VsVers` instances should always have a default
@@ -128,6 +130,7 @@ pub fn find_vs_version() -> Result<VsVers, String> {
128130

129131
match env::var("VisualStudioVersion") {
130132
Ok(version) => match &version[..] {
133+
"16.0" => Ok(VsVers::Vs16),
131134
"15.0" => Ok(VsVers::Vs15),
132135
"14.0" => Ok(VsVers::Vs14),
133136
"12.0" => Ok(VsVers::Vs12),
@@ -144,7 +147,9 @@ pub fn find_vs_version() -> Result<VsVers, String> {
144147
_ => {
145148
// Check for the presense of a specific registry key
146149
// that indicates visual studio is installed.
147-
if impl_::has_msbuild_version("15.0") {
150+
if impl_::has_msbuild_version("16.0") {
151+
Ok(VsVers::Vs16)
152+
} else if impl_::has_msbuild_version("15.0") {
148153
Ok(VsVers::Vs15)
149154
} else if impl_::has_msbuild_version("14.0") {
150155
Ok(VsVers::Vs14)

0 commit comments

Comments
 (0)