0

I need to compile a class library (DLL) from an ASP.NET source. Now when I try to build it says this:

The type 'System.ComponentModel.ISupportInitialize' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Now I know that I have to put it in the web.config file. But there is no web.config file it's just the source of the dll that needs to be compiled.

How can I do this?

1 Answer 1

1

You should follow the directions in the error message and add a reference to the System.dll assembly in your class library project.

Right-click on your project, select Add Reference... in the context menu, then choose the System entry in the .NET tab.

Sign up to request clarification or add additional context in comments.

2 Comments

I'd agree, except isn't System always included by default?
@Rup, by default, yes, but it looks like @baklap has removed the default references from his project. System.ComponentModel.ISupportInitialize is present in all .NET versions, so I don't think there's a mismatch there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.