Category Visual Studio

Changing SSMS and Visual Studio Default Project Location

Changing the location of the default projects folder in Visual Studio is super easy to do. Just click the Tools menu, choose Options, and then select the Projects and Solutions tab to change the default projects folder location:

Changing default projects is fun!

Changing default projects is fun!

Sadly, this doesn’t change anything for SSMS. Why? I don’t know.

However, I do know how to change this in SSMS. Well, google told me.

  1. Open up your favorite text editor.
  2. Navigate to My Documents\SQL Server Management Studio\Settings
  3. Open up the .vssettings file in there. On my computer it was CurrentSettings-2009-05-24
  4. Search for the text “ProjectsLocation”
  5. You want to find a section that looks like <PropertyValue name="ProjectsLocation">%vsspv_visualstudio_dir%\Projects</PropertyValue> and go ahead and change the text value of that XML element to whatever you want it to be. (I chose C:\Projects!)
  6. ???
  7. Code

Adding XML Schemas in MonoDevelop on OS X

Let’s say you’re crazy enough to have installed MonoDevelop on OS X. Let’s also postulate that you plan on using NHibernate on OS X to write an ASP.NET MVC app because you are, frankly, far too lazy to boot a virtual machine. Let us further supposed that you want to have sweet sweet XML syntax completion for your NHibernate configuration files.

How do you do such a thing?

Well, first things first you get a hold of the NHibernate source code. Then, you follow Benjamin Day’s excellent instructions on how to get intellisense working for NHibernate XML files in Visual Studio. The important part here is to copy the schema files to /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.XmlEditor/schemas instead of the path he specifies. Mainly because your mac doesn’t have a C: drive… unless you’re weird.

Update I lied, this makes MonoDevelop hang on start. I’m going to see what I can figure out and update later.

Extra Update I went through this process again, and MonoDevelop started up properly and everything worked correctly in my .hbm.xml file. There you have it. It works and I clearly did something silly the first time around.

Meet and Code – Weekend in Review

I spent my weekend in my company’s office. Keep in mind that 1) I’m a consultant and I’m usually at a client and 2) I didn’t get paid. Why would I spend my weekend at work? Meet and Code

What’s the point of Meet and Code? The point is for a bunch of people (developers, DBAs, UI people, PMs, BAs, etc) to get togther and work on a project to learn, build new skills, and do it right the first time. Sometimes, the real world constraints of deadlines and budgets don’t always give us the time to do TDD and to do things properly. So we rush through things and have to test manually. Not at Meet and Code. Instead, we’re doing things using agile practices, TDD, and rapid development techniques so that we can practice the craft that we preach about.

See, a few months ago someone had the crazy idea that we should get together and work on a software project over the weekend. Now, that catch was that we had to recruit other people. So, we recruited other co-workers. Eventually we’re planning on recruiting the rest of you, but bear with me.

After we recruited a team of suckers volunteers, we did a few planning meetings before everything got started and decided on a product to work on (an event RSVP web application so we could manage the next time we do this). We also figured that everything would take about a weekend (Friday 5pm – Sunday 5pm).

Friday was pretty much a wash. There was a TDD and mocking demonstration that was incredibly helpful, especially since I haven’t done TDD in a long time and mocking is just right outside of my area of expertise. Most people didn’t have development environments set up on their computers, there was some confusion about who was responsible for determining what, but things got ironed out by the end of the night. Towards the end of the night, I started working on the database and the UI people were able to get started. I left around 12:30 or so. Things were pretty disorganized, but it was a good start.

We finally got a build server set up early Saturday morning. I kept churning out database code while the business layer was being put together. There was still a bit of confusion, but by the end of the day things were going full steam. People came and went, but that’s what we expected.

The office was pretty humid and smelled distinctly of feet by the end of the night. It didn’t help that the air conditioning is turned off on the weekends.

By Sunday, I was starting to run out of steam. It’s tough to make it through a week of your day job and then run through a development sprint on the weekend, but the fun and learning made it more than worth it.

How did it turn out?

