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);
Month: May 2012
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…