File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments