?
Solved

Codes problem

Posted on 2014-09-16
3
Medium Priority
?
614 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 1500 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

752 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