Solved

Codes problem

Posted on 2014-09-16
3
597 Views
Last Modified: 2014-09-17
Hi,
Here are the codes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;

namespace EBAAct2
{
    [ComVisible(true)]  // This is a requirement.
    [ProgId("EBAActDLL")] // The ProgId attribute is a requirement.
    [Guid("2194675D-E373-4c83-92EE-754B5F665095")]  // Hua Min to generate another GUFeat and set it here.
    public class Class1
    {
        public Class1()
        {
        }

        public string MenuFeat
        {
            get
            {
                return m_strMenuFeat;
            }

            set
            {
                m_strMenuFeat = value;
            }
        }

        public string OptionFeat
        {
            get
            {
                return m_strOptionFeat;
            }

            set
            {
                m_strOptionFeat = value;
            }
        }

        public string UserFeat
        {
            get
            {
                return m_strUserFeat;
            }

            set
            {
                m_strUserFeat = value;
            }
        }
        private string m_strMenuFeat;
        private string m_strOptionFeat;
        private string m_strUserFeat;
    }
}

Open in new window

How to resolve these errors?

Error	1	The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)	C:\proj\EBAAct2\EBAAct2\Class1.cs	5	24	EBAAct2
Error	2	The type or namespace name 'UI' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)	C:\proj\EBAAct2\EBAAct2\Class1.cs	7	18	EBAAct2
Error	3	The type or namespace name 'ComVisible' could not be found (are you missing a using directive or an assembly reference?)	C:\proj\EBAAct2\EBAAct2\Class1.cs	11	6	EBAAct2
Error	4	The type or namespace name 'ComVisibleAttribute' could not be found (are you missing a using directive or an assembly reference?)	C:\proj\EBAAct2\EBAAct2\Class1.cs	11	6	EBAAct2
Error	5	The type or namespace name 'ProgId' could not be found (are you missing a using directive or an assembly reference?)	C:\proj\EBAAct2\EBAAct2\Class1.cs	12	6	EBAAct2
Error	6	The type or namespace name 'ProgIdAttribute' could not be found (are you missing a using directive or an assembly reference?)	C:\proj\EBAAct2\EBAAct2\Class1.cs	12	6	EBAAct2
Error	7	'System.Guid' is not an attribute class	C:\proj\EBAAct2\EBAAct2\Class1.cs	13	6	EBAAct2

Open in new window

0
Comment
Question by:HuaMinChen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:Akilandeshwari N
ID: 40327388
Hope you are targeting to .NET 3.5 which does not have this library. Make sure to target to .NET 4.0 in the project properties and try.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40327412
Sorry, to target framework, .Net 4.0 is not available. I'm using VS 2008 on Win 7 machine.
0
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 40327421
The posted code doesn't use most of the 'using' directives you have.
You could remove all the 'using' lines and replace them with:
using System;
using System.Runtime.InteropServices;

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question