Visual Studio 2017 RC.3 26127.3 finally works ASP.Net Core correctly

At least in my experience. Even until this minor point release came out a few days after the more ‘major’ release, things did not work right.  Since there needed to be a more solid upgrade path from the project.json system to the ‘new’ MSBuild system, I was concerned about how much work it would take. In the end, not very much.  Bin and Obj folders needed to be deleted, and for some obscure reason, the EF 6.1.3 NuGet package needed to be added to the Asp.NET Core project (this wasn’t required previously, so I’m assuming this is just...

posted @ Friday, February 03, 2017 1:57 AM | Feedback (0)
Registry Key to Fix Visual Studio Failing to Start with Negative Number


posted @ Monday, January 23, 2017 8:33 PM | Feedback (0)
Coding standards are bad aka learning the wrong lession

So, Rocky reflected on coding standards, and ended up here: This was the point where I had my first professional developer epiphany. Yes, it is truly painful to adapt to the idea of living within strict coding and style guidelines. But the alternative is so much worse! Ever since that experience I insist on consistency of coding standards and styles within each project (or enterprise) where I work. And even if I think some choices (like 2 spaces after each tab) are really, really, really stupid, I'll use and vehemently support that choice. Um, no. There...

posted @ Thursday, December 22, 2016 2:36 PM | Feedback (0)
Repairing Xamarin after uninstalling Visual Studio 2017 RC

In a previous post I mentioned that uninstalling Visual Studio 2017 RC broke any existing Xamarin projects, removed the templates, etc. and that I hadn’t figured out how to fix it. Here’s how you fix it: Go the Xamarin web site and go to the download page.  Annoyingly enter in your contact information for the 17th time, and then where it asks you if you already have Visual Studio installed, select ‘no’.  Download the file, execute it, and it will reset things (it doesn’t actually appear to download anything that I could tell, but it’s hard to tell). ...

posted @ Tuesday, November 29, 2016 10:03 AM | Feedback (0)
Uninstalling Visual Studio 2017 RC appears to have broken Xamarin

In a previous post, I mentioned some difficulties with the latest Visual Studio 2017 RC, and how uninstalling it, plus installing the latest Typescript release, appeared to have minimized the damage. Unfortunately, I apparently have spoken too soon, as I discovered today that an Android app project is broken, showing the project as being incompatible, and there are no longer any Xamarin project templates to be had.  Even worse, there doesn’t appear to be a ‘repair’ option, so I’ve yet to figure out how to fix Xamarin. Again, my fault for blanket installing without testing, but still very...

posted @ Friday, November 25, 2016 9:56 PM | Feedback (0)
Scaffold-DbContext doesn’t appear to work with EF Core 1.1

Are you surprised?  Me either. Given this NuGet Package Console command: Scaffold-DbContext -Connection "data source=MyServer;initial catalog=MyDb;integrated security=True" -Provider "Microsoft.EntityFrameworkCore.SqlServer" where I’ve obviously replace my actual server name and database name, one gets this error: Could not load file or assembly 'System.Data.SqlClient, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Well, that’s because EF Core 1.1 along with the SqlServer package requires SqlClient version 4.3.0 Fantastic.

posted @ Friday, November 25, 2016 11:42 AM | Feedback (0)
Be wary of Visual Studio 2017 RC

I made the mistake of installing this on multiple machines instead of my usual “install on one and check it out fairly thoroughly” routine.  I guess I had been lulled into somewhat of a sense of security with the beta/RC process for Visual Studio 2015, in that I didn’t think that installing 17 RC would break important parts of 15 functionality. To wit, simply installing 17 RC would break some .NET Core web apps inside Visual Studio 2015, even if I didn’t try to open/upgrade them in the new software. Various errors included: ...

posted @ Sunday, November 20, 2016 7:24 PM | Feedback (0)
ADO.Net Entity Data Model: Getting column information from a stored procedure that returns data from temp tables

Way back machine on this one. You need to temporarily add: SET FMTONLY OFF To the beginning of the proc for the data model to be able to get the column info.

posted @ Tuesday, June 28, 2016 11:24 PM | Feedback (0)
Asp.Net Core 1.0 RC2 fail, why? Who knows, it works on my machine, unless it’s the other machine

Related to the previous….. After deciding that Asp.NET 5 MVC 6 (or whatever it was called) wasn’t quite how they wanted to do it, the brilliant Scotts from Microsoft decided to redo god knows what percentage of the damn thing, and it became Asp.NET Core 1.0. Fantastic, but fine.  If that’s the direction to go and it makes sense, swell.  Rock the mutha out. Of course, I then had to upgrade/port/bitchslap a major project that had been built on Asp.NET 5 MVC 6 (or whatever it was called) to Asp.NET Core 1.o. Awesome.  Fantastic.  It...

posted @ Wednesday, June 15, 2016 11:03 PM | Feedback (0)
Visual Studio 15 Preview: The DotNet tooling SDK does not appear to be installed on this computure. Please install it and then close and reopen the solution.

The brilliantly named Visual Studio 15 preview (Visual Studio 2016 would have been too hard?) throws this error when trying to open property pages of an Asp.Net MVC 6 project, and won’t build them.  Or clean them even.  And don’t even think about debugging it. “Daddy, what’s a computure?”  “I don’t know sweetie.” It took two runs of the installer to get it to install, and even on the second run, there were two popup errors (with obscure messages preventing any insight into what actually failed). It does not, however, seem to hork up running it from...

posted @ Wednesday, March 30, 2016 11:53 PM | Feedback (0)
The given value of type String from the data source cannot be converted to type nvarchar of the specified target column

I ran into this error in one of my bulk insert method calls after updating an EF model, where I added some columns, changed the name of one, etc. in the underlying data source.  This error can occur if you mess up datatypes in such a way as to cause truncation, but I knew that wasn’t it (since I didn’t change any datatypes). After sleeping on it, I simply deleted the offending entity from my EF model and pulled it down again.  Voila. Gotta love black magic and secret sauce.

posted @ Friday, March 25, 2016 10:22 AM | Feedback (0)
Good old days: working with WCF

% time actual coding: 4% % time figuring out the f’ing configuration: 96%

posted @ Monday, January 25, 2016 4:16 PM | Feedback (0)
My New Favorite Data Type

object [] []

posted @ Thursday, January 21, 2016 3:21 PM | Feedback (0)
.NET renaming

I don’t think anything is downloadable yet, but while I will ‘miss’ saying Asp.Net 5 MVC 6 (occasionally with EF 7), I think this makes sense: REINTRODUCING ASP.NET CORE 1.0 AND .NET CORE 1.0 ASP.NET 5 is now ASP.NET Core 1.0. .NET Core 5 is now .NET Core 1.0. Entity Framework 7 is now Entity Framework Core 1.0 or EF Core 1.0 colloquially.

posted @ Tuesday, January 19, 2016 7:06 PM | Feedback (0)
Running async processes in console programs

Dude, it is: (myMethodThatIsAsync).Wait();

posted @ Monday, December 28, 2015 11:15 AM | Feedback (0)
Using EF 6 with Asp.Net 5 MVC 6

Just an aside, but Microsoft’s naming conventions are getting absolutely comical. Anyhoo….Microsoft appears to hate connection strings now.  With UWP and now with Asp.Net 5 MVC 6, they just don’t make things easy at all. Since EF 7 is woefully undeveloped, and even when it RTMs, it won’t be ready for prime-time, I was trying to get an existing EF 6 infrastructure to work with WebAPI in the new Asp.Net 5 MVC 6 world (yes, I’m going to keep typing it out).  Since code changes are fun, there were various changes that needed to be made to take...

posted @ Friday, December 25, 2015 11:59 PM | Feedback (0)
Windows 10 Pro Insider Preview Build 10547 Install Bug

This may seem a bit familiar. Trying to upgrade and it would stick at 23%, 77% files copied.  After waiting 20 minutes or so, I powered down so it would revert to the previous version. I then deselected WCF HTTP Activation for both .NET 3.5 and .NET 4.6, upgraded successfully, then reselected them.

posted @ Sunday, September 27, 2015 5:03 PM | Feedback (0)
Universal Windows Platform and Line of Business (LOB) applications: Things I don’t get yet

So, I was going to build a LOB application using UWP, and ran into a whole host of “I’m old and/or don’t get the new paradigm yet” issues. Such as: How do you do configuration settings with these things?  I know you are supposed to use ‘web’ technologies and all that (since OData is dead, I’m going WebAPI), but I still want to be able to point to some things in my ‘DEV’ environment, other things in my ‘PROD’ environment.  Don’t I?  That sort of thing doesn’t go away, but there’s nothing like an app.config...

posted @ Tuesday, September 15, 2015 9:10 PM | Feedback (0)
Web site debugging problems? Try running it outside the debugger at least once

I’ve been looking at this, because I’m looking into how to create a site that uses OData with CQRS (not to mention some Windows Universal Apps that use tasks to call OData services….”Over-architectured solution?  You’re soaking in it!”) and have been having a hell of a time debugging it (I know it uses WebAPI, but same difference). I was cursing Angular, because the fun thing with javascript is you have to remember to F12 and look at response/request bodies and headers and it has all these strings and it kept giving me 500 errors because of ‘ambiguous matches’ on...

posted @ Tuesday, August 25, 2015 7:26 PM | Feedback (0)
Upgrading a Windows 10 Universal App from Preview SDK to Release? Maybe not so bad.

Despite what I saw and wrote about here, it doesn’t appear to be all that bad. Did have to open the project file and change the build number, but I’ve done that before.  Then I just copied over the project.json and project.lock.json files, and everything was fine. Still not seamless, but that’s not quite so bad.

posted @ Tuesday, August 25, 2015 9:29 AM | Feedback (0)
Upgrading a Windows 10 Universal App from Preview SDK to Release? Holy crap

I’m in the need of doing this, as I’m not a very good developer so I need source code I can review/steal, and I’ve been using some sample apps from Microsoft. Ran into an issue looking at an old sample, where it couldn’t compile, since it couldn’t even find the ‘System’ reference.  Eek. Anyway, tracked down apparently what is needed. Holy crap.  That looks like a lot of work.

posted @ Tuesday, August 25, 2015 9:23 AM | Feedback (0)
Have I mentioned before how much I hate Nuget?

Rebuilding my replacement Surface Pro 3 (let’s just say the advanced exchange program is awesome, and that I’m lucky it died with only weeks left on the warranty). I have an ASP.NET MVC app.  Originally written in MVC 3, upgraded at various times to 4 and then 5.  Stored in Visual Studio Online, set up on many machines, many times.  Manual issues (relating to having to run the MVC 3 and 4 installers, now that I’m on Visual Studio 2015 and the fact that it is, well, 2015, etc.), but always works pretty much straightforward. Clean solution, build...

posted @ Tuesday, August 04, 2015 11:31 PM | Feedback (0)
Does anyone know how to create an OData client for Visual Studio 2015?

Seriously, most of the things out there refer to an Odata client package thing that doesn’t work with Visual Studio 2015. Seems a lot more difficult than it needs to be.

posted @ Sunday, August 02, 2015 10:27 PM | Feedback (0)
Blend for Visual Studio 2015: Update required, one or more projects require a platform SDK fix

Downloaded some samples involving Windows 10 and all the new Universal Application goodness, but couldn’t open the projects.  They kept saying this sort of thing when I opened a solution. The way to resolve this is to download the platform SDK, and if it happens not to be the version the project wants, you need to manually edit the project file and adjust these lines: <TargetPlatformVersion>10.0.10030.0</TargetPlatformVersion> <TargetPlatformMinVersion>10.0.10030.0</TargetPlatformMinVersion> Since I’m running a more recent SDK, I changed to this: <TargetPlatformVersion>10.0.10158.0</TargetPlatformVersion> <TargetPlatformMinVersion>10.0.10158.0</TargetPlatformMinVersion>...

posted @ Wednesday, July 01, 2015 3:28 PM | Feedback (3)
Could not load file or assembly … The parameter is incorrect

The link talks about Newtonsoft, my issue referenced Antlr3, but the general picture is that if you have a memory crash, it can cause this.  I’m not sure why. Anyway, go clear out all of your temporary folders (especially Temporary Asp.NET ones), clean and rebuild, and it may help you out.

posted @ Thursday, June 18, 2015 9:03 AM | Feedback (0)
Google Webmaster Tools API – Forget those search queries

So, Google killed off ClientLogin, and wanted everyone to move to OAuth2, because it is so much more secure yada yada yada. Except, you apparently can no longer get your search queries programmatically like you used to.  In other words, it doesn’t work. Awesome.

posted @ Wednesday, June 03, 2015 12:51 AM | Feedback (0)
Azure + Hadoop = Clumsy and Expensive?

So, I decided to teach myself a little bit about Hadoop and running it on Azure, using some ‘hello world’ code found here and here, just a kick the tires kind of thing. The first thing I noticed was how difficult it was to do something this basic.  Configuring accounts and objects and tying them together took quite a bit of time (the username is ‘admin’ BTW, this isn’t obvious anywhere), really more complicated than it really should be. It also didn’t work, not quite.  The Hive queries wouldn’t work as is, and it isn’t idempotent, so there...

posted @ Friday, May 29, 2015 10:00 AM | Feedback (0)
Simple Sample Visual Studio Post-Build Event

del C:\Code\Deployments\$(SolutionName)\$(ConfigurationName)\$(ProjectName)\*.* /f /q xcopy /y $(ProjectDir)\bin\$(ConfigurationName)\*.dll C:\Code\Deployments\$(SolutionName)\$(ConfigurationName)\$(ProjectName)\ xcopy /y $(ProjectDir)\bin\$(ConfigurationName)\$(AssemblyName).exe C:\Code\Deployments\$(SolutionName)\$(ConfigurationName)\$(ProjectName)\ xcopy /y $(ProjectDir)\bin\$(ConfigurationName)\$(AssemblyName).exe.config C:\Code\Deployments\$(SolutionName)\$(ConfigurationName)\$(ProjectName)\

posted @ Wednesday, April 08, 2015 11:13 PM | Feedback (0)
Deleting comments is dumb

So, the other day, I saw this in my RSS feed (“Daddy, what’s an RSS feed?  Do you play CDs with that?”).  As it happens, I was looking for something quick to do this sort of thing, so it happened along at a good point. For some reason, a broken URL version appeared again in my feed today.  Not sure what was up with that, so went back to the post to make sure it was the same. It was, except it looked different.  Hmm….oh.  There had been some comments, but they were gone, and comments were closed,...

posted @ Thursday, March 12, 2015 11:42 AM | Feedback (0)
Strange AutoMapper 3.3.1 Problem

Add AutoMapper from Nuget, build, compiles, fine, run…..exception.  Automapper.dll file cannot be found.  Sure enough, it ain’t there.  Automapper.Net4.dll is there, but not the other. Manually copy over file to bin directory, rebuild, no problem. Not sure what causes this, but it’s obviously a problem, especially with all the different build configurations I have.   Update: once I uninstalled and reinstalled at the project level (as opposed to solution level), the problem resolved itself. God, I hate Nuget.

posted @ Wednesday, March 11, 2015 1:04 PM | Feedback (2)
Flexible Architecture, done entirely wrong

Having worked on a similar system at a ‘too big to fail’ financial client, I know exactly what Ayende is talking about: Then the designers sat down and created the following system of classes: public class Table { public Guid TableId {get;set;} public List<FieldInformation> Fields {get;set;} public List<Reference> References {get;set;} public List<Constraint> Constraints {get;set;} } ………

posted @ Tuesday, March 03, 2015 9:08 PM | Feedback (0)
Visual Studio 2015 CTP 6 Nuget Problems

More reasons to love the piece’o’shit that is nuget…. In previous versions of VS 2015 CTP, the ‘manage packages’ section was horribly designed so that it automatically selected every single project if you wanted to add a package, and you had to manually deselect ones you didn’t want to add it to.  They fixed that. Unfortunately, when adding EF 6 packages, I discovered that now they no longer add all of the config entries required, so you have to finish it manually.  That’s bad enough. But now, today, when I try to go to that section to...

posted @ Thursday, February 26, 2015 12:51 PM | Feedback (0)
Microsoft and Versioning

From Scott Guthrie’s introduction: ASP.NET 5 is an open source web framework for building modern web applications that can be developed and run on Windows, Linux and the Mac. It includes the MVC 6 framework, which now combines the features of MVC and Web API into a single web programming framework.  ASP.NET 5 will also be the basis for SignalR 3 Well, that won’t be confusing in any way, shape or form.

posted @ Monday, February 23, 2015 8:24 PM | Feedback (0)
Duplicate registrations in SimpleInjector 2.7.1

No doubt there is a mailing list or something for this (mailing list….how old am I again?), but….. I had a reference application that worked swimmingly, and so built a new app for production based on it, and found that for each event that was registered to respond to a command, two would be produced at runtime.  I spent a lot of time looking at the differences between the two and noticed that the reference app was built using 2.6.1 whilst the new app was built using 2.7.1. And problem solved. I don’t know why this is. ...

posted @ Wednesday, February 11, 2015 12:20 AM | Feedback (1)
Code Expressiveness: How much is too much?

Consider: var count = GetCount(date); vs. var count = GetCountOfDividendsForOmnibusAccountsAfterStockHoldingAdjustmentBasedOnRecDateTradingOnTradeDate(date); You can add underscores if you like. Is this better?

posted @ Tuesday, February 10, 2015 8:40 PM | Feedback (1)
the type or namespace webviewpage does not exist in system.web.mvc

When setting up a project that I knew was good, I kept getting errors like this when trying to build and couldn’t figure it out, especially since it was referencing pages in Temporary Asp.Net directories. What resolved the issue was making sure that copy local was set to true on the system.web.mvc reference.

posted @ Thursday, January 29, 2015 8:14 PM | Feedback (0)
Note to self about LINQ queries: SingleOrDefault and FirstOrDefault are different

They are both syntactically and semantically different, so if it matters, pay attention. And, yes, “LINQ queries” is arguably redundant. 

posted @ Wednesday, January 28, 2015 1:18 PM | Feedback (0)
Windows Workflow Parallel Activity – How to get things to actually run in parallel

I’ve been doing something using Windows Workflow, and it is….interesting.  Someday we will have a great way to code workflows, in the meantime, there are things like Windows Workflow. Anyhoo, one thing that took a while to figure out is how to get a parallel activity to actually run things in, well, parallel.  By default, it actually doesn’t.  There is one thread assigned to the entire activity, and so, if any of your child activities do their work synchronously, they will not yield to any of the other child activities until they are complete.  This is, well, a little...

posted @ Tuesday, January 06, 2015 10:08 AM | Feedback (0)
A way to handle open generics using dynamics in Simple Injector

Now we get a little more complicated.  Note that there will be a lot of tight coupling, and I’m not talking about CQRS, and I’m sure you can do everything better in many different ways. Here’s the deal.  I wanted a specific way to handle (pun intended) processing commands and events that wasn’t so manual.  Often times, you create a command, it gets handled, one and only one type of event is created (or an exception is thrown), and then that gets handled. In which case, I wanted something like this: Command –> Command Handled –> Command...

posted @ Thursday, January 01, 2015 6:37 PM | Feedback (0)
A way to handle open generics using Simple Injector

In case I need to do this again, this works, however ‘ugly’ it might be.  This isn’t supposed to be a best practice or anything (there are no such things as best practices, and even if there were some, I wouldn’t know them, since I’m not a very good developer). Some code: public interface ICommand {} public interface ICommand<TReturnValue> : ICommand     {         TReturnValue ReturnValue { get; set; }     } public class Command : ICommand  {} ...

posted @ Tuesday, December 30, 2014 9:12 PM | Feedback (0)
How do you deal with open generics and either Autofac or StructureMap?

For the longest time, I’ve ‘hard-wired’ my registrations using StructureMap, and I’m trying to do an auto registry type of thing and it just isn’t working, because I’m old and stupid. I’m trying both Autofac and StructureMap, here’s the Autofac version. I have an interface:   public interface Handles<in T> where T : ICommand I do:    var assembly = Assembly.GetCallingAssembly(); Then:   builder.RegisterAssemblyTypes(assembly)                .AsClosedTypesOf(typeof(Handles<>))                .AsImplementedInterfaces(); This seems to work (as I can look at my registrations and see stuff), and...

posted @ Monday, December 22, 2014 7:26 PM | Feedback (0)
Repost: Speeding up Entity Framework in long iterative loops

I’ve run into this sort of thing before myself, but Rick has all the good details. Basically, if you don’t need change tracking, then you can easily turn it off and speed things up greatly.

posted @ Sunday, December 21, 2014 6:23 PM | Feedback (1)
Please don’t save your view models in your database

For various reasons, I was watching this to learn more about the latest version of Raven DB 3.o (basically, I have a big event/command store and I want to process the raw data into multiple different ‘buckets’ and am looking into various options, including SQL and NoSQL options). Before I get to my main point…. Normally, I wouldn’t pay much attention to mistakes/issues with the presentation itself.  Things happen.  Network connections go out, that sort of thing. However, if you are trying to give an example that is key to your overall presentation, and it is not...

posted @ Friday, December 12, 2014 11:20 PM | Feedback (2)
Nuget still sucks – Visual Studio 2015 Preview version

Why doesn’t Nuget just work? I have a solution.  It’s mostly ‘shell’ projects as I’m just starting out.  About the only package installed is EF 6.1.1.  It builds just fine (on an existing machine with VS 2015 Preview installed). I check it into TFS.  I go to a new machine, with VS 2015 Preview installed.  I connect to TFS, I download from source, I go to build…..of course, it fails. I check in options to see if it is configured to automatically download packages.  Of course it is. I right-click on the solution….no longer is there...

posted @ Thursday, November 20, 2014 11:39 PM | Feedback (4)
Rerunning Visual Studio 2015 Preview Secondary Installer

Did you have a problem running the Secondary Installer when installing Visual Studio 2015?  I did (something went wrong with the node.js download and install).  So, how do you rerun the thing?  Run the secondaryInstaller.msi from the ISO?  Nope. Instead, go to C:\Program Files (x86)\Microsoft Visual Studio 14.0\SecondaryInstaller and run SecondaryInstaller.exe from there.  I assume it will be in regular Program Files if you have an x86 machine, but since I don’t, I can’t verify that, it’s just a guess. HTH.

posted @ Friday, November 14, 2014 10:36 PM | Feedback (9)
Mongo Repository: You probably shouldn’t do this type of thing

Reading this on InfoQ, I was struck by this: “The reason for the existence of MongoRepository, to me, is simple: it provides a very 'narrow' abstraction on top of the underlying MongoCSharp Driver that, to me, mostly hides all awesome possibilities it provides behind a simple interface that, basically, supports CRUD. This way you don't get too tempted to use all sorts of Mongo-specific functionality and thus high coupling between a project and mongo is minimized so that, should one ever decide to use a different persistence layer, the 'switch' can be made a bit easier.” Unless you...

posted @ Tuesday, October 07, 2014 9:37 AM | Feedback (0)
Windows Forms: Why isn’t my Form_Load method being called?

This is just one of those things that I’m posting in case I see it again. Was testing a Windows Forms app and, depending on which build configuration was being used, the Form_Load method wasn’t being called.  Huh? I don’t understand the internal mechanics of it, but the non-working build configuration was set to x86, while the working one was set to Any CPU, and this was on a x64 machine.  Changed it to Any CPU for both, and we were fine.

posted @ Monday, August 25, 2014 1:02 PM | Feedback (0)
EF doesn’t really like bounded contexts

So, from the previous post on the subject, I randomly tried Phillip’s suggestion of dropping the models in different folders, and was rather surprised that it could now build.  Great!!!! Except….no.  At run time, a new error surfaced: System.Data.Entity.Core.MetadataException was unhandled   HResult=-2146232007   Message=Schema specified is not valid. Errors: The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'Cart'. Previously found CLR type 'EF6CommonTable.Model.Checkout.Cart', newly found CLR type 'EF6CommonTable.Model.Shopping.Cart'. The mapping of CLR type to EDM...

posted @ Wednesday, July 30, 2014 1:12 PM | Feedback (4)
Still Stumped: Entity Framework 6 and ‘Bounded Contexts’

Ok, I still can’t figure out how to do this.  It has to be possible.  My Google-Fu is usually phenomenal, but it is failing me here.  I’ve ‘dumbed it down’ to a very simple scenario.  Suppose I have two EF contexts.  Each one references two tables, the same two tables, from the same database, and I use the ‘Generate from Database’ option in EF 6.  In this case, I am mimicking  two bounded contexts, the shopping BC and the checkout BC.  Each one needs to reference the Cart and CartItem tables and generate those entities accordingly.  Here are...

posted @ Friday, July 25, 2014 7:57 PM | Feedback (3)
Installation problem: Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013

This download appears to have an issue with Visual Studio 2013.  I installed it last night, then was worried when I found that some of my projects were now marked as being incompatible with Visual Studio 2013 (Premium, if it matters). Turns out that it rolls back Visual Studio 2013 to RC3 version.   Actually, I’m not sure what it does, I misread that I have Update 3 RC installed, maybe they are incompatible or something. Thank God for System Restore.  Ugh, I take that back.  Even with System Restore, things are totally horked.  It seems to be...

posted @ Wednesday, July 23, 2014 10:55 AM | Feedback (0)
Brief review – Pluralsight’s Pragmatic Behavior-driven Design with .Net

I had a much longer review planned initially, but am instead just going to write down a few notes here. Really short version: do not watch this thinking you are going to learn how to do BDD.  Rob’s latest entry concerning BDD is really disappointing on a number of levels.  He ‘introduced me’ to BDD through his Kona webcast originally, and so I generally look forward to anything he has to say about the subject, but the overall quality of this online course was pretty lackluster, in many respects. He starts off strong, pointing out that...

posted @ Friday, July 04, 2014 4:41 AM | Feedback (0)
OleDbDataAdapter and Excel: Why are some of the column values missing?

Ran into this recently, writing it down in case I forget. I had an excel spreadsheet that I had been importing for quite a while (meaning, a job that had been working for months on daily submitted spreadsheets) and I wanted to add new columns that were present, so I did all the necessary c# work, but then when I ran the updated project, the values were blank, though I verified they were present in the spreadsheet. It turns out to be related to the fact that the columns were sparsely populated and how the connection string was...

posted @ Thursday, June 05, 2014 11:46 AM | Feedback (0)
EF 6 Bug – Can’t share tables across edmx files?

I’m trying to upgrade an application from EF 4 to EF 6 and ran into a number of problems, so I spiked out a simple console app and am seeing the same bizarre behavior. Using two different .edmx files, using different connection settings, and using custom namespaces, if I try to have each one reference the same two tables, so that they could have those mapped as entities in each namespace, it fails.  If I run custom tool on the model .tt file one by one, I can see that it will ‘steal’ the entities back and...

posted @ Wednesday, June 04, 2014 4:06 PM | Feedback (0)
Visual Studio Build Error: Error to use a section registered as allowDefinition='MachineToApplication' beyond application level

I get this from time to time, and though it is commonplace to me now, I thought I’d blog it just in case I forgot. Sometimes you try to build your web application and you get this error.  And you haven’t been doing anything with your web.config file, so you know it has nothing to do with that. Delete the “obj” folder from your solution (it might be hidden since it isn’t technically part of the solution).  For some unknown reason, this causes this error to occur.  Deleting the folder clears the error. Update: I’m not sure...

posted @ Saturday, May 31, 2014 3:16 PM | Feedback (0)
All good things – Chicago Alt.NET

We started the group back when Alt.Net was an actual thing.  Derik, Sergio and I got together at some bar and shot the shit, and ended up starting the group. I never really did much for the group, besides the occasional presentation.  Derik handled all of the mechanics of setting up meetings and whatnot, till he left for North Carolina, and then Sergio took over. Alas, times change.  Some of the key people who helped facilitate setting up the meetings moved.  Many of the people who were part of the original ‘movement’ left to do ruby and...

posted @ Wednesday, February 12, 2014 7:56 PM | Feedback (0)
Breaking Visual Studio

I haven’t checked to see if this affects all versions of VS, but logging it in case I do it again. I started getting “function evaluation disabled because a previous function evaluation timed out” and “children could not be evaluated” errors when debugging, at which point, debugging would then halt after a few seconds.  Needless to say, this was somewhat annoying, and nothing seemed to be logged anywhere to explain why. What had happened was that I had created a property of a class that was recursive, in such a way that it was ‘infinitely’ recursive, so I...

posted @ Friday, November 15, 2013 1:49 PM | Feedback (0)
Visual Studio Installer Crashes on Windows 8.1 RTM

The entire story of the Windows 8.1 RTM install on a MacBook Air will come another day, but I was having a really odd problem with not being able to install Visual Studio 2012 or 2013 without it immediately crashing. Some others online were having issues, and it comes down to, get this, the display adapter driver.  Once I uninstalled it, the installer worked just fine (well, it’s running right now, anyway).  Hopefully, I can reinstall the display adapter after the install. Update: unfortunately, updating the display adapter causes Visual Studio itself to crash on launch.  Maybe it...

posted @ Thursday, September 12, 2013 8:44 PM | Feedback (0)
TF203015: the item blah has an incompatible pending change

Ran into this recently, so leaving myself a note. The posts I saw all had to do with shelve sets, but it appears to happen with regular branches as well.  Sometimes, when you delete a file in two branches, and merge one of them in, when you later try to merge the other one in, TFS appears to get ‘confused’ and won’t let you check in, giving you this message.  At least I think that is what it is. The fix is to undo the changes in that 2nd branch, and then you can check in.

posted @ Monday, September 09, 2013 10:46 AM | Feedback (0)
Visual Studio Known Project GUIDs

They can be found here.

posted @ Wednesday, August 28, 2013 12:14 PM | Feedback (0)
A sample NUnit SetUp class when using Watin

This post is largely for me, in case I need it again. You know what NUnit is.  You probably know what Watin is.  Watin is no longer under active development.  If you are in the business of writing browser-driven integration tests within the .NET space, you should probably be looking at Selenium. However, if you are kicking it old school and using Watin, and you want to try to avoid all of those ‘false negatives’ (i.e., failing tests that fail because of quirks with COM, not because your test actually failed for ‘real’ reasons), I’ve found...

posted @ Wednesday, July 31, 2013 6:34 PM | Feedback (0)
Hibernating Rhinos’ Entity Framework Profiler Mini Review

This doesn’t really constitute a review, just a couple of comments, but whatever. In some previous posts, I had talked about my experience with Hibernating Rhinos’ Linq to Sql profiler.  Basically, it failed for me, didn’t even function properly, and Ayende was unable to help. Anyway, I’m working on something that uses Entity Framework, so I figured, what the hell, I’ve give it one more shot, I’ll just get the EF Profiler, and not the entire suite, and see how it works.  I can expense it. So, the first thing I did, obviously, was hook it up...

posted @ Tuesday, June 18, 2013 8:04 PM | Feedback (0)
Visual Studio 2012 Update 3 RC2 Gotcha

As a general rule, I am no longer as ‘carefree’ as I was in my younger days, just installing updates willy nilly on my development machine and hoping for the best, but if an update as a ‘Go Live’ license and a clearly stated “we support upgrading from the RC to RTM” policy, I’m good to go. So, I was concerned when I installed this and found that I could not load some projects due to a “You do not have rights to access the IIS metabase” error.  Ok, that could be a problem. But, in this case,...

posted @ Thursday, May 30, 2013 11:14 PM | Feedback (0)
Delivery vs Quality

I realize that just about anybody reading this will immediately think “but we can have both.”  I understand that.  This is just an example. At a client once, I came aboard with a bunch of other consultants around the same time (sometimes organizations do these weird things like letting entire groups of consultants go, along with their gained knowledge, and then have to pay the cost of having that knowledge needing to be relearned.  There are ways that organizations can learn to do such things better, but I digress).  With a large installed base of applications, various consultants were...

posted @ Thursday, February 21, 2013 11:44 AM | Feedback (0)
More fun with Nuget, or NuGet Still Sucks

I like Jimmy Bogard.  A lot.  He seems really cool.  We’ve never met, and besides maybe an occasional cross comment on blog posts, I don’t think I’ve ever talked to him. But he seems cool, and he seems to be a really good developer, much better than I am (though a sick hamster with some JQuery skills is probably a better developer than I am, but I digress). Anyhoo, he had a recent post about some presentation he gave in various places like Dublin and Kiev and Guam and Haiti and Narobi (okay, I’m exaggerating), and posted about...

posted @ Sunday, December 23, 2012 3:40 PM | Feedback (6)
VSCommands Friendly Solution Name

If you are one of those annoying people who like to have 2 or 3 or 9 instances of Visual Studio open at once while working on multiple branches of the same code base (and only an idiot would want to do this, obviously), it helps if you can get Visual Studio to include the branch name in the title, otherwise, you end up having to open a file and hover over it to help remember which is which. If you download VSCommands Lite for use in VS 2010, you can set what are called friendly names, but unfortunately,...

posted @ Tuesday, December 04, 2012 9:23 AM | Feedback (0)
Visual Studio 2012: Still can’t handle going offline?

Shouldn’t Visual Studio be able to handle this by now, without multiple prompts about files needing to be overwritten (at best) or total failures because of files being read-only (see previous post about NuGet)? Seems like a rather obvious requirement for basic functionality.

posted @ Tuesday, August 21, 2012 11:01 PM | Feedback (2)
T4MVC RedirectToAction problem

I tried to find similar issues but Google-fu failed me. With TVMVC, you should be able to get rid of some magic strings.  So, for instance, if you have this: return RedirectToAction("Index", “Foo", new FooViewModel {SomeProperty = false }); you should be able to replace it with: return RedirectToAction(MVC.Foo.Index(new FooViewModel {SomeProperty = false})); However, the FooViewModel is always null when it gets to the controller.  I always assume user error, since johnny developer is an idiot, but nothing seems to be working.

posted @ Friday, June 08, 2012 2:17 PM | Feedback (2)
First impression of Visual Studio 2012 RC

Holy crap.  Is that thing f%^&ing ugly or what?

posted @ Thursday, June 07, 2012 2:36 PM | Feedback (0)
Faulting Module Kernel32.dll: One solution

This is one solution to this error, hardly the only one. Sometimes when you try to run a .NET application, you get a completely generic error message in event viewer that includes “faulting module kernel32.dll” in the description.  If you Google this, you will see that there is a wide and nearly useless range of cases where this can occur. In my particular case, though it took a little while to figure out, the cause and solution were fairly straightforward. The application was a windows service, and would throw an error when started.  It worked in other...

posted @ Sunday, October 30, 2011 4:18 PM | Feedback (5)
Review: Tekpub Webcast - Full Throttle : TDD with Brad Wilson

So, after going through the signup process, I finally gained access to this episode.  Leading up to this review, I have watched the episode in total 3 times:  the first time I watched straight through while taking quick short hand notes, the second time, I watched portions of it in succession, stopping to take more in-depth notes, the third time, I watched it to fine-tune my comments on specific sections. Since I’ve been ragging on Tekpub, it is only fair to start off with a positive general note. Tekpub’s Production Quality Rob has been doing...

posted @ Tuesday, September 20, 2011 8:07 PM | Feedback (0)
Visual Studio 2011 Developer Preview doesn’t always like Visual Studio 2010 Projects

I installed the Visual Studio 2011 Developer Preview on one of my machines, as it is supposedly safe to install side by side with Visual Studio 2010. One of its supposed features is its ability to open Visual Studio 2010 projects/solutions without modifying them, which can then be re-opened in Visual Studio 2010. It turns out this isn’t always the case, though I’m not sure why. I have a solution that is (more or less) a silverlight application, and it simply won’t open the web project that hosts the silverlight app.  When the solution is opened, it...

posted @ Saturday, September 17, 2011 11:53 AM | Feedback (1)
Why do I have to use NuGet?

NuGet is Microsoft’s attempt to copy Ruby gems, as far as I can tell.  Great.  All for it. But why is it that I have to use it, instead of getting the option to install normally through some MSI or other option? Maybe I’m missing something, but if I want to install, say, EF 4.2 Beta 1, why can’t I have an option to install it globally, as opposed to having to install it within some specific project/solution?  I’m using a Microsoft release as an example, but I could just as easily use, e.g. AutoMapper as an example....

posted @ Monday, August 22, 2011 8:53 PM | Feedback (7)
Does anyone actually do TDD?

Obviously, the answer is yes.  The person who first convinced me that “all that agile stuff” was really the direction to look towards (note, that’s “a direction to look towards”, not “embrace uncritically”, but I digress) practiced it.  Or at least, he always had his NUnit test runner up, and I could tell when he was too busy to chat by looking at the status of his tests (when they were all green, I figured he was probably goofing off). I ask the rhetorical question though based on the lead to one of Rob’s posts: “One thing I've...

posted @ Sunday, August 21, 2011 8:06 PM | Feedback (2)
Implementing multiple joins using EF

From Rob’s post, I decided to double-check how you would transform his ‘semi-complex query’ into EF syntax and see what the resulting SQL was.  His initial query was: var results - DynamicModel.Open(connectionString).Query(@"  SELECT Orders.OrderNumber, Categories.Name FROM Products  INNER JOIN Categories ON Categories.CategoryID = Products.CategoryID  INNER JOIN OrderItems ON OrderItems.ProductID = Products.ID  INNER JOIN Orders ON Orders.OrderID = OrderItems.OrderID  WHERE Orders.OrderDate > @0", DateTime.Now.AddYears(-1)); Now, I have no idea what database he was hitting against.  To make it easy, I decided to run it against our BFF Northwind, and so I had to reformulate it as follows:...

posted @ Tuesday, August 09, 2011 8:30 PM | Feedback (0)
VS Studio Debugging: The server committed a protocol violation

Thank goodness for that internet thing.  Because Mr. Kulov recorded his pain, I was able to recover from this issue quickly. If a process already owns port 80 and you try to debug in Visual Studio where you are trying to use your local IIS installation, you will get this error.  Like in Martin’s case, the offending application was Skype (which has an option in tools to use port 80 and 443, uncheck this) which was using the port.  If you don’t have Skype installed or running, run netstat –b to find the application causing the issue. Also,...

posted @ Sunday, August 07, 2011 6:05 PM | Feedback (0)
Why isn’t TFS more like <insert alternative here>? Blame Visual Studio

Brian Harry, the Product Unit Manager for Team Foundation, has a post about some of the coming improvements to TFS 11.  It’s an interesting informational read for many reasons, but includes this: “A little background before I talk about the improvements we are making. When we designed TFS 2005, one of our design goals was to build a system that we could use for developing Visual Studio. VS is a VERY large code base. Last I checked, each branch was around 5 million files and I suspect it’s a good bit larger than that now. Your average developer needs...

posted @ Wednesday, August 03, 2011 7:58 PM | Feedback (0)
Glitches when running Microsoft Expression Blend under Parallels on a Mac

Thankfully, others have experienced this as well, but suddenly I had a weird issue with trying to run Expression Blend from my Macbook Air, which hosts a Windows 7 installation under Parallels.  When I would run it, it would look like it was running under 4-bit graphics or something, and totally unusable. Apparently, it is due to how WPF apps (which I take Expression is, though I haven’t had a problem with Visual Studio 2010, which I think is a WPF app as well) work with hardware acceleration in this environment.  In any event, the fix is fairly simple. ...

posted @ Saturday, July 30, 2011 6:34 PM | Feedback (0)
Juneau CTP3 breaks Visual Studio 2010 Entity Model Designer

So, this is supposed to allow you to do “database design work for any SQL Server platform” within Visual Studio, blah blah blah. Unfortunately, it throws this error in Visual Studio 2010: Uninstalling Juneau doesn’t fix it, neither does reinstalling SP1, nor following some other things I’ve seen suggested on the InterWeb. Luckily I have a half dozen machines so it only happened on two of them (note to self: remember not to randomly start loading every CTP that looks interesting on multiple machines at once before determining if it hoses them). Still looking...

posted @ Sunday, July 24, 2011 7:37 PM | Feedback (1)
Using TransactionScope : The Transaction has been aborted

This is a pretty generic error message that can pop up.  As always, there are many possible different causes for it, but here’s one. If you have any nested transactions, and the inner transaction isn’t ‘done properly’, you can get this error message in the parent transaction. So, in my case, I had a typical using (var scope = new TransactionScope()) section, and was getting this error message when I called scope.Complete(). The reason was because, inside that using statement, I had a call to another method that had its own (var scope = new TransactionScope()) section,...

posted @ Tuesday, June 14, 2011 11:30 PM | Feedback (1)
Reflections on a 6 month Software Development Project

Now that I’ve successfully completed a 6+ month project, I thought I’d write down some of the things I learned from it (or some of the things that happened anyway), as much as for future reference as anything else. Project Overview In part because of NDA blah blah, and in part because it isn’t relevant, I’ll leave out some of the specifics. Having said that, here’s the skinny.  The ultimate end client is a trading team, buying and selling blah blah for the people who have hired them to manage their portfolios.  In the grand scheme of...

posted @ Sunday, March 27, 2011 2:07 AM | Feedback (1)
Initial Impressions of UberProf, part 4, or “Ending with a whimper”

In the previous three posts (1, 2, 3), I had talked about some of the good and bad experiences that I had experienced with the Ling to SQL Profiler.  As it turns out, the end was pretty anti-climactic.  It’s hard to give an overall impression of the tool suite based on that, but I’ll try. You can’t use what doesn’t work As I had mentioned before, there was a particularly annoying problem with my attempt to use the profiler.  In essence, the profiler would simply stop profiling.  The only workaround was to essentially rebuild the solution every time...

posted @ Saturday, March 26, 2011 10:04 PM | Feedback (0)
BDD is to YAGNI as TDD is to BDUF

I’m going to give this analogy a 43% rating in terms of how strongly I feel about it, but for what it is worth….. BDD/Context Specification encourages you to write the code, and only the code, that your application actually needs right now.  TDD encourages to write the code that you need right now as well as the code you think that you are going to need. YAGNI is a concept that is simple to state, but can be difficult to understand in its implications.  This is actually true about the concept of BDUF as well. YAGNI...

posted @ Sunday, March 06, 2011 11:32 PM | Feedback (2)
Semi-ditto Post : Recommended Book: Apprenticeship Patterns

Davy Brion has a post up about a book, which is nice, but also posts about his opinions about “Software Craftsmanship.”  Though I don’t imagine he would agree with my own take on it, I really like some of what he says: “I’m not a fan of the Software Craftsmanship movement. Well, i do love the goals and the principles behind it but i kinda dislike the terminology they've chosen to try to spread those goals and principles. It has this elitist connotation to it which just rubs a lot of people the wrong way. Instead of trying to...

posted @ Monday, February 28, 2011 10:03 PM | Feedback (2)
Ditto Post: Unit Tests Are Overrated

Over at, Krzysztof Kozmic has a great post about testing, and how (paraphrasing) integration tests are more valuable than unit tests. “At the end, let me share a secret with you – Windsor, has very few unit tests. Most tests there are (and we have close to 1000 of them) exercise entire container with no part stubbed out in simulations of real life scenarios. And that works exceptionally well for us, and lets us cover broad range of functionality from the perspective of someone who is actually using the container in their real application.” I agree with...

posted @ Monday, February 28, 2011 6:42 PM | Feedback (2)
Beware of hidden assumptions in software development projects

I’m going to pick on one thing (and a surprising thing at that), but the one thing isn’t really the point. I’m working on a project in which the backing database store is being moved from SQL Server to Oracle.  The reasons for why this move is being made is interesting in itself, but I’m not going to talk about it here. To give a little background, I am a certified SQL Server DBA.  At a Master level, even.  I’m not sure why (well, I know why, I took the exam), as when I consider myself against really...

posted @ Monday, February 07, 2011 8:28 PM | Feedback (2)
Excel Interop: System.Runtime.InteropServices.COMException : Microsoft Excel cannot access the file

Yes, before you say anything, Excel Interop isn’t something you should be doing, unless you have to. Anyway, typical problem is this:  you create some C# code that uses Excel Interop to do the ugly things that you are doing, and all works fine.  Then, you try to schedule it through Windows Scheduler or SQL Server Agent or run the code from a web site in IIS, and each time you try to run it, it throws this error. From Bob Templeton in the MSDN forums’ post here, you need to do this: -  Create  the directory...

posted @ Sunday, February 06, 2011 11:49 PM | Feedback (4)
The item 'T4MVC1.cs' cannot be deleted

I ran into this problem about a month or two ago, and don’t remember how I fixed it. Every time I build my solution which uses T4MVC, I get this error unless I manually delete the file.  Also, note that it is “T4MVC1” and not “T4MVC.”  This happened the last time as well, where somehow the solution thinks it needs to name the file differently. I will post the solution whenever I figure out what it is so that it is documented for myself the next time it happens.

posted @ Sunday, February 06, 2011 3:13 PM | Feedback (10)
Newables and Injectables

As per usual, when you read a lot of blog posts and get a lot of other stuff in your RSS feeds, you end up hitting on some things that you didn’t expect.  Most of the time, it isn’t necessarily all that valuable, but sometimes it is. From Misko Hevery and then expanded upon by Loose Couplings (couldn’t find an actual name) is a distinction between newables and injectables that can help you write better tests (the latter casts it in terms of TDD, which as you know I think sucks, but the distinction seems promising regardless of that)...

posted @ Friday, February 04, 2011 9:16 PM | Feedback (0)
Software Development for Children aka Paging is an option

The title of this post, even for me, is pretty obnoxious, but I also feel pretty strongly about this, so here goes. Ayende posted about code that “should never hit production” in one of his usual code challenge blog postings.  I know that some people complain when he does this, but a) it’s his blog, he can post whatever he wants to, you don’t have to read it, and b) even if these challenge posts don’t touch something you happen to be facing yourself at any point in time, they tend to be pretty interesting, and c) if like me,...