It went well. There were definitely some initial teething problems – development environtments weren’t set up, use cases weren’t fully fleshed out – but we made it through them.

Going forward there are definitely some things that we could do differently to make things run smoother:

  • Install fest – We should have held an early install night where we focus on getting everyone’s development environment prepared. This would prevent problems with service packs installing and getting different versions updated.
  • Training materials/demo – In addition to the install night, having fully built a single feature to demonstrate the ‘proper’ way to use ASP.NET MVC would have been very helpful for everyone.
  • Dedicated user representation – We initially had some BAs present on Friday night, but they had other weekend plans. It was difficult at times to resolve some ambiguity in the use cases or to determine how a feature should really function. If someone else was designated as the user representative, we would have been able to defer to the user rep on all of these issues.

However, despite these teething problems, we had a lot of fun and I definitely think we’ll be repeating this a few more times before we take it completely public with some hints and tips on our methodology for running the event smoothly.

Links for the Week 2008-12-19

SQL Server

Cloud Computing and me – TJay Belt delivers the best look at cloud computing that I’ve read yet.

Some interesting affects of Table Partitioning – Kent Tegels discusses some interest side effects of partitioning tables and indexes.

The N pillars of a well built database? – Louis Davidson is in the process of re-working his book and is thinking out loud about what makes for good database design.

Development

Iron Python 2.0 has been released – Denis Gobo sums up the newest release of the Iron Python language. This is a big thing – dynamic languages have finally arrived on the scene in the .NET Framework.

Disable WiFi with PowerShell – Rob Farley demonstrates PowerShell’s amazing abilities by giving a quick demo of how to disable WiFi through PowerShell.

General

Fractal – Jason Santa Maria is a Graphic Designer with Happy Cog Studios and is an avid photographer. He showcases his work on his blog in the daily photo feature. He always has a fresh take on what is sometimes a very mundane subject.

Breaking the Rules – Jason Cohen gives several examples of people and companies who have broken all of the rules in grand ways and succeeded. His post can be summed up with this gem of a sentence: ‘There’s no rule that can’t be broken, so long as it’s broken with purpose.’

Who needs valid XML?

Team Foundation Server, apparently.

Let’s say that some careless developer (me) forgot to close an XML tag. The aforementioned developer then checked in his build file and attempted to build it.

At this point, I got a bit worried because TFS came back with the following error:

TF42046: The build service used in the build process is not reachable. This error occurs when either the build machine is off-line,the required service is not running, Team Build is not installed on the build machine, Team Build is configured for a different Team Foundation Server or the network is not available.

So, at this point I spent a few minutes attempting to debug this problem. It turns out that this problem can also be caused by silly developers leaving off closing XML tags in their hurry to finish the weekly build script.

Why would Visual Studio throw back this seemingly unhelpful message? Probably because my XML was garbage and TFS simply refused to talk to me on the grounds that I am uncouth and trying to shout the XML equivalent of dirty words at it.

Moral of the story: close your XML tags and don’t hurry.

[edit]
Rick has informed me that I am a horrible developer and forgot to mention his involvement in this whole issue. So, Rick, thanks for helping me troubleshoot this problem. Read his blog, it’s at RickDoes.net. Did you notice that URL? He’s witty, much wittier than I.

Dark Visual Studio

In my attempts to customize Visual Studio 2008, after 6 months of Rails development in e, I came across a couple of links.

John Lam on Vibrant Ink
and
Dark Visual Studio
almost forgot
Scott Hanselman’s slightly more manual instructions

Now, either one of these will attempt to set your layout to the author’s favorite settings which, frankly, are not my favorite settings. Make sure to uncheck at least the following items, if you want your Visual Studio layout to stay the same:

  • Work Item Tracking – View Settings
  • Visual Studio Team Foundation Server
  • General Settings -> Window Layouts
  • General Settings -> Toolbox
  • General Settings -> Menu and Command Bar Customizations

Any other suggestions for keeping as much of your preferred layout around are greatly appreciated.

This site is protected with Urban Giraffe's plugin 'HTML Purified' and Edward Z. Yang's Powered by HTML Purifier. 401 items have been purified.