Error running updated GroupDocs.Search-for-.NET-master\Demos\WebForms to 4.8

Hi team

I downloaded GroupDocs.Search-for-.NET-master, then open in visual studio 17.7.3

Then accept migrate to 4.8 net framework version.

the click on run, and I have the following error

Server Error in ‘/search’ Application.

Could not find a part of the path ‘C:\Temp\GroupDocs.Search-for-.NET-master\Demos\WebForms\src\bin\roslyn\csc.exe’.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Temp\GroupDocs.Search-for-.NET-master\Demos\WebForms\src\bin\roslyn\csc.exe’.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

`[DirectoryNotFoundException: Could not find a part of the path ‘C:\Temp\GroupDocs.Search-for-.NET-master\Demos\WebForms\src\bin\roslyn\csc.exe’.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +281
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1071
System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share) +126
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.get_CompilerName() +130
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) +828
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) +185
System.Web.Compilation.AssemblyBuilder.Compile() +2043
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +357
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +12060721
System.Web.Compilation.BuildManager.CompileGlobalAsax() +52
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +341

[HttpException (0x80004005): Could not find a part of the path ‘C:\Temp\GroupDocs.Search-for-.NET-master\Demos\WebForms\src\bin\roslyn\csc.exe’.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +631
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +38
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +758

[HttpException (0x80004005): Could not find a part of the path ‘C:\Temp\GroupDocs.Search-for-.NET-master\Demos\WebForms\src\bin\roslyn\csc.exe’.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +732`

@abalmeida

We cannot reproduce this issue at our end. Please clean your solution, rebuild and then try to run it.
If issue persists, please share a screencast/video covering the steps to reproduce the issue.

Thanks, I commented “your” code, and now is working (see the end of this mail)

  <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
  <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>

If is possible I recomend to upgrade your examples to Net4.8 and VS 2017.7.3 for instance.

Best regards

1 Like

@abalmeida

Thank you for the suggestion. We’ll surely look into it.