Friday, November 26, 2010

Compiling in Release Mode

Adding WebformsMvp with NuGet to an existing WebForms project worked like a charm. I’ve been running the site and new page on my localhost for a few days now. In Debug mode that is. But when the time for a deployment has come, my problem arises.

Could not load file or assembly ‘file:///C:\xxx\bin\WebFormsMvp.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) … SGEN

Compile debug mode. No problem. Compile release mode. No. Remove references, and adding again. No effect.

Solution:
To build the project with the build settings for Generate serialization assembly set to Off.

Questions to be answered is why? And will this impact my solution in the production enviroment?

Monday, November 22, 2010

WebformsMvp

WebformsMvp looks like what both me and this “old” project was needing. This old project I’m talking about isn’t really that old, only two or three years. The entire solution is written in webforms with some ajax. So the WebformsMvp looked as a very good framework to incorporate for new pages and rewrites. Using NuGet made incorporating WebformsMvp as easy as two clicks. After setting up my model, view and presenter the page threw an error: “An exception was thrown whilst trying to create an instance of …”. This error came when the ascx access Mvp or model. Manually upgrading to the build 0.9.7.4 fixed this bug.

Experience so far gives me high hopes for this framework and pattern.