Last post Mar 25, 2018 10:46 AM by RateFor
Mar 16, 2018 10:41 AM|RateFor|LINK
I came to Visual Studio this morning, opened my project, and it won't compile.
I get errors such as:
C:\Users\ratef\AppData\Local\Temp\Temporary ASP.NET Files\root\e35bcb80\1ec0ee12\App_Web_oggwfoer.12.vb(450,0): error BC30269: 'Private Sub __PageInspector_EndRenderTracing(parameters() As Object)' has multiple definitions with identical signatures.
I get an odd display in my webpages such as:
#ExternalSource ("C:\rateforsuccess\zUser\enterquiz2.aspx", 17)
__o = session("varseeanswer")
Mar 16, 2018 10:58 AM|PatriceSc|LINK
ASPX markup is compiled to C# code and my understanding is that this directive is to keep track from which ASPX line comes this piece of code. It is likely unrelated to your issue which seems to be that the same __PageInspector_EndRenderTracing method is
Or could it be old files are left over and compiled as a whole. I would reboot and/or would clean up temp folders before trying again.
Mar 16, 2018 11:47 AM|RateFor|LINK
I tried rebooting and cleaning up temp folders, and now I have this error. Note that I've never written a function named loadhelper. if there are multiple definitions of a function, the compiler should tell me what function. Also note that I the page
names App_web....vb is not one that I wrote either:
Error 'Private Shared Function __PageInspector_LoadHelper(helperName As String) As System.Reflection.MethodInfo' has multiple definitions with identical signatures. C:\Users\ratef\AppData\Local\Temp\Temporary ASP.NET Files\root\e35bcb80\1ec0ee12\App_Web_ql4e2tww.30.vb 398
Mar 16, 2018 11:54 AM|mgebhard|LINK
Stop IIS close VS and delete the temp folder.
C:\Users\ratef\AppData\Local\Temp\Temporary ASP.NET Files\root\e35bcb80\1ec0ee12\
Mar 16, 2018 11:59 AM|PatriceSc|LINK
Yes, all ASPX pages are compiled into VB (or C#) so this is not some code that you directly write. It is generated for you....
You are sure this is not something that was changed inside your ASPX page and that could perhaps cause this new issue ?
I would try to open this file to spot the multiple occurrence of __PageInspector_LoadHelper and given the location or maybe with the help of an "external source" directive to try to understand where it happens.
Or if you want to just rid of this for now try perhaps to disable the "Page inspector" feature (maybe
https://forums.asp.net/t/1983141.aspx?how+to+disable+page+inspector+in+vs11 ?). From the name of the method it seems the code generated to support this feature that causes the problem.
Mar 16, 2018 01:17 PM|RateFor|LINK
Thanks for telling me about Page Inspector. I never knew I had it. An oddity though - the directives "#externalSource" appear in only 2 aspx pages of my entire solution. Furthermore, they appear often after I have a line such as
<%= viewstate("foo") %>
I'll give up for a while, and think about this.
Mar 17, 2018 09:21 AM|RateFor|LINK
This is definitely a visual studio error. if two aspx pages reference the same code-behind, and there is an error in a subroutine in
the code-behind (perhaps passing too few arguments), visual studio will compile in such a way that "#end ExternalSource" directives will litter the pages. The part I'm not sure of is whether there is more to it, because I have not isolated the problem down
<%= viewstate("foo") or session("foo2") %>
Mar 22, 2018 03:18 AM|Cathy Zou|LINK
As far as I know, #ExternalSource Indicates a mapping between specific lines of source code and text external to the source.
This directive is used only by the compiler and the debugger.
A source file may include external source directives, which indicate a mapping between specific lines of code in the source file and text external to the source, such as an .aspx file. If errors are encountered in the designated source code during compilation,
they are identified as coming from the external source.
External source directives have no effect on compilation and cannot be nested. They are intended for internal use by the application only.
Related link as below:
Mar 25, 2018 10:46 AM|RateFor|LINK
I managed to get the program to work now, There was a case of
<%=session(".... ") %>
However, once I fixed it I didn't write down exactly what I had done wrong.
This is a bug in VS 2017, however. It should never leave a page with directives appearing when you look at it, it can't compile a page with directives in it, and it can't get rid of them either. In fact, the first directive didn't even have a beginning,
it started with #End ExternalSource.