Unable to install Enterprise Library on Windows 7 64-bit Computer

Topics: General discussion
Apr 25, 2014 at 1:00 AM
Edited Apr 25, 2014 at 1:02 AM
I played with Enterprise Library 6.0 Logging and Exception Handling Blocks by using VS 2012 and and adding references with Nuget packages. Everything seems to work fine. But when I tried to download the Enterprise Library binaries with the help of the supplied PowerShell script, I got this error:

The specified executable is not a valid application for this OS platform.

I got the same message when I executed the PowerShell via command prompt as well as Powershell Script. This is the entire message:

C:\Enterprise Library>powershell -File .\install-packages.ps1

You are about to automatically download the following NuGet packages:
  • CommonServiceLocator v1.0
  • EnterpriseLibrary.Common v6.0.1304.0
  • EnterpriseLibrary.Data v6.0.1304.0
  • EnterpriseLibrary.Data.SqlCe v6.0.1304.0
  • EnterpriseLibrary.ExceptionHandling v6.0.1304.0
  • EnterpriseLibrary.ExceptionHandling.Logging v6.0.1304.0
  • EnterpriseLibrary.ExceptionHandling.WCF v6.0.1304.0
  • EnterpriseLibrary.Logging v6.0.1304.0
  • EnterpriseLibrary.Logging.Database v6.0.1304.0
  • EnterpriseLibrary.PolicyInjection v6.0.1304.0
  • EnterpriseLibrary.SemanticLogging v1.0.1304.0
  • EnterpriseLibrary.SemanticLogging.Database v1.0.1304.0
  • EnterpriseLibrary.SemanticLogging.WindowsAzure v1.0.1304.1
  • EnterpriseLibrary.TransientFaultHandling v6.0.1304.0
  • EnterpriseLibrary.TransientFaultHandling.Caching v6.0.1304.0
  • EnterpriseLibrary.TransientFaultHandling.Configuration v6.0.1304.0
  • EnterpriseLibrary.TransientFaultHandling.Data v6.0.1304.1
  • EnterpriseLibrary.TransientFaultHandling.ServiceBus v6.0.1304.0
  • EnterpriseLibrary.TransientFaultHandling.WindowsAzure.Storage v6.0.1304.1
  • EnterpriseLibrary.Validation v6.0.1304.0
  • EnterpriseLibrary.Validation.Integration.AspNet v6.0.1304.0
  • EnterpriseLibrary.Validation.Integration.WCF v6.0.1304.0
  • EnterpriseLibrary.Validation.Integration.WinForms v6.0.1304.0
  • EnterpriseLibrary.Validation.Integration.WPF v6.0.1304.0
  • Microsoft.Data.Edm v5.2.0
  • Microsoft.Data.OData v5.2.0
  • Microsoft.WindowsAzure.ConfigurationManager v1.8.0.0
  • Newtonsoft.Json v4.5.11
  • System.Spatial v5.2.0
  • Unity v3.0.1304.0
  • Unity.AspNet.WebApi v3.0.1304.0
  • Unity.Interception v3.0.1304.0
  • Unity.Mvc v3.0.1304.0
  • WindowsAzure.Storage v2.0.5.1
Microsoft grants you no rights for third party software. You are responsible
for and must locate and read the license terms for each of the above packages.
The owners of the above packages are solely responsible for their content and
behavior. Microsoft gives no express warranties, guarantees or conditions.
Do you want to proceed?
[Y] Yes [N] No [?] Help (default is "N"): y
The specified executable is not a valid application for this OS platform.

C:\Enterprise Library>

I executed the command prompt as administrator.

Thanks in advance for your help.
Apr 28, 2014 at 6:58 AM
Check the NuGet bootstrapper located at .nuget\NuGet.exe (i.e. c:\Enterprise Library.nuget\NuGet.exe). Also check that the full NuGet package manager is installed at %localappdata%\nuget\NuGet.exe . Can you run NuGet: %localappdata%\nuget\NuGet.exe? Maybe try to run a self update: %localappdata%\nuget\NuGet.exe update -self and see if that works.

Randy Levy
Enterprise Library support engineer
Support How-to
Nov 5, 2014 at 8:53 AM
Hi Team,

I'm also having the same issue while running Install-Packages.ps1 for Entity Library 6. As per your reply I tried to to run the Nuget.exe even that gives me the same error message:
The specified executable is not a valid application for this OS platform.

Please reply as soon as possible.

Thanks in advance
Nov 6, 2014 at 2:49 AM
It sounds like there is a problem with NuGet.exe. Try uninstalling NuGet and re-installing the latest version: http://nuget.codeplex.com/releases/view/133091

Randy Levy
Enterprise Library support engineer
Support How-to