3
votes

Installed the ELMAH NuGet package. Now, when I publish my ASP.NET MVC 4 project to Azure, it warns me that it wants my project to have a direct reference to System.Data.SqlServerCe.dll (so that the DLL, which is apparently referenced by ELMAH, is included in the bits uploaded to Azure).

I'm not using SQL Compact Edition for logging, so I assume that I don't really need that DLL (and, in fact, the Azure package works just fine without it).

So, how do I resolve this "missing DLL" issue? I could try to find and remove the part of ELMAH that references this DLL, but it would just come back the next time a new version of ELMAH is released. Since the DLL is apparently not in the GAC, I could add a reference to the copy of System.Data.SqlServerCe.dll that's stashed away under my C:\Program Files (X86) folder, but that smells ugly to me. Or I could just ignore the warning, but as a matter of principle (and published policy) I don't tolerate warnings lightly.

Any suggestions?

EDIT:

Daniel Powell asked me to post my NuGet packages.config, which looks like this (I hope - this is deeper magic than I've dug into)

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="DotNetOpenAuth.AspNet" version="4.2.2.13055" targetFramework="net45" />
  <package id="DotNetOpenAuth.Core" version="4.2.2.13055" targetFramework="net45" />
  <package id="DotNetOpenAuth.OAuth.Consumer" version="4.2.2.13055" targetFramework="net45" />
  <package id="DotNetOpenAuth.OAuth.Core" version="4.2.2.13055" targetFramework="net45" />
  <package id="DotNetOpenAuth.OpenId.Core" version="4.2.2.13055" targetFramework="net45" />
  <package id="DotNetOpenAuth.OpenId.RelyingParty" version="4.2.2.13055" targetFramework="net45" />
  <package id="elmah" version="1.2.2" targetFramework="net45" />
  <package id="elmah.corelibrary" version="1.2.2" targetFramework="net45" />
  <package id="EntityFramework" version="5.0.0" targetFramework="net45" />
  <package id="Glimpse" version="1.1.0" targetFramework="net45" />
  <package id="Glimpse.AspNet" version="1.1.0" targetFramework="net45" />
  <package id="Glimpse.Mvc3" version="1.1.0" targetFramework="net45" />
  <package id="jQuery" version="1.9.1" targetFramework="net45" />
  <package id="jQuery.UI.Combined" version="1.10.1" targetFramework="net45" />
  <package id="jQuery.Validation" version="1.11.0" targetFramework="net45" />
  <package id="knockoutjs" version="2.2.1" targetFramework="net45" />
  <package id="log4net" version="2.0.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.Web.Optimization" version="1.0.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebApi.WebHost" version="4.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebPages.Data" version="2.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebPages.OAuth" version="2.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.AspNet.WebPages.WebData" version="2.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.Data.Edm" version="5.3.0" targetFramework="net45" />
  <package id="Microsoft.Data.OData" version="5.3.0" targetFramework="net45" />
  <package id="Microsoft.jQuery.Unobtrusive.Ajax" version="2.0.30116.0" targetFramework="net45" />
  <package id="Microsoft.jQuery.Unobtrusive.Validation" version="2.0.30116.0" targetFramework="net45" />
  <package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
  <package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net45" />
  <package id="Modernizr" version="2.6.2" targetFramework="net45" />
  <package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
  <package id="System.Spatial" version="5.3.0" targetFramework="net45" />
  <package id="WebGrease" version="1.3.0" targetFramework="net45" />
  <package id="WindowsAzure.Storage" version="2.0.5.0" targetFramework="net45" />
</packages>
1
post your nuget packages.config - Daniel Powell
What are the web.config setting you are using for Elamh? Maybe your logger is configured to use SQLCe. - Paige Cook
@PaigeCook: Nope. The letters "sql" only show up twice in my web.config, once in my local connection string and once in the EF defaultConnectionFactory. But that doesn't change the original problem, which is that ELMAH apparently links to SqlCe, so I am obligated to add it to my project even though I don't use it directly. - Bob.at.Indigo.Health

1 Answers

2
votes

I've been running a service on Azure for many months with this same warning. If you're sure you're not using SQL Server CE it's fine.

It is an annoying warning but as far as I can tell does no harm.