I downloaded the sample package and tried build it at my local.
It gives me following error
1>D:\Samples\GroupDocs\GroupDocs.Viewer-for-.NET-master\Examples\GroupDocs.Viewer.Examples.VisualBasic\GroupDocs.Viewer.Examples.VisualBasic.vbproj(155,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see Troubleshooting NuGet Package Restore in Visual Studio | Microsoft Learn. The missing file is D:\Samples\GroupDocs\GroupDocs.Viewer-for-.NET-master\Examples\.nuget\NuGet.targets.
I have tried restore, updates, add reference of Groupdocs.Viewers.dll.
But I always got the same error.
Please help
Hi Herbert,
- Right click on solution and press "Enable NuGet package Restore"
- Right click on solution and press "Manage NuGet packages for Solution"
- Press “Restore” button
- Build the project
Thanks for the reply
I can build the VB project after following your steps above.
But I can’t run it because my .net framework is 4.5. I change the VB target platform to 4.5, the program just quit immidiately.
Is this sample only support .net framework 4.0?
Hi Herbert,
the error happens when new configuration in utilities.vb see code below.
Public Shared Function GetConfigurations() As ViewerConfig
'ExStart:Configurations
>>>>>> Dim config As New ViewerConfig()
'set the storage path
config.StoragePath = StoragePath
'Uncomment the below line for cache purpose
'config.UseCache = true;
config.CacheFolderName = “CacheFolder”
Return config
'ExEnd:Configurations
End Function
The exception is can’t find configuration file.
An unhandled exception of type ‘System.Configuration.ConfigurationErrorsException’ occurred in GroupDocs.Viewer.dll
Additional information: Unable to load configurations file.
I have tried dll inside the downloaded packages and the one included in msi package.
Hi Herbert,
Hi Herbert,
It runs after I use the new app.config.
During my testing, I found the watermark feature is not working. Is it because of the demo version?
Also, the VB sample is not well tested. there are code with obvious error like below in ViewGenerator.vb
Utilities.SaveAsImage(image.PageNumber + “_” + DocumentName, image.Stream)
One more question, do you provide API for C++?
Thanks
Hi Herbert,