SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Compile error: no suitable method found to override

Last post 05-16-2007 9:31 PM by davidd. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-17-2007 4:53 PM

    Compile error: no suitable method found to override

    I am using:

    - ICSharpCode.SharpZipLibrary version 0.85.1.271
    - Visual Studio 2003 Version 7.1.3088
    - Microsoft .NET Framework 1.1 Version 1.1.4322

    When I compile, I get the following error messages:

    ICSharpCode.SharpZipLib.Zip.ZipHelperStream.CanTimeout: no suitable method found to override
    Line 91

    The code at that line is:

    #if !NET_VER_1 && !COMPACT_FRAMEWORK_V10
      public override bool CanTimeout
      {
       get { return stream_.CanTimeout; }
      }
    #endif

    And and I get a similar message in the BZip2OutputStream.cs file too.

    Any help would be appreciated. Thanks.

  • 01-21-2007 9:42 AM In reply to

    Re: Compile error: no suitable method found to override

    Hi,

    NET_VER_1 is required to be defined to build with 1.1 / 2003.

    hth, -jr-

  • 05-15-2007 6:39 PM In reply to

    • davidd
    • Not Ranked
    • Joined on 05-15-2007
    • Posts 2

    Re: Compile error: no suitable method found to override

    How can you set the value of NET_VER_1?

    What do you have to set it to so that this object will comile against the 1.1 framework?

    Thanks,

    Dave
     

  • 05-15-2007 9:00 PM In reply to

    Re: Compile error: no suitable method found to override

    Hi,

    How you set this depends on your environment.

    From the command line with csc you can use /d:NET_VER_1

    In #Develop 2.1 Open Project\Project Options and in the compiling tab at the top you can enter conditional compilation symbols.  It is likely to be done similarly in other IDE environments.

    hth, -jr-

     

  • 05-16-2007 9:31 PM In reply to

    • davidd
    • Not Ranked
    • Joined on 05-15-2007
    • Posts 2

    Re: Compile error: no suitable method found to override

    Thanks for the information John.

    I'm using MSBuild so it took a bit to figure out how to pass this stuff in from the command line. In case anyone else has occassion to use it I thought I'd share how I did it.

    Inside my compile target I set a <csc> block with the DefineConstants property being used like /d: using csc from the command line to set the confitional compilation symbol:

            <Csc
                  DefineConstants="$(DefineConstants)"
            />

     Then, in the area where I set my other properties I have a DefineConstants node that will pass in the right setting based on what framework version I'm trying to compile against.

        <Choose>
            <When Condition=" '$(TargetFrameworkVersion)'=='1.1' ">
                <PropertyGroup>
                    <DefineConstants>$(DefineConstants);NET_VER_1</DefineConstants>           
                    <TargetFrameworkVersion>v1.1</TargetFrameworkVersion>
                </PropertyGroup>
            </When>
            <When Condition=" '$(TargetFrameworkVersion)'=='2.0' ">
                <PropertyGroup>
                    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
                </PropertyGroup>
            </When>
        </Choose>

    In Visual Studio it's almost exactly like it is in your IDE. You just go to Project/Properties and then the Build tab and add in what you need in to the Conditional Compilation Symbols field.

    As an aside, I didn't see how to switch to target another .NET framework to compile against in VS. Very easy in SharpDevelop.

    Thanks again,

    Dave
     

    JohnReilly:

    Hi,

    How you set this depends on your environment.

    From the command line with csc you can use /d:NET_VER_1

    In #Develop 2.1 Open Project\Project Options and in the compiling tab at the top you can enter conditional compilation symbols.  It is likely to be done similarly in other IDE environments.

    hth, -jr-

     

Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.