We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

ViewerConfig could not be found

Hello all,
I am using Groupdocs.viewer 19.6.
I have a function which look like below

public static ViewerConfig GetConfigurations()
{
    //ExStart:Configurations
    ViewerConfig config = new ViewerConfig();
    //set the storage path
    config.StoragePath = StoragePath;
    //Uncomment the below line for cache purpose
    config.EnableCaching = true;
    config.CacheFolderName = "cachefolder";
    return config;
    //ExEnd:Configurations
}

now I upgraded the groupdocs.viewer from 19.6 to 20.8 and I am getting theb error

ViewerConfig could not be found

I had go through the release notes but not able to understand what should be done here.

@Niteen_Jadhav

In 19.8 we’ve changed our public API. There is no ViewerConfig type in the new version of the API. Check How to migrate to GroupDocs.Viewer 19.8 or higher article for more details. Now you can directly pass a path to the file as a constructor parameter of Viewer class

using (Viewer viewer = new Viewer("sample.docx"))
{
   HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources();
   viewer.View(options);
}

In case you have any issues with migration we’ll try to assist you.