posted @ Thursday, January 06, 2011 12:05 AM | Feedback (2)
Software Developers aren’t Doctors, and they shouldn’t play one on TV

Continuing on the theme that David Harvey talked about, where one can and should be in favor of ‘craftsmanship’ while being skeptical of Software Craftsmanship (TM pending), I’ve created a category to that effect, and want to continue the discussion here. Jan Van Ryswyck (hope I spelled that right, he doesn’t have an easy last name like “Nuechterlein”, further mentioned as “JVR”) has a post up on Elegant Code where, inspired by a tweet, he discusses the division of software developers between laborers and professionals.  As I’m going to paraphrase the hell out of it, so you might want...

posted @ Thursday, November 04, 2010 9:28 PM | Feedback (2)
Microsoft relinquishes control of IronPython and IronRuby

As described here. Clock started on how long until someone ‘explains’ why this makes Microsoft eeeeevvvviiiilllllll!!!!!!!

posted @ Friday, October 22, 2010 9:08 AM | Feedback (0)
Diverse.NET–This is good why exactly?

So, as I mentioned, Microsoft released NuPack, which lead Rob to write a post, which lead Ian to write a post, which various people have commented on one way or another. This is another one.  Read stuff in order to make some/most sense of this. I’m actually surprised it took as long as it did for one of the usual suspects to take the stand that Ian took. Grossly paraphrasing, some of the themes include: By introducing NuPack, Microsoft has unnecessarily harmed the OSS ecosystem around .NET package managers, including Horn, Nu, and...

