Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Wednesday, 2 November 2011

Running deployment package with 'IIS Web Application Name' as parameter

It doesn’t work in VS2010 sp1…

But there’s a hotfix: http://support.microsoft.com/kb/2537134. (I went for solution 3)

Now I can run the deployment package manually as:

Or you can skip the -setParam:name='IIS Web Application Name' part by editing project settings for the current configuration:

2011-11-02_1137

Monday, 24 October 2011

NLog and config transform

To make config transforms work with NLog you need to modify the config transform file slightly.
Edit the configuration in the transform file:

Now you can transform the nlog section in your config file like this:

Thursday, 6 October 2011

Notes on upgrading MVC 2 to MVC 3

Finally found the time to upgrade a customers MVC 2 project to MVC 3 (something has always been more important).
There are a great tool for upgrading an MVC 2 project. More info found here: http://blogs.msdn.com/b/marcinon/archive/2011/01/13/mvc-3-project-upgrade-tool.aspx.
So far so good. But ReSharper (5.1.3000.12) started to give me a lot of errors in my views. First there was “Cannot resolve symbol Html/Url” etc. That problem was solved by deleting the cache files (xxx.Resharper.user). But then it started given my errors on
   1: <%=Html.LabelFor(m => m.xxx) %>
saying System.Core should be referenced. This was solved by adding

   1: <Reference Include="System.Core">
   2:   <Private>True</Private>
   3: </Reference>
in the csproj-file.
Now everything seems alright…

Tuesday, 14 June 2011

TFS: Check in changes to another branch

Sometimes you start working on some changes just to later realize that you have to interrupt your current work for other things. Then you all say: "That's what shelving is for!" then I say "yes, but sometimes you feel it would be better to make a branch with those changes instead. That works. Just create a branch (from a label or whatever) then shelve your pending changes and then unshelve your changes to that branch with TFS Power Tools:

C:\TFS>tfpt unshelve [shelve name] /migrate /target:$/Some/Path/To/Name-branch-NewFeatures /source:$/Some/Path/To/Name

Monday, 13 June 2011

Web deploy from Visual Studio 2010

Saw a presentation (movie clip) where a person deployed to a remote IIS from VS2010 via Publish. It looked very sweet.
Web Deploy

The problem is, you have to do some (or a lot) configuration in IIS to allow this. All information is found in this blog post http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx