Web deployment task failed. (The type initializer for ‘Microsoft.Web.Deployment.DeploymentManager’ threw an exception.)

Okay, so I hit this problem and none of these answers worked for me. I boiled it down to a single line of code, namely: var deploymentOptions = new Microsoft.Web.Deployment.DeploymentBaseOptions(); If you don’t manually pass this to DeploymentManager it will internally instantiate this object. Even more interesting was that this code would run fine for … Read more

How to package & deploy Node.js + express web application?

Deploying Node.js applications is very easy stuff. In maven, there is pom.xml. Related concept in Node.js is package.json. You can state your dependencies on package.json. You can also do environmental setup on package.json. For example, in dev environment you can say that I want to run unit tests. but in production; I want to skip … Read more

allowDefinition=’MachineToApplication’ error when publishing from VS2010 (but only after a previous build)

i had the same problem with my MVC apps. it was frustrating because i still wanted my views to be checked, so i didn’t want to turn off MvcBuildViews luckily i came across a post which gave me the answer. keep the MvcBuildViews as true, then you can add the following line underneath in your … Read more

How do you include additional files using VS2010 web deployment packages?

Great question. I just posted a very detailed blog entry about this at Web Deployment Tool (MSDeploy) : Build Package including extra files or excluding specific files. Here is the synopsis. After including files, I show how to exclude files as well. Including Extra Files Including extra files into the package is a bit harder … Read more

How can I update the parent’s state in React?

For child-parent communication you should pass a function setting the state from parent to child, like this class Parent extends React.Component { constructor(props) { super(props) this.handler = this.handler.bind(this) } handler() { this.setState({ someVar: ‘some value’ }) } render() { return <Child handler = {this.handler} /> } } class Child extends React.Component { render() { return … Read more