views:

205

answers:

3

Hi when building my application I am getting some temporary files shown in Solution Explorer under Miscellaneous Files lie App_Web_YDKG.VB with following code block in that generating error

Protected ReadOnly Property Profile() As System.Web.Profile.DefaultProfile
    Get
        Return CType(Me.Context.Profile,System.Web.Profile.DefaultProfile)
    End Get
End Property

Error :

Error 58 'Protected ReadOnly Property Profile() As System.Web.Profile.DefaultProfile' has multiple definitions with identical signatures. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\infinityvb\2ae71c27\d560144b\App_Web_pwduczex.38.vb 456

+1  A: 

stop the Visual Studio and delete temporary files from the .NET framework folder. Usually it is here:

[Windows Folder]\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
TheVillageIdiot
A: 

I had this yesterday - a reboot fixed it. I can't say for certain what caused it or the 'correct' solution.

Phill Duffy
A: 

I keep a batch file in my environment path just for these circumstances... wrap this up in a .bat or .cmd file:

REM ClearTemp.cmd 

@echo off 
net stop w3svc

del "%WINDIR%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*.*" /s /f /q
for /d %%d in ("%WINDIR%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*") do rmdir "%%d" /s /q 

net start w3svc
pause
Saul Dolgin
Hi all Thanks for your replys Hi Saul Dolgin its quite surprising that people know DOS at that much levelI have delete all temporary files but when i againg build the solution again its created there
@Ankur There must be more to this error. The temporary folder will always have files created in it upon running the web application. I suggest you hunt down all the definitions of this "Profile" property and make sure they are not colliding in your page class. Maybe you have multiple declarations of the same property which are somehow conflicting with each other upon compilation? Is the property declared in a code-behind as well as the ASPX or designer class?
Saul Dolgin