posted @ Monday, October 18, 2010 6:12 PM | Feedback (0)
NuPack released

There's all sorts of stuff out today about it, but the 'official' announcement can be found here. Special award goes out to Jeff Olson for the first snarky comment about it (in the comments to the announcement), and his use of 'auto-fellate'.  Snippet: "Released "only" as a VSX package? Really? Only supporting 2010, no less? I guess that's great for MVP bloggers, community evangelists and other assorted MS Employees who like to auto-fellate on all the Great Things they do for the community, but there's still a *huge* number of enterprise devs out there in the wild still on VS2008 and 2.0/3.5 ....Bonus...

posted @ Wednesday, October 06, 2010 12:18 PM | Feedback (1)
Initial Impressions of UberProf, part 3, or “Stumping Ayende”

In previous posts, I talked about my initial impressions of both the EF Profiler and the Linq to SQL Profiler.  I’m going to focus here on the latter.  From the post title, you can guess correctly that there’s some bad here, but there’s also some good here, so I’m going to start with that. “This thing will pay for itself in an hour” This is one of the lines in an email I sent to Ayende, focusing on the promise of the profiler and how I see the clear benefits of it. Here’s a standard output (I’m...

posted @ Tuesday, September 14, 2010 8:37 PM | Feedback (0)
Unintentional Comedy

Over at LosTechies, Derick Bailey has a post about testability and design.  It’s an interesting read. However, for real fun, wade through the comments.  Outstanding stuff.

posted @ Monday, September 13, 2010 10:13 AM | Feedback (5)
cqrs for dummies – an interlude – Greg Young’s sample app

Greg has posted that he has created a sample app for CQRS, which you can find here. It is indeed called “SimplestPossibleThing” and it’s pretty accurate, but it is good code to review.  I especially like “InfrastructureCrap.DontBotherReadingItsNotImportant.cs", I mean, come on, what else would you look at first. Seriously though, it’s important to see a simple implementation of all of the main components.  Check it out.

posted @ Tuesday, August 31, 2010 1:33 PM | Feedback (0)
Initial Impressions of UberProf, Part 2

In a previous post, I talked about the first 30 minutes or so of working with the various parts of UberProf.  It’s been a bit longer, so I wanted to update some of that. EFProf Previously, I noted the following: “Since it is long before I care about profiling this app (since it is a test database used to satisfy my specs), I won’t go into much of the details, but one interesting thing I noticed is that, in a routine where I am doing naughty N+1 things in a loop, it only flags the last three...

posted @ Friday, August 27, 2010 9:06 PM | Feedback (0)
Initial impressions of UberProf

After being convinced that Ayende wouldn’t steal my data and sell it to the Russian mafia, I finally bought UberProf, and here are my initial impressions of working with it today (keep in mind this is a total of about 30 minutes of real work). UberProf isn’t actually a single application, it is a license to use any of the four (with more on the way) existing profilers, which target NHibernate, Hibernate, Linq to SQL, and Entity Framework. This made the obligatory “thanks for giving us your money” email more confusing, since it explained that to use the...

posted @ Friday, August 20, 2010 7:24 PM | Feedback (0)
The Risk of Using OSS

Jeremy Miller has posted that he is taking a break from supporting StoryTeller and StructureMap for a bit.  His description of why he is doing so is reasonable and understandable (in my eyes at least). He differentiates between StoryTeller and StructureMap, and in a way that (by total chance) happens to be beneficial to me.  As I’d mentioned in a previous post, I was comparing StoryTeller with SpecFlow, and though I have started with SpecFlow, I was planning on doing a phase with StoryTeller as a comparison, but given what he’s said about it, it’s probably okay to lay off of...

posted @ Thursday, August 12, 2010 10:30 PM | Feedback (0)
System.Linq.Lookup rocks

Well, I think it’s pretty cool, anyway. Lookup allows you to have a collection of key-value pairs, but what makes it special is that you can have duplicate keys, which your normal Dictionary or SortedList don’t allow.  This allows you to do all sorts of grouping and what not which is very useful. The only downside is that you can’t new one up, you have to do something like myList.ToLookup(blah, blah, blah) to get one. Check it out.

posted @ Friday, August 06, 2010 3:18 PM | Feedback (0)
MEF almost makes sense now

Keeping in mind the fundamental rule about analogies (all analogies partially work, because everything is similar to everything else in some respect, and all analogies partially fail, because everything is dissimilar to everything else in some respect), this one makes sense to me. By way of Kevin Hoffman and his nameless friend and co-worker, MEF and the Zen of Lego. Of course, it could be almost completely wrong.

posted @ Friday, August 06, 2010 11:13 AM | Feedback (0)
I think this is related to why people don’t like Microsoft Connect

I got an email, related to this, saying it was fixed. I haven’t the slightest idea if I submitted this.  If I did, it was in August 2006, so it’s a bit late.

posted @ Wednesday, August 04, 2010 6:24 PM | Feedback (0)
More Reasons Why Integration Tests Can Be More Important Than Unit Tests

Over at CodeBetter, Patrick Smacchia (the NDepend dude) recently has blogged a couple of posts about “Tests Driven Development” (not sure if the extra ‘s’ is supposed to signify something important or if that’s just what he calls it).  I’ve written at other times about why I’m not a big fan of TDD so won’t go through all of that blah blah blah here, but some more events at clients have re-iterated to me why Integration Tests are often much more important than unit tests. Patrick talks about using code contracts as integral, and I agree with...

posted @ Friday, July 16, 2010 9:47 PM | Feedback (0)
A forthcoming comparison between SpecFlow and StoryTeller

Jeremy Miller has finally released the 1.0 version of StoryTeller, and the timing for me turns out to be fortuitous (I think that means ‘pretty good’…).  From Jeremy’s own description: StoryTeller is a tool for creating and using “Executable Specifications” against .Net systems.  StoryTeller could be called a Behavior Driven Development tool depending on which of the billion definitions of BDD you subscribe to, but is very much optimized for customer facing tests.  I meant StoryTeller for the older ideas of Acceptance Test Driven Development that predate BDD.  SpecFlow is another tool that I’ve been looking...

posted @ Wednesday, July 07, 2010 10:47 PM | Feedback (0)
RavenDB, and a brief design philosophy discussion with Ayende

Suppose you design a system that is chock full of interfaces, specifically things like some version of IRepository, where you have the ability to change out your backing store/database more easily. A common criticism of this sort of design is that it is unrealistic to think you actually will change your main backing store/database in a production system.  My own experience is that while it does happen (a current client project I am working on involves changing the backing database for a set of applications from SQL Server to Oracle, for instance), it doesn’t happen often, and you often...

posted @ Friday, May 21, 2010 7:44 PM | Feedback (1)
Code cannot and should not replace technical documentation

I’ve written recently about technical documentation and the good and bad about it. Over at ElegantCode, new member John Sommez has started out with some posts about eliminating comments from code, and most recently, about how unit tests can replace the need for technical documentation for developers working on a system. I would go ahead and read what he has to say.  It’s well-written, and he’s obviously given some thought to the topics.  Unfortunately, I think the advice he gives is wrong, and would like to explain why. As developers, we almost always run into the problem...

posted @ Tuesday, April 27, 2010 11:53 PM | Feedback (0)
NoSQL is the new Black

No one really talks about anymore.  In my mind, that’s a good thing.  Though some people apparently had different goals for all of that (setting up a foundation or some other silly thing), for other people, it was about taking the things that a small subset of .NET developers were doing and making them more mainstream (whatever that means).  Though (again) it is hardly a definitive sign of anything, the fact that people like Jeremy and Ayende have been publishing articles in MSDN (and no one thinks this is odd) is a good thing.  That Asp.NET MVC has unit...

posted @ Tuesday, March 30, 2010 10:19 PM | Feedback (2)
CQRS Presentation, Chicago Alt.NET, 1/13/2010 Recap

I’ll update this post with the link to the screenshot and the slide deck when Sergio posts it. Update: here they are. On a scale of 1 to 10, without thinking too much about it, I would give myself a 4 or a 5 on this one, and for a couple of (somewhat related) reasons: - a fundamental flaw of the presentation is that I was trying to give a high-level summary overview of the things that Udi and Greg and Mark are talking about, without having the benefit of the width and breadth...

posted @ Thursday, January 14, 2010 8:43 PM | Feedback (0)
There’s nothing wrong with ORM

Rob Conery, apparently bored again, decided to post a rant/whine/something about ORMs, apparently because of something Ayende posted.  Apparently.  It looks like this is a topic that he’s been thinking about for a while, so maybe Ayende’s semi-flamebait post was just the trigger.  I don’t know.  Anyway, Rob posted an initial commentary, and then, because he’s a wuss sensitive soul, he deleted it, and posted an edited commentary.  I have the initial commentary since my RSS reader grabbed it, and I’m not sure exactly why he deleted it, as opposed to just posting a follow up.  I didn’t think it...

posted @ Tuesday, December 29, 2009 7:20 PM | Feedback (8)
Those Wacky Software Craftsmen

Minor update: Scott addressed the attribution thing in this post, so retracting those comments. Recently, Scott C Reynolds has been writing a couple of posts about….well, it’s hard to tell exactly what they are really about, but at least in his mind they are apparently about quality and professionalism and maintainability and the usual laundry list of things that ‘software craftsmen’ like to pontificate about.  As is often the case, there’s a nice mixture of well thought out insight, good advice, misguided idealism, hilariously misplaced snideness, and outright ignorance.  But it makes for some fun reads. Don’t put...

posted @ Saturday, October 03, 2009 8:38 PM | Feedback (1)
Adding Tests to a Legacy System through New Requirements

I’m going to try to describe the way that I would approach adding tests to a system that doesn’t have them, and wasn’t built to support them.  It will be a simple example, and isn’t intended to be anything other than a way in which I might approach this situation. When I say that it wasn’t meant to support them, I mean it has certain characteristics: Uber methods that access the file system, do some processing, make a call to a web service, send a new file through FTP, etc. No...

posted @ Sunday, September 27, 2009 10:54 PM | Feedback (0)
Some things I think I like about ‘Specification-style’ development

I specifically say ‘Specification-style’ to make it clear that I don’t pretend to be doing “full-blown” Context/Specification BDD as described by Scott Bellware here, or even that I can use MSpec as developed by Aaron Jensen (typical ‘non-approved software’ issue…whatever).  Instead, what I am doing is taking what I take to be an important aspect of it and running with it.  Of course, just because I take it to be an important aspect doesn’t mean it actually is, blah blah blah. I’m working on a system that does stuff in a very ‘legacy’ way.  Keeping in mind that ‘legacy’...

posted @ Wednesday, September 09, 2009 8:21 PM | Feedback (0)
NMock2 isn’t dead, it’s just moved

I’m working on a project where I use NMock2 as my mocking framework. Since I had never used it, I did the usual and googled it.  For whatever reason, it directed me to: Which of course made me discouraged.  Clearly not a live project.  Later on, I googled “nmock2 dead” and low and behold, it directed me to: Much better.  From first glance, still not as ‘vibrant’ as Rhino Mocks or MoQ from a community perspective, but definitely active.

posted @ Friday, August 21, 2009 6:40 PM | Feedback (0)
Honestly, I still don’t quite understand what “Oslo” is

But, the team responsible for it is merging with the Data Programmability team. Time will tell what this means.  And whether I will get it.

posted @ Tuesday, August 18, 2009 6:32 PM | Feedback (0)
Developer Cats and Dogs Living Together, Mass Hysteria – A recurring series

So, Rob Conery is leaving Microsoft, and someone else has to keep developing the MVC-Storefront/Kona app at Microsoft, and that person is Bertrand Le Roy. Anyway, he/they decided that they need to replace the data layer and so they chose…….NHibernate.  That’s right, not Entity Framework, NHibernate.  It should be interesting to see where this goes.

posted @ Monday, August 17, 2009 7:25 PM | Feedback (0)
How not to advance software development practices

Jimmy Bogard, creator (I think, he’s listed as a Coordinator, but I think his role is much more than that) of AutoMapper, has a post up about Continuous Learning, where he states: One of the more tiring arguments against ideas like Agile or Lean is the line of “gee, it used to be RUP, now Agile, now Lean.  Make up your mind!  I’ll come back in 2 years when it’s something else shiny you’ve latched onto.”  But that’s not an argument against ideas, it’s just an argument against change. and: So we have two options – cling...

posted @ Sunday, August 16, 2009 11:34 PM | Feedback (1)
Employing the Domain Model Pattern

Udi Dahan has yet another good read in MSDN Magazine, where he talks about the domain model pattern.  I particularly like a couple of things about it.  One is a comment about what the domain model is not: If you had come to me a few years ago and asked me if I ever used the domain model pattern, I would have responded with an absolute "yes." I was sure of my understanding of the pattern. I had supporting technologies that made it work. But, I would have been completely wrong. ….the No. 1 most...

posted @ Sunday, August 02, 2009 8:54 PM | Feedback (1)
Maybe we should talk about Sustainability instead

So, the topic of ‘Maintainability’ has come up again in various forums, sparked by Frans Bouma with his blog post and other comments.  Jeremy ‘counting till 10 till jdn calls me names on the net again’ Miller has this, Ayende has this, Patrick Smacchia has this, Jimmy Bogard has this (okay, maybe this one is slightly off-topic), and I’m sure there are a couple dozen/hundred more that could be listed. I’ve said various things about the topic here, here, here, as well as (sort of) here and here.  Gosh.  That’s a lot of ‘here’ here. A ton of...

posted @ Thursday, July 30, 2009 12:46 AM | Feedback (2)
LINQ to Events

I can’t say that I fully grasp all of this, but it appears that this is the way to do asynchronous programming going forward with .NET 4.0. The IObservable/IObserver interfaces are in .NET framework 4.0.  I want to stress that IObservable is the new asynchronous programming pattern in .NET.  It supplants the Begin/EndInvoke pattern as well as the event-based asynchronous pattern.  Simple run of thumb: if the method is asynchronous, return an IObservable.

posted @ Thursday, July 23, 2009 3:07 PM | Feedback (0)
LINQ to SQL : SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM

This annoying error when calling SubmitChanges() from a LINQ to SQL DataContext can occur if you are using a default value for a DateCreated DateTime column which is NOT NULL, and you add a table to the LINQ to SQL designer.  For whatever reason, it doesn’t pick up that it has a default value, so you need to highlight the column and go to properties, and manually set the ‘Auto Generated Value’ property to ‘True.’

posted @ Friday, July 10, 2009 6:35 PM | Feedback (3)
BDD beginner’s stumbling block

I should probably add that this is a stumbling block that *I’ve* run into, which doesn’t mean anyone else will.  But it is *my* blog, so that should be obvious. I have started to use BDD on a greenfield project because I hate it.  Well, that’s not quite accurate (since it would be pretty dumb if that was the only rationale behind it).  I like a central idea behind it.  Well, I don’t hate it.  Anyway, the central idea is that you can write up specifications that are in more or less straightforward English, and using Machine.Specifications anyway, you...

posted @ Saturday, June 27, 2009 7:41 PM | Feedback (2)
pmk – poor man’s kanban – 1 of N – Preamble

There is a lot of existing literature when it comes to Lean/Kanban/Pull/Whatever.  Before getting into my discussion of pmk, although I believe I did this in a previous post, it is important to once again highlight some of the common links to that material. Lean Software Development This is most obviously associated with the work of Mary and Tom Poppendieck, since I believe they coined the phrase. Their work can be found in greatest detail at their homepage. You can find their books on Amazon by clicking here. The wikipedia article on it can be...

posted @ Sunday, June 07, 2009 11:07 PM | Feedback (0)
Linq to SQL Not Totally Dead, but it’s not at all well

Jim Wooley has a post that makes what I think is a really good analogy: Linq to SQL is to Entity Framework as Winforms is to WPF. That is to say, Microsoft isn’t pulling either Linq to SQL or Winforms from the framework, but isn’t really adding new features to them, just making bug fixes. Makes sense to me.

posted @ Thursday, June 04, 2009 6:09 PM | Feedback (0)
Linq to SQL Not Totally Dead

Though Microsoft has made it clear that EF is their preferred ORM type thingy of choice, Linq to SQL is still getting updated in .NET 4.0.  List of changes can be found here.

posted @ Tuesday, June 02, 2009 6:20 PM | Feedback (2)
Continuing Slide toward the Dark Side

I just created a new Visual Studio solution and created within an empty class project called “Domain.” I then created a new test class project and called it “DomainSpecs” instead of the previously expected “DomainTests.” Oh, how I hate underscores. I will *not*, however, embed As a/I want/So that or Given/When/Then syntax into code.  I have my standards.

posted @ Wednesday, May 27, 2009 7:10 PM | Feedback (11)
Self-Promotion Weasels

Channeling my inner Bellware on this one. Blog posts can be set up to be kicked or dugged when readers of those posts think they are worthy of it.  Within the .NET world, there are sites like DotNetKicks and DotNetShoutout that exist for similar purposes.  The general idea is that you can use these sites to find posts that are deemed to be especially important by the community at large.  A nice enough idea, I guess, won’t really argue against it now. But the idea is subverted by people who decide to abuse the system.  This can be...

posted @ Wednesday, May 06, 2009 7:27 PM | Feedback (3)
Enough with the ‘Sprocs are evil’ BS m’key?

Derik has posted one of those ‘Sprocs are evil’ type rants (he did label it as a rant, so I have to give him props for that).  Probably unrelatedly, Jeremy Miller posted something that is sort of related (though his point was really a larger one).  Regardless, I have to respond. (Update: I mean responding in general, not line by line discussion of either Derik's or Jeremy's posts...more of a rant using them as a launching pad).  (Update #2: Derik wants to make it clear that he doesn't think sprocs are evil.  I think it is a semantic point, but...

posted @ Monday, March 02, 2009 1:14 AM | Feedback (7)
DDD-Lite: Unit-testing Constructors

update: updated the first test so that the constructor is doing something, since that was kind of the point. When I was first learning about TDD, the guy I knew who was actually practicing it unit tested his object constructors.  Obviously, it was a different domain, but I vaguely recall that it looked something like this: [TestMethod]         public void can_create_an_item()         {             Item i = new Item(“Name”);             i.ShouldNotBeNull();             i.Name.ShouldEqual("Name");     } ...

posted @ Tuesday, December 16, 2008 7:18 PM | Feedback (3)
No Best Practices

This isn’t a new post, but it makes a lot of points that are relevant today.  This week, I particularly like this one: “Go ahead and follow your favorite practices. Just don’t preach that the rest of us must follow them, too. Keep your process standards to yourself. If you want to make a suggestion, make one that takes context into account.”

posted @ Sunday, December 07, 2008 7:52 PM | Feedback (1)
DDD-Lite and Data Access: One way of doing it

I’m not sure who came up with the term ‘DDD-lite’ or if it even makes sense to ask the question, but I *think* I first saw it being used by Colin Jack.  In any event, I’m going to describe what I mean by it, and how I’m using it in a way that I find comfortable along with a certain way of doing data access. As I’m using it in this post (I don’t think there is an official definition), ‘DDD-lite’ refers to the use of certain patterns within your code.  Full blown DDD requires an extensive collaboration between business users...

posted @ Tuesday, November 25, 2008 9:14 PM | Feedback (5)
Choose a path, stick with it

So, I’m finally done spiking something, and ready to start on a major new project.  I’ve read 40+ blog posts and technical articles a day for the last 3 months, I’ve looked at nearly all the various alternatives that made sense to me, and I think I’m ready to go. I’m not going to do strict DDD (since it is impossible here), TDD (since it is misguided here) or BDD (since I really can’t stand it and as the main business user and developer, I can’t do it ‘correctly’ anyway, if there was such a thing as doing BDD...

posted @ Saturday, November 15, 2008 7:13 PM | Feedback (2)
The ‘end’ of Linq to SQL

You can read the details here.  They don’t explicitly say that it is dead, but, basically, it is. From a product placement perspective, this makes a lot of sense (then again, I’m hopped up on cold medicine, so judgment might be sketchy right now).  From a developer perspective, this kind of sucks.  I have a major project that uses it, so it is rather annoying.  Since I have my entity layer sit on top of my Linq to SQL data layer (which frankly everyone should have been doing anyway already), it’s an easier path for me to migrate to...

posted @ Friday, October 31, 2008 7:01 PM | Feedback (0)
DDD Mysticism

Two recent blogs (well, within the last month or two anyway) about DDD have sparked this one.  The first is from Jimmy Bogard, the second from Casey Charlton. Apparently I need to mention this, but both of these guys are smart dudes.  The fact that I’m reacting against what they are saying doesn’t mean I don’t think they are smart dudes.  That should go without saying, but some people seem to think this is comment worthy. Since Casey’s blog was first, let’s start with that, where he talks about ‘The Tao of Domain Driven Design.’  As I’ve mentioned...

posted @ Sunday, October 26, 2008 8:27 PM | Feedback (5)
Jeff Hostetler is a Super Bowl Winning QB, Dan Marino is Not

This is another brief, bad analogy (though I think I might leave it unexplained to start, for the hell of it).  If you don’t ‘grok’ the NFL, this won’t necessarily be totally clear.  Even if you do, this won’t necessarily be totally clear.  But you knew that. The goal of any professional football player is to win the Super Bowl (no, not that football, the World Cup is for soccer), and for various silly reasons, the careers of professional athletes are sometimes judged due to whether or not they have at some point won the championship of their sport...

posted @ Tuesday, October 21, 2008 6:53 PM | Feedback (0)
Setting up for TFS Installation on Windows Server 2005/2008

Again, I keep forgetting this, so this post. You need to create/extend a site within SharePoint/WSS to install TFS.  But, you have to do more than create/extend a site.  You also have to create a site collection on that site after you create/extend it, otherwise, you will end up with 404 errors when running the TFS installation wizard.

posted @ Monday, October 06, 2008 7:11 PM | Feedback (0)

Roy Osherove has been posting a bit about testing, OOP, TDD, and the like.  You can go to his post and find tons of comments, links and so forth.  Because of all the different interpretations people have put forth, it’s hard to summarize the discussion without prejudicing it. But what the hell, it’s my blog, so here’s a thumbnail sketch:  the adoption of unit testing is hindered by it being tied to TDD, design considerations, and confusing terminology (“a mock?  a mock what?”).  A very good post by Udi Dahan takes a pragmatic stance about the whole...

posted @ Wednesday, October 01, 2008 8:26 PM | Feedback (17)
Persistence Ignorance (POCO) Adapter for Entity Framework I've only just read through the blog post describing it, so I can't say that I've used it, but it is of some interest, as it is designed to provide: - Change tracking (snapshot-based and proxy-based when possible) - Transparent lazy loading - Immutable Value Objects - Queries (LINQ and Entity SQL) - Shadow state (maintaining certain persistence-related fields outside of entity class) I don't think in the long run it will be satisfactory enough by itself to make people switch from NHibernate (in a...

posted @ Tuesday, September 09, 2008 3:50 PM | Feedback (0)
Chicago ALT.NET September 2008 Meeting

Register here. Wednesday, September 10, 2008 from 06:00 PM - 08:30 PM (CT) Inversion of Control for the masses 6:00 pm Pizza and networking time 6:30 pm John Nuechterlein (a.k.a. jdn) puts Inversion of Control (IoC) containers under the spotlight. If you have been noticing the increasing buzz around this technology but never had a chance to see what it is and how it can be used, this is your chance to see: An overview of what IoC is, using StructureMap as the example...

posted @ Wednesday, August 27, 2008 6:31 PM | Feedback (2)
Signs You Might Be Working For A Client That Isn't On The Cutting Edge #2 in a series

You ask them if you can use NHibernate or some other popular and/or well-tested and used ORM within the .NET space, and they tell you "It isn't a good idea to use an ORM because they produce overhead." What?

posted @ Tuesday, July 29, 2008 11:33 PM | Feedback (1)
LINQ to SQL Hack Solution to Changing LoadOptions

I keep forgetting where this link is, so saving it.  

posted @ Tuesday, July 01, 2008 2:16 PM | Feedback (0)
Could not load type XXXX from custom assembly

There are many different things that can cause this, but here's one. If you have an older version of a DLL in GAC, then any running code will apparently look there first, even if you have an updated version in the bin folder of your application (I could have sworn it was the other way around, but apparently not). So, get rid of the old version from the GAC, make sure your reference copies the DLL local, and that should take care of it. Again, just one solution out of many.

posted @ Tuesday, July 01, 2008 11:36 AM | Feedback (0)
ADO.NET Entity Framework Vote of No Confidence

So, a number of people have written (and/or added their names to the list of signatures agreeing with it) to a petition/statement/WhatEverYouWantToCallIt calling out the (real and/or perceived) flaws with the forthcoming (when?  Who knows, but since I believe SQL Server 2008 requires its final release, at that time) Entity Framework coming out of Redmond. I first noticed it when Dave Laribee posted about its existence on the mailing list where he briefly mentioned its contents and added: "I'd encourage you all to sign if (and only if) this is something you agree with and please spread the word."...

posted @ Tuesday, June 24, 2008 9:17 PM | Feedback (2)
Alt.NET Seattle, Friday, April 18th, Day 1 of 3, Pre-Meeting Events

Looking at Jeremy Miller's blog entry, it reminded me that I haven't gotten to this yet.  So, here's the first stab at it.  I'm unlikely to remember everything, but whatever.  I will probably have a separate post to talk about what I took away from the event, how it did or didn't change what I think about Alt.NET, blah blah blah, but I'm already late on all of this, so here we go. I arrived at the train station in Seattle around noon local time.  My sister and her husband live in Seattle, so I was staying with them.  I...

posted @ Thursday, May 22, 2008 7:37 PM | Feedback (0)
Return from Alt.NET Seattle

4 days on a train (2 each way) and 3 days in Seattle.  And back to work in a few hours.  Sounds about right. I'll have more detailed stuff to say about the conference in some follow-up posts.  It was a good time.  Good to put some faces to the names I've learned over the last year or two.  There were some good discussions overall. I can't say that I had any 'epiphany' type moments.  In some cases, I think I confirmed some of my more 'contrarian' opinions about practices, in others, I think I confirmed that...

posted @ Wednesday, April 23, 2008 12:37 AM | Feedback (0)
ALT.NET Open Spaces Seattle Conference

I'm leaving tomorrow for the aforementioned conference.  I'm looking forward to it.  I'm hoping to learn quite a bit, as well as put some faces (and voices) to the names that have become somewhat familiar to me by now. Why am I leaving tomorrow?  Well, I was originally going to fly out of O'Hare on American, but last week, when it still wasn't clear how long the cancellations would last, I worried about having last minute problems with my flight.  And I also started thinking about a project that has been lingering in semi-complete state for, well, arguably years. ...

posted @ Tuesday, April 15, 2008 6:40 PM | Feedback (3)
Why I'm Skeptical about Mocks and Testing

Last week after the Microsoft Launch Event in Chicago (for the 2008 'wave' being in this case Windows Server 2008, SQL Server 2008, and Visual Studio 2008), there was another get together of the Chicagoland Alt.NET group (there isn't a web site yet but that is forthcoming) where we discussed all sorts of things, as well as planning out the initial stages of a Code Camp in the fall (more details forthcoming). Somewhere in there, I was able to formulate in pretty brief terms a description of why I am skeptical of mocks and testing.  It was not a...

posted @ Sunday, March 16, 2008 9:31 PM | Feedback (7)
Best Practices or Personal Preference?

Over at CodeBetter, Jeremy Miller has started a new series of posts about software development, and determining what is good: " What is best?  How do we decide what is best?  Is there a constant set of basic criteria that we can use to judge software techniques through time?  I say yes." In the comments, I made a comment about 'Separation of Concerns' and that I believed that much of what is called 'Best Practices' is 'just' (more on this qualifier in a second) personal preference, and I'd like to expound on that here with a couple of my patently bad analogies. 1)  Database...

posted @ Tuesday, February 05, 2008 10:56 AM | Feedback (2)
Are these questions every .NET developer should be able to answer?

Eric Wise has a post where he lists questions that he thinks every .NET developer should be able to answer (or more accurately, that every senior level .NET developer should be able to answer).  This got me to thinking because I'm not sure I agree. But let me step back and explain why.  One obvious reason would be that I don't think I could answer all of them off the top of my head, which of course probably simply indicates that I am not a senior level .NET developer.  And yet, there is more to it than that. ...

posted @ Tuesday, January 01, 2008 2:48 AM | Feedback (3)
LINQ to SQL DataContext Show Stopper?

I have to be doing something wrong here. If I have an Address and an AddressType, I find that the AddressType gets re-inserted when I create an Address, set the type, and save: MyDataContext ctx = new MyDataContext(); Address a = new Address(); a.AddressType = AddressType.Get("Billing"); a.City = Chicago; ctx.Addresses.InsertOnSubmit(a); ctx.SubmitChanges(); The 'Get' uses a different context (of course).  In certain more complicated situations (which is where I started at before I spiked this simple example), the SubmitChanges call will fail because it doesn't like that a different context was used to get the AddressType.  You can make the get...

posted @ Saturday, December 08, 2007 9:09 PM | Feedback (2)
A mini review of Hibernating Rhinos - Episode #2

The webcast and code (is there code on this one?  I forget) can be found here. I'm assuming everyone who reads this knows who Ayende is, what MonoRail is, and all that. This is a mini-review, both because it is short, and because the main point (assuming there is a point) isn't really about the webcast at all. Most of my observations are admittedly shallow, but there you go. Ayende's general point is to attempt to show the difference between programming a simple example using WebForms vs. using MonoRail, and why MonoRail is superior. There...

posted @ Wednesday, November 28, 2007 8:53 PM | Feedback (3)
Bad Analogy Time: Alt.NET Ex-Drinkers

Everything is analogous to everything else, just as everything is different from everything else.  So, what I'm going to do is create an analogy, an admittedly bad analogy, to explain something I think about Alt.NET. Have you ever known anyone who has quit drinking (or smoking or eating fast food, etc.) and has 'gotten religion' about it?  To the point that they point to every use of alcohol as abuse?  Alt.NET people tend to be like that. Okay, bad analogy created.  Explanation please. As far as it has a definition, Alt. NET is about attempting to improve software development, usually by taking an...

posted @ Sunday, October 07, 2007 2:04 PM | Feedback (10)
Debugging Local Web Services

From, there are basically two steps: 1) Set up the web service project as one of the Startup Projects (Visual Studio only loads debug symbols for startup projects).  Right-click, Set Startup Projects, Multiple Startup Projects, set start as the action for all startup projects. 2) For the web service, for its start options, select “Don't open a page.  Wait for a request from an external application.”

posted @ Monday, April 02, 2007 10:34 AM | Feedback (0)
.NET: Selecting DropDownList Item by Some Text or Value

myDropDown.SelectedIndex = myDropDown.Items.IndexOf(myDropDown.items.FindByText(Text)) myDropDown.SelectedIndex = myDropDown.Items.IndexOf(myDropDown.items.FindByValue(Value))

posted @ Sunday, February 04, 2007 6:17 AM | Feedback (0)
Collection was modified; enumeration operation may not execute. Why?

You can't modify a collection while iterating over it, so try this instead. Where items is IList<T>, item is an Object T, and you want to remove based on the item's ItemID: if (items != null)             {                 for (int j = items.Count - 1; j >= 0; j--)                 {                     if (items[j].ItemID == item.ItemID)                     {                         items.Remove(items[j]);                     }                 }             }

posted @ Saturday, February 03, 2007 12:50 PM | Feedback (4)
.NET Serialization Basics

posted @ Thursday, December 21, 2006 12:03 PM | Feedback (0)
Escaping a double-quote in C#

From: It's two double quotes in a row: “” or use a slash: \”

posted @ Wednesday, October 25, 2006 2:30 PM | Feedback (2)
C#: My Strongly-Typed DataSet is throwing StrongTypingException exceptions

This typically happens when you create a typed dataset from a database that allows null values. For reasons not clear to me (my normal guess is “user error” but dragging and dropping tables to the DataSet designer does this), the default setting for each column's NullValue is “(Throw Exception)”, so your strongly-typed dataset is doing what you are 'telling' it to do.  (For values that aren't of Data Type System.String, you can't change this, for other reasons not clear to me). For System.String type columns, you can change this NullValue to either be (Empty) or (Null). For other column types, I do 'evil'...

posted @ Wednesday, September 20, 2006 2:01 PM | Feedback (0)
Conditional code for Creating Unit Tests for both VSTS and Nunit

This allows you to create a single class that can be compiled in different projects to use unit tests in either VSTS or Nunit.  From Microsoft's Enterprise Library January 2006: Where NUNIT is a defined constant in your project file. #if !NUNIT using Microsoft.VisualStudio.TestTools.UnitTesting; #else using NUnit.Framework; using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; using TestCleanup = NUnit.Framework.TearDownAttribute; #endif

posted @ Friday, August 25, 2006 10:31 AM | Feedback (0)
Continuous Integration using Visual Studio Team Foundation Server

There is code and an article for setting up Team Foundation Server for Continuous Integration that can be found at MSDN here: Unfortunately, the article was not clearly written, with incorrect syntax for an important command. Install the software as normal, making sure you create the virtual directory underneath the root of the application server for Team Foundation Server (this should be an IIS website called “Team Foundation Server” on port 8080.  If you did something funky, put it in the funky place). The subscription you need to create, however, does NOT follow the syntax of the article.  It should be thus: BisSubscribe.exe /eventtype CheckinEvent /address...

posted @ Monday, August 14, 2006 12:40 AM | Feedback (0)
VSTS stuff

To delete a build type, get latest and then delete within Source Control Explorer. To delete a Team Project, use the tfsdeleteproject command from a command prompt on the Build server. To delete specific builds, use the tfsbuild delete command from a command prompt on the Build server.

posted @ Wednesday, May 24, 2006 10:19 PM | Feedback (0)
.NET: How do I get to the System Colors?

For whatever reason, you can't do System.Drawing.Color.Control or System.Drawing.Color.Default, or whatever.  Instead, you need to do something like System.Drawing.SystemColors.Control.

posted @ Tuesday, December 13, 2005 12:32 PM | Feedback (0)
Could not transform licenses file into a binary resource

This error shows up in Visual Studio from time to time when using third party components with Windows Forms and trying to compile, often with an accompanying qualifier: “could not create type.”  When this happens, delete the existing licenses.licx file.  Then open all of the forms and make a tiny change and then reverse it (so for instance, I change the location of a control by one pixel, and then put it back to its original location). The project should now build.

posted @ Tuesday, December 06, 2005 10:19 AM | Feedback (0)
My TypedDataSet has the wrong identity key values

When working with typed datasets that have parent/child relationships, and using SqlDataAdapters with SqlCommandBuilders to load and update data back to your data source, you may run into foreign key constraint issues. Why?  Well, suppose you are populating a datagrid with your typed dataset.  You add a parent row, and then add a child to that row.  You haven't yet tried to push your updates again.  Since the datagrid isn't connected to the database, it autogenerates the ID values it uses to populate the rows.  When you go to push your updates back to the database, it won't try to publish...

posted @ Thursday, November 17, 2005 3:13 PM | Feedback (0)
.NET: OR mapping tools

Provides a list of what's out there.  Comprehensive and currently up-to-date: Here's another:

posted @ Tuesday, November 01, 2005 9:54 AM | Feedback (0)