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 4172698
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:35:40+00:00 2026-05-21T00:35:40+00:00

I am really newbie to c# and VS2010. :-\ I have a "pure" Winforms

  • 0

I am really newbie to c# and VS2010. :-\

I have a "pure" Winforms application. Or at least I think so.

But suddenly (with the last changes to the source code) I have this error when build an auxiliary DLL:

Error 7
The type
‘System.Windows.Interop.HwndHost’ is
defined in an assembly that is not
referenced. You must add a reference
to assembly ‘PresentationFramework,
Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35′. D:\MyprojectPath\SharedExceptions.cs AuxLibraryProject

I don’t want to add PresentationFramework.dll to the project and even when I have tried to add it then a lot of other assemblies are required. 🙁

I want to know WHERE is the guilty of this assembly requirement. I will be happy to blame some line on my source code but I cannot find it.

The SharedExceptions.cs is one of the files changed but when I (manually) delete all changes, the error persists.

This same assembly compiles fine on a Windows XP Visual Studio 2010 system. But not on Windows Vista.


Update:

I have left alone the parent exception for all others. All other are on other files. After rebuild, the error remains on the same file. Here is the little source code. I cannot see anything requiring the new assembly:

using System;

    namespace PROJECT.AuxLibraryProject
    {
        public class SharedExceptionParent: Exception
        {
             public string ErrorMessage
             {
                 get
                 {
                     return base.Messsage.ToString();
                 }
             }
             public SharedExceptionParent() { }
             public SharedExceptionParent(string errorMessage) : base(errorMessage) { }
             public SharedExceptionParent(string errorMessage, Exception innerEx) : base(errorMessage, innerEx) { }
        }
    }
  • 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-21T00:35:40+00:00Added an answer on May 21, 2026 at 12:35 am

    I have found it:

    This line on top of namespace keyword on two assemblies was the culprit:

    [assembly: CLSCompliant(true)]
    

    I have deleted this line on both assemblies and all builds fine now.

    Greetings.

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

Sidebar

Related Questions

this is really a newbie question, but it would help me to have a
I'm a newbie making a really simple app in rails, but I have no
Sorry, really newbie question, but if I was to create an ASP.NET website application,
This is probably a really newbie question (well, I'm pretty sure it is), but
A newbie question,really. Suppose I have a html table like this: <div id=div1> <table
A newbie question (I haven't really created new projects in Eclipse yet): I have
Sorry fot his newbie question. But I really need a start on this one.
I am really a newbie to Moodle and I have got this advanced functionality
I have C dll with some complicated struct and I ma really a newbie
This is really a newbie question, but I don't know how to search answers

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.