Free Support Forum - groupdocs.com

Compatibly Matrix for .Net

Our project is currently built on.Net 5 (.Net Core 5) and the examples for the Search do not work out of the box. We are trying to consider this product but I’m not sure if it is compatible. With .Net 5 being fairly new is the documentation just a little bit behind? Is it only compatible with .Net Framework?

Thanks,
Keaton

@kramsdell

Please have a look at these system requirements. However, we’ve logged your scenario in our internal issue tracking system and it will be further investigated. Your investigation ticket ID is SEARCHNET-2558. You’ll be notified in case of any update.

@Atir_Tahir

I also went to your github under the demos folder and that appears to be broken as well. During the upload it tries to do a SaveAs when parts of the path are missing causing it to fail. I’ve not been able to find a successful version of the demo or example code even after spinning of a poc project in 4.7.2.

Any advice?

1 Like

@kramsdell

Please clone or download this open-source application. Let us know if you face any issue.

We’ve updated the example project here. And now it includes example project for .NET Core 5.0.

image.png (102.1 KB)

This needs to added to the csprj

    <Target Name="CopyRoslynFiles" AfterTargets="AfterBuild" Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'">
    <ItemGroup>
      <RoslynFiles Include="$(CscToolPath)\*" />
    </ItemGroup>
    <MakeDir Directories="$(WebProjectOutputDir)\bin\roslyn" />
    <Copy SourceFiles="@(RoslynFiles)" DestinationFolder="$(WebProjectOutputDir)\bin\roslyn" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
  </Target>

@Atir_Tahir

It doesn’t seem to affect the functionality, but when you try and go to set breakpoints Visual Studio produces many errors.

image.png (242.6 KB)

@kramsdell

Below is our findings:
There are 2 projects and probably you are running the Core project, but trying to debug the .NET Framework project. To avoid the conflict, we have splitted the projects into 2 solutions and committed the changes here.
Could you please check-out the updates and open the .NET Core solution individually? Because we cannot reproduce this issue at our end.

Hey @Atir_Tahir

The .Net examples to run when using your exact code.
When trying to test with a custom index and document path it runs into an issue.

It says that docx is unsupported, but according to https://docs.groupdocs.com/viewer/net/supported-document-formats/ that is not the case. Can you advise?

image.png (7.1 KB)

Thanks,
-Keaton

1 Like

@kramsdell

Could you please also share the problematic file?

Blah.docx (11.6 KB)
Test.docx (11.6 KB)

1 Like

@kramsdell

In the screenshot, the file name is ~$Blah.docx. That is, this is not a Blah.docx file, but a different one. Apparently, this file (Blah.docx) was opened by the customer in a text editor, which, when opened, creates similar temporary files next to the original one.
And since the file is temporary and is only created while working with the original file, it is locked for reading with a text editor, so an error occurs during indexing. It is also possible that such temporary files have a different format than DOCX.

GroupDocs.zip (3.1 KB)
My version of the code

@kramsdell

We’re investigating this code. You’ll be notified about the outcomes.

@kramsdell

Everything seems good with your code. In your code, you uncommented the next 5 tests, which give some noise when reading test results:

BuildYourFirstSearchSolution.RunAsynchronousIndexing();
BuildSearchQuery.Run();
WorkWithSearchResults.ObtainSearchResultInformation();
WorkWithSearchResults.HighlightSearchResults();
GetSupportedFileFormats.Run();

But you modified only one test:

BuildSearchQuery.Run();

So, we think that you should comment out others. Below are the changes:

{
  Console.WriteLine("Please enter query phrase:");
  string query = Console.ReadLine();
  SearchResult result = index.Search(query);
  Console.WriteLine("Query: " + query);
  Console.WriteLine("Documents: " + result.DocumentCount);
  Console.WriteLine("Occurrences: " + result.OccurrenceCount);
  Console.WriteLine();
}

Please have a look at the query language specification here. Secondly, are you evaluating the API in trial mode (without any license, even the temporary license)? You may face some limitations in that case. Have a look at the API evaluation limitations. However, you can avail a temporary license here.
If issue persists, please send us a screencast/video.