code: protected final void findMSBuild() throws MojoExecutionException
      {
          if ( msbuildPath == null )
          {
              // not set in configuration try system environment
              String msbuildEnv = System.getenv( ENV_MSBUILD_PATH );
              if ( msbuildEnv != null )
              {
                  msbuildPath = new File( msbuildEnv );
              }
          }
          if ( msbuildPath != null
                  && msbuildPath.exists()
                  && msbuildPath.isFile() )
          {
              getLog().debug( "Using MSBuild at " + msbuildPath );
              // TODO: Could check that this is really MSBuild
              return;
          }
          throw new MojoExecutionException(
                  "MSBuild could not be found. You need to configure it in the "
                  + "plugin configuration section in the pom file using "
                  + "<msbuild.path>...</msbuild.path> or "
                  + "<properties><msbuild.path>...</msbuild.path></properties> "
                  + "or on command-line using -Dmsbuild.path=... or by setting "
                  + "the environment variable " + ENV_MSBUILD_PATH );
      }
docs: Attempts to locate MSBuild.
  First looks at the mojo configuration property, if not found there try
  the system environment.
  @throws MojoExecutionException if MSBuild cannot be located