3
Answers

Trouble with a namespace...

Photo of Cory

Cory

15y
3.7k
1

I got this code from a sample and I need to add on to it and make it customizable.
Everything works except one reference.
If I comment the line out, some of the program losses functionality.
What reference do I need to add, or what needs to be done to correct this problem.

namespace TestSignature
{
    using System;
    using System.Diagnostics;
    using System.Drawing;
    using System.IO;
    using System.Reflection;
    using System.Security.Cryptography;
    using System.Security.Cryptography.X509Certificates;
    using System.Security.Cryptography.Xml;
    using System.Text;
    using System.Windows.Forms;
    using System.Xml;
   
    using Extensibility;
    using Microsoft.Office.Core;
    using stdole;

    using TestSignature.Utils;

    using XmlDataObject = System.Security.Cryptography.Xml.DataObject;

The error comes at "using TestSignature.Utils;"

And states: "The type or namespace  name 'Utils' does not exsist in the namespace 'TestSignature' (are you missing an assembly reference?)

Answers (3)

0
Photo of John Wood
NA 64 0 14y
My best suggestion is not to use the Utils namespace name.  Through my VB and C# interaction, i have noticed others having similar problems with that name.  I am thinking it is a internal reserved word or something.  Try renaming the namespace to utility or something that is descriptive to what it is doing like "TestSignature.Helpers".
0
Photo of sfsdf
NA 2 0 15y
I got the same trouble,I've not created any subspace utils, waht would I solve this problem?
0
Photo of John Wood
NA 64 0 15y
I assume Utils is a subnamespace you have created?