troubleshooting Question

Changing Root Namespace and Assembly names

Avatar of YaakovS
YaakovS asked on
Visual Basic.NET
2 Comments1 Solution1037 ViewsLast Modified:
 When i try changing the assembly (or root namespcace) name of my project my code doesn`t excute properly anymore, the way i`m doing that is by right clicking over my project in the project explorer and clicking properties from there. is there a way to change it so that it does.

here`s some of the code that doesn`t work after i change the assembly name:
 
    Public Function GetEmbeddedIcon(ByVal iconName As String) As Icon
        Dim assemblyExecution As System.Reflection.Assembly = Me.GetType.Assembly.GetEntryAssembly()

        Dim namespaceName As String = assemblyExecution.GetName().Name.ToString()

        iconName = namespaceName & "." & iconName

        Dim streamIcon As Stream = assemblyExecution.GetManifestResourceStream(iconName)

        Dim iconEmbedded As Icon = New Icon(streamIcon)

        Return iconEmbedded
    End Function

 it gives me the following error:

An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll

Additional information: 'null' is not a valid value for 'stream'.  
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros