Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error: Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll #10

Open
sirajmansour-infotrack opened this issue Nov 21, 2016 · 3 comments

Comments

@sirajmansour-infotrack
Copy link

After changing our build process to use the StackExchange precompiler, everything builds successfully and our build time has drastically improved thanks to this great compiler.

However we're seeing this runtime error on some of our environments as soon as we started using the stackexchange precompiler. Oddly enough, on the same environments we deploy the same application twice but with different configs, one works fine and the other is just broken because of this this runtime error :
Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll.

We generate and keep PDB files for our test and staging environments.

One theory is that one of the applications is deployed in IIS as a Website, and the other as a Web Application, but both exactly under the same privileges, Application Pool, settings, etc... But we couldn't prove this exactly either.

We're not very sure the cause behind this, in some cases re-installing visual c++ 2015 redistributable on the server fixed the issue, but in other cases it didn't.

Any help on this would be appreciated.

@m0sa
Copy link
Contributor

m0sa commented Nov 25, 2016

Are you sure you're using your pre-compiled views? You shouldn't get that at runtime unless you're trying to emit a PDB stream, which would be if you're hitting the RoslynRazorViewEngine instead of the PrecompiledViewEngine?

A complete stack trace of the exception would also be very helpful.

@sirajmansour-infotrack
Copy link
Author

sirajmansour-infotrack commented Nov 27, 2016

Thanks for the insight, i'll look more into it. It is very random the way it happens and no consistency in the way the issue appears.

In our global.asax.cs we definitely have

ViewEngines.Engines.Clear();
#if !DEBUG
         // use precompiled engine first (supports some C# 6),
         ViewEngines.Engines.Add(new PrecompiledViewEngine(typeof(Controllers.HomeController).Assembly));
#endif
         ViewEngines.Engines.Add(new RoslynRazorViewEngine());

We use TC as our build server, release mode is chosen in all our release configs.

Could it be that for some reason the PrecompiledViewEngine fails to find the view, so it falls back to the RoslynRazorViewEngine one ?.

I suspected the Virtual application path could be behind the problem when trying to locate views, but i believe it is not possible since that issue would always show up then, but instead it doesn't.

@DaniilSokolyuk
Copy link
Contributor

DaniilSokolyuk commented Nov 16, 2017

Get same problem on production after 7 days of work

System.Web.HttpParseException (0x80004005): error CS0041: Unexpected error writing debug information -- 'The version of Windows PDB writer is older than required: 'diasymreader.dll''
at StackExchange.Precompilation.RoslynRazorViewEngine.CompileToAssembly(WebPageRazorHost host, SyntaxTree syntaxTree)
at StackExchange.Precompilation.RoslynRazorViewEngine.GetTypeFromVirtualPathNoCache(String virtualPath)
at StackExchange.Precompilation.RoslynRazorViewEngine.GetTypeFromVirtualPath(String virtualPath)
at StackExchange.Precompilation.RoslynRazorViewEngine.CreateView(ControllerContext controllerContext, String viewPath, String masterPath)
at System.Web.Mvc.VirtualPathProviderViewEngine.FindView(ControllerContext controllerContext, String viewName, String masterName, Boolean useCache)
at StackExchange.Profiling.Mvc.ProfilingViewEngine.<>c__DisplayClass4.b__3()
at StackExchange.Profiling.Mvc.ProfilingViewEngine.Find(String name, Func1 finder, Boolean isPartial) at System.Web.Mvc.ViewEngineCollection.<>c__DisplayClass6.<FindView>b__5(IViewEngine e) at System.Web.Mvc.ViewEngineCollection.Find(Func2 lookup, Boolean trackSearchedPaths)
at System.Web.Mvc.ViewEngineCollection.Find(Func2 cacheLocator, Func2 locator)
at System.Web.Mvc.ViewResult.FindView(ControllerContext context)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)

Full Trace:

RaiseOnError at offset 126 in file:line:column :0:0
RecordError at offset 916 in file:line:column :0:0
RecordError at offset 703 in file:line:column :0:0
ResumeSteps at offset 536 in file:line:column :0:0
ResumeStepsFromThreadPoolThread at offset 48 in file:line:column :0:0
OnAsyncHandlerCompletion at offset 421 in file:line:column :0:0
b__3 at offset 22 in file:line:column :0:0
b__0 at offset 34 in file:line:column :0:0
SafeWrapCallback at offset 113 in file:line:column :0:0
QueueSynchronous at offset 169 in file:line:column :0:0
Sync at offset 119 in file:line:column :0:0
Sync at offset 98 in file:line:column :0:0
ExecuteAsynchronousCallback at offset 86 in file:line:column :0:0
ExecuteAsynchronousCallback at offset 86 in file:line:column :0:0
ExecuteAsynchronousCallback at offset 94 in file:line:column :0:0
ExecuteAsynchronousCallback at offset 94 in file:line:column :0:0
ExecuteAsynchronousCallback at offset 94 in file:line:column :0:0
Execute at offset 74 in file:line:column :0:0
RunInternal at offset 354 in file:line:column :0:0
Run at offset 23 in file:line:column :0:0
ExecuteWithThreadLocal at offset 553 in file:line:column :0:0
ExecuteEntry at offset 152 in file:line:column :0:0
Dispatch at offset 421 in file:line:column :0:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants