how to determine which version of enterprise library a dll came from? - enterprise-library

I have an application using a dll from the 'Microsoft Enterprise Library'.
How do I find out which version of the 'Enterprise library' the dll came from?
The dll is 'Microsoft.ApplicationBlocks.ExceptionManagement.dll' and it's
'Product' and 'File' version is 1.0.3055.29252.

Your assembly is part of Exception Management Application Block. This was the first release from 4/23/2002 and actually predates the name Enterprise Library.
I think this was released only as source code so your build version doesn't help much.

Related

Including plugin dll in Unity from higher .net version

Current .net framework version of Unity is .net v4.6
Will it allow importing of plugins that target .net v4.7?
And as a more generic (not version based) question.
Does Unity allow importing of dlls built on a higher version than the Unity build support?
No.
The reason is that the DLL may have used C# feature that is not yet supported in the current version of Unity. It will fail silently or you will get a similar error below:
The primary reference "The DLL" could not be resolved because it has a
higher version "x.x.x.x" than exists in the current target framework.
The version found in the current target framework is "x.x.x.x".
You need to recompile the plugin with the-same version of .NET Unity is using or find another plugin with the correct version.

RedGate SQL Comparison SDK API Licensing Issue

First of all Sorry all that I have to write the lengthy question, But it is necessary to write these things to explain my problem better.
We have an installer to install our application. I want to upgrade the database through installer. So, I have created a snapshot of the latest structure database and placed in the package of the application. I have used the RedGate SQL Comparison SDK API to compare structure of two databases and then synchronize the customer database with the latest snapshot (which I have provided).
I am using custom action class library project to write the methods and those methods will be called the installer itself.
I have purchased the RedGate License key and also RedGate Tool is installed on one machine. On the same machine, I have a installshield license, So I am writing the custom action code on that machine only.
We need to add 'licenses.licx' file in the project where we are using the RedGate SDK API. I have added that file as mentioned in 'http://documentation.red-gate.com/display/CSD11/Distributing+your+SDK+applications'.
I have added that file and the compilation succeeded, as I have the license activated on the same machine. So, first of all to embed the license with the project I had deactivated the RedGate License from the installed RedGate and then While compiling the project I got a popup for activation as shown below:
I have applied the valid license, then I have compiled the installer project from installshield 2014 (which is using the custom action project).
My code of synchronizing the database is working as expected. So, I didn't found any problem in the synchronization code.
Here, the problem is: If I will install the product on the machine which have the Redgate License, then the product will be installed and database will be synchronized successfully. On the client machines, it is obvious that they would not have the RedGate license. The installer is giving the activation popup as shown in above image just before starting the synchronizing.
Even though I have given the valid license at the time of compiling the, I am not able to sync the dbs on other machines.
Hope, someone has a solution for this.
Thanks in anticipation.
Did you rename the assembly after compiling? The engine requires that the assembly file name is the same as the name of the embedded licence resource. Here's a quote from the relevant page in the documentation.
When deploying an assembly utilizing SQL Comparison SDK to a remote site where SQL Comparison SDK is not already installed and activated, you may be asked to activate the SDK, even though the assembly had been built and licensed correctly.
The problem occurs after renaming an assembly. SQL Comparison SDK assemblies cannot be renamed after they are built, because the licensing system requires the licence resource embedded into an assembly to bear the same name as the assembly file name.
You can either change the assembly back to its original name, or change the settings in your Visual Studio project so that the output assembly is compiles as a different name and deploy the assembly built with the desired name.

Enterprise Library 5.0 don't show namespace Microsoft.Practices.EnterpriseLibrary.Data

I was using Visual Studio 2008 with Enterprise Library 4.0. It is working fine and showing namespace Microsoft.Practices.EnterpriseLibrary.Data. Now I installed VS 2010 and Enterprise Library 5.0.(because 4.0 sowsn't support vs 2010 ).
But the problem is Enterprise Library 5.0 doesn't show Microsoft.Practices.EnterpriseLibrary.Data. Is there another namespace in 5.0 thriugh which I can access the Database class which comes under Microsoft.Practices.EnterpriseLibrary.Data namespace?
please let me know.
You are probably targeting .NET Framework Client Profile. The Data Access Block has dependencies on System.Data.Oracle and requires the full .NET Framework.
For anyone else hitting this problem with moving their DAAB-based app to .NET4, entlib5 is supplied with the source code installable via e.g. C:\Program Files (x86)\Microsoft Enterprise Library 5.0\src\Enterprise Library 5.0 - Source Code.msi
Running that msi and accepting the defaults creates a EntLib50Src folder under your Documents area. If you go into EntLib50Src\Blocks\Data and open Data.2010.sln you can change the target framework to .NET Framework 4 Client Profile.
This will create a bunch of errors related to the System.Data.Oracle dependency. Remove the reference to it, and then exclude the Oracle parts of the project and comment out any Oracle references in the common code.
If you then recompile with strong name signing on you can use the output assemblies (Microsoft.Practices.EnterpriseLibrary.Common.dll and Microsoft.Practices.EnterpriseLibrary.Data.dll) with .NET Framework 4 Client Profile. You do have to distribute Microsoft.Practices.Unity.dll from the e.g. C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin area but this is client profile-compatible.
Note that the above works if you're not needing Oracle support in your app. Mine doesn't, its SQL Server and VistaDB only. The above should work with any non-Oracle db compatible with ADO.NET.

Need Microsoft.Practices.EnterpriseLibrary.ServiceLocation.dll

I need the Microsoft.Practices.EnterpriseLibrary.ServiceLocation.dll as this seems to be missing when I downloaded Microsoft Enterprise Library 5.0 - Hands On Labs. Please let me know the link to download the missing DLL.
I think the DLL you are looking for is Microsoft.Practices.ServiceLocation.dll (no EnterpriseLibrary in the name). The assembly should be located in the Lib folder where you installed the Hands On Lab. e.g. ...\Microsoft Enterprise Library 5.0 - Hands On Labs\Lib\.
I was in the same boat -- it appears that the documentation is incorrect. The Exception Handling Application Block Hands-On Labs for Enterprise Library, page 3, asks you to add a reference to
Microsoft.Practices.EnterpriseLibrary.ServiceLocation.dll
and I can only find
C:\Program Files\Microsoft Enterprise Library 5.0\Bin\Microsoft.Practices.ServiceLocation.dll
It's always a pleasure when the INSTRUCTIONS are incorrect, yes? :)

Migrate Enterprise Library 4.1 to 5.0

We are using enterprise library 4.1 and smart client software factory 2008 to our application.
how we can upgrade enterprise library 5.0 and SCSF 2010 to our application.presently we are using visual studio 2008.
To upgrade what are the thing needs to be taken care.
Early help would be appreciated.
In terms of Enterprise Library, the best case scenario would be to replace the 4.1 assembly references with 5.0 assembly references and change the configuration (to use 5.0 references instead of 4.1 references). However, you could also hit some issues.
You should read the Microsoft Enterprise Library 5.0 Migration Guide for a full description. The Breaking Changes document could also help you determine if you may run in to migration issues.
For the Smart Client Software Factory the approach appears the same: change the references and configuration to use the new dlls. The Web Client Software Factory 2010 Documentation download has a section on Migrating to Visual Studio 2010.
Install the 5.0 package.
remove all the previous refreneces and add the newer ones generated.
You can refer the dlls by copying it to some folders or directly from the location where you have installed (C:\programfiles\Microsoftenterpriselibrary5.0)
I faced the below issues while migrating
Configuration errors in web.config files - some of my references in the web.config files were refering to the older version(2.0.0.0)(i upgraded from 2.0 to 5.0) and the publictokenkey="null"
so i pushed all the dlls to the gac and added the publicktokenkey from the c:\windows\assembly. which solved the issue
And another issue was regarding the microsoft.practices.enterpriselibrary.caching.cryptography- it was displaying soem weird error.- solution-the bin folder was having the old dlls and when tried to
clean the solution the dll reference was still there. SO i deleted all those from the folder and rebuild again.
IT was initially having the logicacmg.enterpriselibraryextensions.logging which caused some issues- i used the microsoft.practices.enterpriselibrary.logging.configuration.rollingflatfiletracelistenerdata which could solve the issue.
Hope some one might get some inputs with this post