Creating a Generic Type at Runtime

I have a type (at runtime), I want to use it with an IOC container (in this case StructureMap) to find a generic implementation using this type. How do I do that? It’s simpler than you’d think: Type genericType = typeof (AbstractValidator); Type type = genericType.MakeGenericType(bindingContext.ModelType); //Structure Map container var instance = _container.GetInstance(type);

In Code

Deploying with MsDeploy Outside of Visual Studio

Building the msdeploy package with MSBuild. This requires MsDeploy to be installed on the build machine. MSBUILD /T:Package /P:Configuration=QA;PackageLocation=”C:\Build\Artifacts\eserve\DEV\QA\QA.zip” Deploying the package with MsDeploy to a web site How to get the msdeploy command. -source:package=’C:BuildArtifactseserveDEVQAQA.zip’ -dest:auto,ComputerName=’https://eserve-dev.sacda.org:8172/MsDeploy.axd?site=eserve-dev’,UserName=’conwayc’,Password=’austin_1′,IncludeAcls=’False’,AuthType=’Basic’ -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted -retryAttempts=2 Copying the package with ROBOCOPY Copying the package to another folder with robocopy… Continue reading Deploying with MsDeploy Outside of Visual Studio

In Code

2 minutes on Migrating Data

I had a great talk with my friend Dave today. He’s a Data Scientist. He knows his stuff, for sure. We talked about a number of things, but one that really stuck out was data migration. He says never to migrate via code, use a tool. You are reinventing the wheel. You are locked into… Continue reading 2 minutes on Migrating Data