2

I'm hoping to use something like the code put forward by MartinHN in the following post to create HTML formatted SMTP mail items: SO POST

Having problems creating a reference to the correct assemblies so that I can use the namespace "System.Web.UI.WebControls". the reference I'm trying to add is "System.Web" as suggested in HERE

In the .NET section of my vis stud project's references I do not have System.Web:

enter image description here

If I browse my C-Drive and add a System.Web.dll file then I get the following:

enter image description here

How do I configure this project so that I'm able to use MailDefinition ?

2
  • Is your project setup to target the client profile versions of .NET? Commented Sep 23, 2012 at 19:34
  • alright Arran - just spotted this : SO POST ...my is a console app - I've just changed and will see what happens Commented Sep 23, 2012 at 19:36

1 Answer 1

5

If you change target framework from .NET client profile to .NET Framework 4 you shall be able to add system.web reference even in console Application.

Attached here are the Sreenshots from VS2012

enter image description here

enter image description here

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

2 Comments

@whytheq .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. That is why system.web dll is not available.
I pretty much always accept answers but quite often I leave questions open for some time first - just in case anyone else wants to contribute. I can't imagine anyone else will be able to add any further value than your answer.

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.