title: ImageResizer 'Use .Build(new Image Job(source, dest, settings, dispose Source, add FileExtension)).Final Path instead'
body: <p>I'm using imageresizer, it works very well at run time:</p>
  
  <pre><code>foreach (string fileKey in Request.Files.Keys)
              {
                  //Skip unused file controls.
                  var file = Request.Files[fileKey];
                  if (file.ContentLength &lt;= 0) continue; 
  
                  //Get the physical path for the uploads folder and make sure it exists
                  string desFolder = Server.MapPath("~/Data/ProductImages/") + productId.ToString();
                  if (!Directory.Exists(desFolder)) Directory.CreateDirectory(desFolder);
  
                  //string fileName;
                  string guid = System.Guid.NewGuid().ToString();
                  //Generate each version
                  foreach (string suffix in versions.Keys)
                  {
                      //Generate a filename (GUIDs are best).
                    string  filePath = Path.Combine(desFolder, guid  + suffix);
  
                      //Let the image builder add the correct extension based on the output file type
                  ImageBuilder.Current.Build(file, filePath, new ResizeSettings(versions[suffix]), false, true); 
                  }
  </code></pre>
  
  <p>but get this warning from visual studio</p>
  
  <blockquote>
    <p>ImageResizer.ImageBuilder.Build(object, object, Image Resizer.Resize
    Settings, bool, bool)' is obsolete: 'Use .Build(new Image Job(source,
    dest, settings, dispose Source, add FileExtension)).Final Path
    instead'</p>
  </blockquote>
  
  <p>how fix it?</p>