C# Cannot register assembly when building Class to make a COM Object (Visual Studio 2013)

I Experts,

I'm trying to learn how to do ActiveX components (COM Interop) in C# so i can use them in Visual FoxPro (Old applications that are still running).
I'm using Visual Studio 2013.

I tried this example: http://stackoverflow.com/questions/3360160/how-do-i-create-an-activex-com-in-c

But when i build the project i get this error:
Cannot register assembly "d:\documents\visual studio 2013\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Launcher.Launcher' is denied.      ClassLibrary1

What am i missing?

Also, if anyone know a good walk trough to learn how to create ActiveX (COM Objects) in Visual Studio 2013 would also be much appreciated :)

Thx in advanced,

My AssemblyInfo.cs file code:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ClassLibrary1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ClassLibrary1")]
[assembly: AssemblyCopyright("Copyright ©  2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("03dba714-4abf-4893-b2b5-b5f0d70fcc86")]

// Version information for an assembly consists of the following four values:
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("")]
[assembly: AssemblyFileVersion("")]
//[assembly: AssemblyKeyFile("Database_COM_Key.snk")]

Open in new window

My Class1.cs file code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Runtime.InteropServices;

namespace Launcher

    [InterfaceType(ComInterfaceType.InterfaceIsDual), Guid("1DE7CD26-92B0-441F-B3D3-7C55758DD8FE")]
    public interface ILauncher
        void launch();

    [ClassInterface(ClassInterfaceType.None), Guid("911DB332-D76D-499C-9200-704C1B85BEA7"), ProgId("Launcher.Launcher")]
    public class Launcher : ILauncher
        private string path = null;

        public void launch()
            Console.WriteLine("I launch scripts for a living.");


Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Franck GaspozSoftware Architect, Technical ExpertCommented:
It seems you do not have sufficient privileges to register the COM object in the registry.  This requires admin privileges.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
justaphaseAuthor Commented:
Damn... i started the Visual Studio 2013 as Administrator and worked....
That's weird... that simple??
Franck GaspozSoftware Architect, Technical ExpertCommented:
Access to the registry is effectively systematically restricted to administrators for security reasons. Anyway the error message was very explicit. Happy to have helped !
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.