Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error CS1576 with mono and System.Web.Hosting.VirtualPathProvider  #13993

@lexxus2005

Description

@lexxus2005

Steps to Reproduce

I test solution from https://github.com/lexxus2005/monotest

I am use a System.Web.Hosting.VirtualPathProvider for access to embeded aspx file in other dll. I find the sample in th web.

  1. Build this solution under Visual Studio and deploy on IIS server. All works fine.
  2. If i am deploy this project on xsp4 server or apache mono_mod i get a error:
    System.Web.Compilation.CompilationException
    CS1576: The line number specified for #line directive is missing or invalid

https://github.com/lexxus2005/monotest

Screenshot from 2019-04-11 15-36-47

On which platforms did you notice this

[ ] macOS
[x] Linux
[x] Windows

Version Used: 5.18.0.240

Stacktrace

at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00312] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00008] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, System.Boolean debug) [0x00202] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, System.Boolean debug) [0x00106] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0

System.Web.Compilation.CompilationException
CS1576: The line number specified for #line directive is missing or invalid

Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.

Details: CS1576: The line number specified for #line directive is missing or invalid

Error origin: Compiler

Error source file: /tmp/www-data-temp-aspnet-0/1ec5fe0f/App_Web_hzmr198n_1.cs
Exception stack trace:
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00312] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00008] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, System.Boolean debug) [0x00202] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, System.Boolean debug) [0x00106] in <3e7f5ad0056f4fcd8a164c7d821f158c>:0
Error source context:

Error lines: 69, 76, 82, 88, 94, 100
67: private void @__BuildControlTree(app_resource_webapplicationcontrols_dll_webapplicationcontrols_webusercontrol1_ascx @__ctrl) {
68:
69: #line 0 ""
70: this.@__BuildControl_Button1();
71:
Full error source code: (click to show):
Compiler command line (click to show):
Version Information: 5.18.0.240 (tarball Wed Jan 16 09:13:03 UTC 2019); ASP.NET Version: 4.0.30319.42000

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions