Compilation Error

Last post 10-22-2008 10:06 AM by yinung@okstate.edu. 2 replies.

Sort Posts:

  • Compilation Error

    10-21-2008, 5:55 PM

    I was trying a small application from book,

    after I run this application, the web page would show as follows:

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1595: 'FriendReunion.Global' is defined in multiple places; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\friendreunion\2fae48f1\4c99a6c7\assembly\dl2\52518be7\8eed1174_c433c901\FriendsReunion.DLL'

    Source Error:

    Line 26:     
    Line 27:     [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
    Line 28:     public class Global_asax : FriendReunion.Global {
    Line 29:         
    Line 30:         private static bool __initialized = false;

    Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\friendreunion\2fae48f1\4c99a6c7\ghf959hd.0.cs    Line: 28



    C:\WINDOWS\system32> "c:\windows\microsoft.net\framework\v1.1.4322\csc.exe" /t:library /utf8output /R:"c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll" /R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\friendreunion\2fae48f1\4c99a6c7\assembly\dl2\52518be7\8eed1174_c433c901\friendsreunion.dll" /R:"c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\friendreunion\2fae48f1\4c99a6c7\assembly\dl2\ba55e65f\c3604344_c533c901\friendreunion.dll" /R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\friendreunion\2fae48f1\4c99a6c7\ghf959hd.dll" /D:DEBUG /debug+ /optimize- /warnaserror /w:1  "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\friendreunion\2fae48f1\4c99a6c7\ghf959hd.0.cs"
    
    
    Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
    for Microsoft (R) .NET Framework version 1.1.4322
    Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
    
    c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\friendreunion\2fae48f1\4c99a6c7\ghf959hd.0.cs(28,32): error CS1595: 'FriendReunion.Global' is defined in multiple places; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\friendreunion\2fae48f1\4c99a6c7\assembly\dl2\52518be7\8eed1174_c433c901\FriendsReunion.DLL'
    


     


    Line 1:    //------------------------------------------------------------------------------
    Line 2:    // <autogenerated>
    Line 3:    //     This code was generated by a tool.
    Line 4:    //     Runtime Version: 1.1.4322.2407
    Line 5:    //
    Line 6:    //     Changes to this file may cause incorrect behavior and will be lost if 
    Line 7:    //     the code is regenerated.
    Line 8:    // </autogenerated>
    Line 9:    //------------------------------------------------------------------------------
    Line 10:   
    Line 11:   namespace ASP {
    Line 12:       using System;
    Line 13:       using System.Collections;
    Line 14:       using System.Collections.Specialized;
    Line 15:       using System.Configuration;
    Line 16:       using System.Text;
    Line 17:       using System.Text.RegularExpressions;
    Line 18:       using System.Web;
    Line 19:       using System.Web.Caching;
    Line 20:       using System.Web.SessionState;
    Line 21:       using System.Web.Security;
    Line 22:       using System.Web.UI;
    Line 23:       using System.Web.UI.WebControls;
    Line 24:       using System.Web.UI.HtmlControls;
    Line 25:       
    Line 26:       
    Line 27:       [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
    Line 28:       public class Global_asax : FriendReunion.Global {
    Line 29:           
    Line 30:           private static bool __initialized = false;
    Line 31:           
    Line 32:           public Global_asax() {
    Line 33:               if ((ASP.Global_asax.__initialized == false)) {
    Line 34:                   ASP.Global_asax.__initialized = true;
    Line 35:               }
    Line 36:           }
    Line 37:       }
    Line 38:   }
    Line 39:   

    I really coundn't figure that out,

    Thanks for someone who helps me.

  • Re: Compilation Error

    10-21-2008, 7:18 PM
    Answer
    • Participant
      824 point Participant
    • Agapito
    • Member since 02-22-2006, 2:30 PM
    • Lisbon - Portugal
    • Posts 183

     You probably are using a Website Project instead a Web Application Project.

    The problem with the first is that every file is compile as a diferent DLL and then they are linked all together. This is done at runtime by the IIS. And sometimes... things go wrong... Sometimes no... Manytimes :P 

     In your error message you have two friendreunion DLL, soo, CS1595: 'FriendReunion.Global' is defined in multiple places...

    c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\friendreunion\2fae48f1\4c99a6c7\assembly\dl2\52518be7\8eed1174_c433c901\friendsreunion.dll
    c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\friendreunion\2fae48f1\4c99a6c7\assembly\dl2\ba55e65f\c3604344_c533c901\friendreunion.dll

    Delete the content of this folder: c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files
    You may have to restart the iis or stop the web development server so you can clean the folder.
     

    Nuno Agapito
    www.infortucano.pt

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved.
  • Re: Compilation Error

    10-22-2008, 10:06 AM

    Thank you so much.

    After I deleted the FriendsReunion.dll, it works. Yes

Page 1 of 1 (3 items)