BizTalk: How to get all dlls from an application? - dll

I would like to build an external app (console application) which inform me for the DLLs versions that are used in an BizTalk application.
Of course with a quick search I find some examples which are use the Microsoft.BizTalk.ExplorerOM DLL,
but these examples shows only the DLLs that exist in [BizTalk_Local_MgmtDb].[dbo].[bts_assembly] table which when I see them in BizTalk health monitor they have type System.BizTalk:BizTalkAssembly.
I would like also to add in my app (Console application) the DLLs of type System.BizTalk:Assembly which for example can be a helper class which are not listed by Microsoft.BizTalk.ExplorerOM because, I guess, they not exist in [BizTalk_Local_MgmtDb].[dbo].[bts_assembly] table
Have someone any idea how I can achieve what I want?

I found them, these assembles exists in managmentDB in table [BizTalk_Local_MgmtDb].[dbo].[adpl_sat]

So if I understand the question correctly:
You are creating a utility console application, which uses "Microsoft.BizTalk.ExplorerOM". And your "helper class Assembly" is not being listed in your "Console application" because it is not of type "System.BizTalk:BizTalkAssembly".
I'm afraid that you won't be able to do so, as you can't add a class library as "System.BizTalk:BizTalkAssembly". Here is the error we get when try to do so:
You can make try using "System.Reflection".

For your components to be considered as BizTalk Artefacts, your project should be .btproj
Then deploy your components same way you deploy your biztalk applications.

Related

Add a reference to the System.IdentityModel.Tokens DLL

How do I add a reference to the System.IdentityModel.Tokens dll?
It does not seem to come up in the Nuget Package Manager.
Do I need to download the DLL?
I have .Net 4.5 installed.
The following code will not compile without the reference:
SessionSecurityToken sst = e.SessionToken;
It does exist on NuGet, and was last published 2013-02-08, so I don't understand why you couldn't find it. Try searching for System.IdentityModel.Tokens.ValidatingIssuerNameRegistry.
The best way is to install it is using the NuGet packet manager.
You can find the package here:
https://www.nuget.org/packages/System.IdentityModel.Tokens.ValidatingIssuerNameRegistry/4.5.0
In your solution, right click the References folder and choose "Add Reference"
From the Assemblies->Framework (.NET 4.5) list, select (check) System.IdentityModel and the press ok.
Add the using statement to the top of your class - using System.IdentityModel.Tokens;
In case it helps someone else.
Depending on what class you need you may also need reference to
System.IdentityModel.Tokens.ValidatingIssuerNameRegistry.dll
This may not be obvious as it may be implicitly required by specific element in web.config file and not explicitly required in code.

Where can I get Tridion.ContentManager.Data.ContentManagement DLL?

I want to access "Fields" property for accessing fields of a schema in core services in SDL Tridion but Visual Studio says I am missing an assembly reference.
I searched for namespace and it requires Tridion.ContentManager.Data.ContentManagement DLL. Where can I find this DLL?
There's no Fields property on CoreService. If you see it - you probably have mixed references to TOM.NET and CoreService. You need only reference to CoreService client dll and nothing more. If you wan't to have something similar to Fields implementation - you may take a look at this article: http://code.google.com/p/tridion-practice/wiki/ChangeContentOrMetadata
If you want to have the Tridion.ContentManagement.Data.DLL just do this:
Open cmd from Run
Navigate to C:\Windows\assembly\GAC_MSIL\Tridion.ContentManager.Data\6.1.0.996__ddfc895746e5ee6b>
Copy the file to a folder you want

EntLib 5 Wrap Handler Message Localization

I have been asked, at very short notice of course, to implement exception logging to the Windows Application event Log in one of our products (vb.Net, framework 3.5, WinForms) using EntLib 5. In and of itself this is fine - I can get that working. However, this is for a client who wants messages in Chinese. Certain parts of the app have language resource files and I found a couple of sentences in my MS EntLib Developers Guide book which suggested that I could use an external resource to provide a localised 'friendly' message in a wrap handler within the Exception Handling Block.
Unfortunately there was no mention of how to actually achieve this but it seemed straightforward enough. I added a new resource to a resx file which lives at the project level for the project which is common to all areas of the application and re-built to project so that the satellite assemblies were built. I then specified the name of the resource in the 'Message Resource Name' field within the EntLib configuration console. the problem arises when I try and specify the 'Message Resource Type'.
I clicked on the search button and found the satellite assembly I needed, but it did not get added to the list of loaded assemblies and therefore I couldn't select it. The problem is that none of the places where I've seen this feature mentioned actually demonstrate how to get it working so I'm not sure where I'm going wrong. The search for the assembly will only let me select a dll or exe so I assume I am supposed to reference the satellite assembly somehow but how do I do this if it won't add it to the list of loaded assemblies?
One point to note is that we have a main executable which then calls numerous class libraries to load areas of functionality as required, and the config file we use throughout is the one which belongs to the main executable. Is it the case that you can only use satellite assemblies which are related to the assembly that the config file belongs to?
I haven't yet fully utilized this feature yet but just something to check, are you using the fully qualified name of the assembly?
EDIT: A potentially applicable link - http://entlib.codeplex.com/discussions/67460

ArcObjects - IWorkspaceExtension and Component Category Registration

I have coded an implementation of IWorkspaceExtension (along with IWorkspaceExtensionControl, which declares the Init method), and registered it in the ESRI Geodatabase Workspace Extensions Component Category. However, when I connect to the Workspace, the Extension is not "Init"ed.
I was able to get the implementation "Init"ed when I register the IWorkspaceExtension with the Geodatabase, but that is not an option because I cannot install the Extension on all clients, only on the one that will use the functionality.
I hope someone can answer in a couple of minutes what I have been struggling with for a couple of days. =D
Thanks.
Did you register it with IWorkspaceExtensionManager.RegisterExtension?
http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/d50974a4-d67a-4cf0-9041-20cdb9f3a052.htm#GDBReg
Keep in mind that without the DLL, or if the DLL crashes, you will not be able to open the workspace. This wouldn't be a problem if ESRI allowed assemblies to be stored in the geodatabase, the way SQL Server does.

getting an embedded resource in a single dll made up of multiple class libraries

my solution has multiple projects and in one of them I have the code to get the embedded resource (an xml file) from another project. All this works fine when all the projects are seperate. However when all the class libraries are embedded into a single dll, the code to get the resource file does not work i.e. it cannot get the emebedded resource.
I was wondering if the references to the emebedded resource get mixed up when they are combined together in a single dll??
I use the method Assembly.GetCallingAssembly().GetManifestResourceStream("namespace..filename");
I would not use Assembly.GetCallingAssembly(). I would use typeof(SomeClassNextToXmlFile).Assembly that way if you are calling the dll with the embedded resource from a exe file it won't go looking in the exe for the resource. Also you may want to try using Reflector and make sure the resource you are looking for is where you think it is.