Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 766377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:02:18+00:00 2026-05-14T17:02:18+00:00

I have library code that uses ICSharpCode.SharpZipLib under the hood to make it easy

  • 0

I have library code that uses ICSharpCode.SharpZipLib under the hood to make it easy to use ZIP files as data sources when running integration tests.

As it stands, if I reference my library from another project, the other project will compile just fine, but when it accesses the code that uses SharpZipLib, I get an exception for it not finding the zip library:

failed: System.IO.FileNotFoundException : Could not load file or assembly ‘ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73’ or one of its dependencies. The system cannot find the file specified.

If the types in my library derived from a class in SharpZipLib, it’d generate a compile error CS0012. What other ways are there for triggering a CS0012, so that using code that requires SharpZipLib (but doesn’t clearly indicate it) would cause consumer code to fail compilation?

I’ve had similar problems in the past when I’ve used libraries like DeftTech.DuckTyping under the hood. I’d add my library code to a new project, start working, compile, run, and then suddenly hit an edge case that I’d used duck typing to get around and get a runtime error.

What I’d most like is to have the same behavior as if I’d derived from a type in the 3rd-party library, so that a reference to my derived type generates a CS0012:

The type ‘type’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘assembly’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T17:02:19+00:00Added an answer on May 14, 2026 at 5:02 pm

    You only get compiler errors if you are DIRECTLY interacting with libraries that aren’t referenced.

    If you use other libraries that internally use a third party library then you will never get a compiler error. The reason is this just doesn’t make much sense having a compile error because:

    • It does not affect compiling at all, so why a compiler error?
    • Your application MIGHT run correctly, because there is no guarantee the third-party library EVER gets called.
    • It might actually break several libraries, that e.g. do reference external libraries for debugging, but just don’t ship them for release.

    Edit: If your problem is that you are forgetting about the third-party library you can simply reference it directly from your application even if you never use it. Then e.g. Visual Studio will automatically copy it to your output bin folder and includes it in setups, and so on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 512k
  • Answers 512k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Unless the SMS is intended for your midlet (i.e. it's… May 16, 2026 at 5:35 pm
  • Editorial Team
    Editorial Team added an answer I cannot believe that I spent almost five days on… May 16, 2026 at 5:35 pm
  • Editorial Team
    Editorial Team added an answer Look here, if($(this).text() == "Grocery"){ $(".type_changer").attr("id", "gro"); }else if($(this).text() ==… May 16, 2026 at 5:35 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have code that uses the BeautifulSoup library for parsing, but it is very
I have a section of code that uses a Boost library that results in
I'm writing some library code, and classes that use that code are required to
I have some code that uses some shared libraries (c code on gcc). When
I'm writing some code that uses a Tree (a regular tree that can have
I have a code library written in plain old C++ (no .NET/managed code) and
I have inherited a pure C project that uses GNU Pth ( http://www.gnu.org/software/pth/ )
I need to find the code size for a library developed using C on
does anyone have any suggestions for what I can do to try and create
I'm working on converting NerdDinner to Spark and have everything except the mobile views

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.