Ok guys, this one is not easy...
For the story, I got a old 3.5 ASP.NET/VB.NET website project (ASPX) build on VS2012 that I've upgraded to 4.5 to run well on VS2015.
I'm also trying to remove all the compilations errors that it got, even if the website was working under them (VB.NET is weird...)
During this operation, I've got some unchanged codes that worked well before but they don't let me run anymore.
So, here is the build problem:
I've got a UserControl (
Partial Public Class private_MasterPage
Public _debug As Integer = HttpContext.Current.Request.Params("debug")
Public ReadOnly Property ModeDebug As Integer
Public Class private_UserControls_FicheCRF_OngletAccueil
Public ReadOnly Property modeDebug As Integer
Return DirectCast(Me.Page.Master, private_MasterPage).ModeDebug
<%@ Page Async="true" Title="" Language="VB" MasterPageFile="~/private/MasterPage.master" AutoEventWireup="false" CodeFile="ficheCRF.aspx.vb" Inherits="Vita.public_ficheCRF" %>
<%@ Register TagPrefix="VitaTools" TagName="OngletAccueil" Src="UserControls/FicheCRF/OngletAccueil.ascx" %>
Type 'private_MasterPage' is not defined.
<add tagPrefix="VitaTools" src="~/private/UserControls/FicheCRF/PosteUser.ascx" tagName="PosteUser" />
<add tagPrefix="VitaTools" src="~/private/UserControls/FicheCRF/NotesDeFrais.ascx" tagName="NotesDeFrais" />
<add tagPrefix="VitaTools" src="~/private/UserControls/FicheCRF/CrfEvals_CollaborateursInternes.ascx" tagName="EvalsCollaborateursInternes" />
<compilation debug="true" batch="false" strict="false" explicit="true" targetFramework="4.5">
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
Ok guys, I got it, by changing PC...
I think the problem come from compilating the project on different versions of VS.
I did only one compilation of my project on 2012 and then the compilation on 2015 made this unbreakable error...
So even if you purge some temp folders like
AppData\Local\Temp\Temporary ASP.NET Files,
.vs\project\v14\.suo, it's not enough.
After some more debug on others things that appeared, I can now compile with 0 errors and publish also after bit more debug. Now I'm on some other problems on runtime, it's still not fully working like before but it's getting closer ;)
What I did before worked for the compilation but it didn't solved the runtime (the bug came back on runtime as InvalidCastException).
To solve the runtime, I just checked the Build/Publish option "use fixed naming and single page assemblies" and it solved my case :)
Unckeck also the build (and publish) option "Allow this precompiled site to be updatable"
Here some useful links: https://msdn.microsoft.com/en-us/library/hh475319(v=vs.110).aspx