Bug 39873 - Error running mcs: Cannot find the specified file
Summary: Error running mcs: Cannot find the specified file
Status: ASSIGNED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 3.10.0
Hardware: Other Other
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2016-03-23 20:39 UTC by Jamie Rees
Modified: 2016-05-30 08:44 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Jamie Rees 2016-03-23 20:39:35 UTC
Hello,

I am writing a .Net web application using the Nancy framework.
I have spoken to the Nancy team and they have pointed me in this direction.

The issue is in the following Github issue: https://github.com/tidusjar/PlexRequests.Net/issues/50#issuecomment-200524140


Error Message:
Nancy.RequestExecutionException: Oh noes! ---> System.SystemException: Error running mcs: Cannot find the specified file
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters,string[]) <0x004c3>
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters,string[]) <0x00023>
at Mono.CSharp.CSharpCodeCompiler.CompileFromDomBatch (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit[]) <0x0036f>
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit[]) <0x00023>
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit[]) <0x00034>
at Nancy.ViewEngines.Razor.RazorViewEngine.GenerateRazorViewFactory (Nancy.ViewEngines.Razor.IRazorViewRenderer,System.Web.Razor.GeneratorResults,System.Reflection.Assembly,System.Type,Nancy.ViewEngines.ViewLocationResult) <0x004f3>
at Nancy.ViewEngines.Razor.RazorViewEngine.GetCompiledViewFactory (string,System.IO.TextReader,System.Reflection.Assembly,System.Type,Nancy.ViewEngines.ViewLocationResult) <0x00143>
at Nancy.ViewEngines.Razor.RazorViewEngine/<>c__DisplayClass5c.b__5b (Nancy.ViewEngines.ViewLocationResult) <0x00063>
at Nancy.ViewEngines.DefaultViewCache/<>c__DisplayClass1`1>.b__0 (Nancy.ViewEngines.ViewLocationResult) <0x00018>
at System.Collections.Concurrent.ConcurrentDictionary`2/c__AnonStorey3.<>m__0 () <0x00025>
at (wrapper delegate-invoke) System.Func`1>.invoke_TResult () <0x00046>
at System.Collections.Concurrent.SplitOrderedList`2>.ListInsert (System.Collections.Concurrent.SplitOrderedList`2/Node>,System.Collections.Concurrent.SplitOrderedList`2/Node>,System.Collections.Concurrent.SplitOrderedList`2/Node>&,System.Func`1>) <0x000f2>
at System.Collections.Concurrent.SplitOrderedList`2>.InsertInternal (uint,Nancy.ViewEngines.ViewLocationResult,System.Collections.Generic.KeyValuePair`2,System.Func`1>,System.Collections.Concurrent.SplitOrderedList`2/Node>&) <0x000af>
at System.Collections.Concurrent.SplitOrderedList`2>.InsertOrGet (uint,Nancy.ViewEngines.ViewLocationResult,System.Collections.Generic.KeyValuePair`2,System.Func`1>) <0x00037>
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd (Nancy.ViewEngines.ViewLocationResult,System.Func`2) <0x001eb>
at Nancy.ViewEngines.DefaultViewCache.GetOrAdd> (Nancy.ViewEngines.ViewLocationResult,System.Func`2>) <0x0014f>
at Nancy.ViewEngines.Razor.RazorViewEngine.GetOrCompileView (Nancy.ViewEngines.ViewLocationResult,Nancy.ViewEngines.IRenderContext,System.Reflection.Assembly,System.Type) <0x00166>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,Nancy.ViewEngines.Razor.RazorViewEngine,Nancy.ViewEngines.ViewLocationResult,Nancy.ViewEngines.IRenderContext,System.Reflection.Assembly,object) <0x0018f>
at System.Dynamic.UpdateDelegates.UpdateAndExecute5 (System.Runtime.CompilerServices.CallSite,Nancy.ViewEngines.Razor.RazorViewEngine,Nancy.ViewEngines.ViewLocationResult,Nancy.ViewEngines.IRenderContext,System.Reflection.Assembly,object) <0x004d5>
at Nancy.ViewEngines.Razor.RazorViewEngine.GetViewInstance (Nancy.ViewEngines.ViewLocationResult,Nancy.ViewEngines.IRenderContext,System.Reflection.Assembly,object) <0x0038c>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,Nancy.ViewEngines.Razor.RazorViewEngine,Nancy.ViewEngines.ViewLocationResult,Nancy.ViewEngines.IRenderContext,System.Reflection.Assembly,object) <0x0015b>
at System.Dynamic.UpdateDelegates.UpdateAndExecute5 (System.Runtime.CompilerServices.CallSite,Nancy.ViewEngines.Razor.RazorViewEngine,Nancy.ViewEngines.ViewLocationResult,Nancy.ViewEngines.IRenderContext,System.Reflection.Assembly,object) <0x004d5>
at Nancy.ViewEngines.Razor.RazorViewEngine/<>c__DisplayClass2b.b__2a (System.IO.Stream) <0x001e7>
at Nancy.Responses.MaterialisingResponse.PreExecute (Nancy.NancyContext) <0x00060>

  --- End of inner exception stack trace ---
  at Nancy.NancyEngine.InvokeOnErrorHook (Nancy.NancyContext context, Nancy.ErrorPipeline pipeline, System.Exception ex) [0x00000] in :0 


% mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov  5 13:32:50 UTC 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen
Comment 1 Andi McClure 2016-04-05 21:04:54 UTC
From the Github issue linked, the issue filer says:

"@tidusjar if you look at the version of mono I had it was a 3.* version. The mono in the package is a 4.* version. I decided to upgrade to the latest mono in the package and it looks like it does work now."

Assigning to jamierees to clarify. Are you still seeing a problem? Do you see the problem with an up-to-date mono?
Comment 2 Jamie Rees 2016-05-27 10:05:35 UTC
I am again seeing this problem.

See here:
https://github.com/tidusjar/PlexRequests.Net/issues/187

and here:

https://github.com/tidusjar/PlexRequests.Net/issues/275
Comment 3 Marek Safar 2016-05-27 16:29:50 UTC
What OS is that?
Comment 4 Jamie Rees 2016-05-27 16:30:32 UTC
Ubuntu 14
Comment 5 Marek Safar 2016-05-30 08:44:09 UTC
There isn't much wrong. It looks like you don't have mono-mcs package (or similar package) installed.

Running 'mcs' from same shell should give you error as well.

Note You need to log in before you can comment on or make changes to this bug.