nandotech / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

VS build on fresh clone breaks demo web site #384

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
(Carried forward from issue #373)

What steps will reproduce the problem?

1. Clone repo (ART revision 0d650a436f7f)
2. Open Elmah.sln in VS 2013
3. Build the solution using NETFX 3.5 Debug configuration (have not tried 
others)
4. Once build completes, choose View in Browser from the context menu of the 
Demo web site project node
5. Once the demo home page opens in the browser (if an error occurs that 
App_Data does not exist, create the directory and retry), go to 
http://localhost:51296/elmah.axd

What is the expected output? 

Expect to see an empty error log page.

What do you see instead?

The log page produces the following error:

Unable to load DLL 'SQLite.Interop.dll': The specified module could not be 
found. (Exception from HRESULT: 0x8007007E)

Additional information:

If you take another fresh clone (or clean the existing one with hg purge --all) 
and use build.cmd then the demo site works flawlessly. It seems as if the 
restore from within VS does not honour package restore for Web Site projects.

Could you take a look at this? Thanks!

Original issue reported on code.google.com by azizatif on 4 Mar 2015 at 8:32

GoogleCodeExporter commented 8 years ago
Issue 383 has been merged into this issue.

Original comment by azizatif on 4 Mar 2015 at 8:42

GoogleCodeExporter commented 8 years ago

Original comment by jamesdriscoll71 on 4 Mar 2015 at 9:49

GoogleCodeExporter commented 8 years ago
Fixed in https://code.google.com/r/jamesdriscoll71-demo-project-issues

Original comment by jamesdriscoll71 on 10 Mar 2015 at 12:05

GoogleCodeExporter commented 8 years ago
Changing Status to Started as fix has not yet been pulled into the main repo.

Original comment by azizatif on 10 Mar 2015 at 6:10

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 12 Mar 2015 at 5:49

GoogleCodeExporter commented 8 years ago
Looks like this may be by-design after all. :S

First of all, my comparison was not apples to apples. The default configuration 
when opening up in VS is .NET 3.5 Debug. If the demo web is built and run, it 
fails. Building from the command line via build.cmd works because it builds 
*all* configurations. Doing the same from VS (i.e. Build > Batch Build and 
selecting all configurations) on fresh clone does not fail the demo web.

The SQLite.Interop.dll is missing when building for .NET 3.5 because the 
Elmah.SQLite project's post-build event only copies the interop DLL when 
targeting .NET 4.5. When building all configurations, the .NET 4.5 
configurations are the last ones and therefore running the demo web right after 
succeeds. If one removes `if` from the post-build event to have the interop DLL 
copied in all configurations then another problem occurs: the AntiXss 
dependency is not copied over by VS except when targeting .NET 4.5. I haven't 
quite understood why.

In the current state of affairs, the demo web site is only designed to work 
with .NET Framework 4.5 and that's acceptable for alpha and beta releases. I 
wonder if there's a way to set the default configuration in VS?

Original comment by azizatif on 12 Mar 2015 at 6:37

GoogleCodeExporter commented 8 years ago
This issue has been migrated to:
https://github.com/elmah/Elmah/issues/384
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is 
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of 
any further development.

Original comment by azizatif on 25 Aug 2015 at 8:27