I created an Enum, and while trying to run it by running the command [MyNamespace.MyEnum], I get the error that says"Unable to find type[MyNamespace.MyEnum]: make sure that the assembly containing this type is loaded." This is what my enum looks like
$enum = "
namespace MyNamespace
{
public enum MyEnum
{
value1 = 0, value2 = 1
}
}"
Add-Type -TypeDefinition $enum -Language CSharpDoes anyone have an idea why I keep getting this error? I really appreciate the suggestions. Thanks.