Dim appManifest As String = New System.IO.StreamReader(Application.GetResourceStream( New System.Windows.Resources.StreamResourceInfo(e.Result, Nothing), New Uri("AppManifest.xaml", UriKind.Relative)).Stream).ReadToEnd() Dim doc As XDocument = XDocument.Parse(appManifest) Dim nspace As XNamespace = doc.Root.Name.Namespace // parts contains 5 dlls. Dim parts As List(Of XElement) = (From assemblyParts In doc.Descendants(nspace + "AssemblyPart") Select assemblyParts).ToList() Dim asm As System.Reflection.Assembly = Nothing For Each xe As XElement In parts Dim source As String = xe.Attribute("Source").Value Dim asmPart As New AssemblyPart() Dim streamInfo As StreamResourceInfo = Application.GetResourceStream( New StreamResourceInfo(e.Result, "application/binary"), New Uri(source, UriKind.Relative)) If source = "WebPortalUI.dll" Then asm = asmPart.Load(streamInfo.Stream) Else asmPart.Load(streamInfo.Stream) End If Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)