views:

214

answers:

4

I zipped an ASP.NET MVC Azure project up and copied it to another computer (both have VS 2008). I thought I could just unzip it in "Documents\Visual Studio\Projects", but I can't quite get it working. My site builds, but the browser doesn't see the master page or Site.css. Should moving projects around as Zip files just work?

My real question is, what's the best way for one developer to share an ASP.NET MVC Azure project among 3 different computers? Should I use something like Dropbox or Live Mesh? Or, github maybe?

A: 

I love using git and github. I've shared my code among many computers with it. This was C# with Visual Studio solution files, so it sounds very similar to your situation.

Of course, I love git for source code management. I'd recommend it to anyone, but there's a decent learning curve if you're new to it. I can recommend resources that helped me, since it was really only about 8 months ago that I delved into it for the first time.

If you're not looking to adopt git as your source code management tool, then you might want to look at other options for moving code between machines.

Perhaps your IIS virtual folders are configured differently on the machines? You said it builds, but does not run. This suggests that configuration of the web site itself might differ between the 2 machines (and we're getting into some things I'm not aware of about how ASP MVC works at this point).

Charlie Flowers
Are you using cygwin in windows or simply in linux natively?
Simucal
I'm developing on a mac, and Windows is running in VMWare Fusion. But on one of the servers for a previous client, I used msysgit, and it worked flawlessly for me.
Charlie Flowers
A: 

Yes, moving projects around in a zip should work assuming all of your files are in the subdirectory you zipped up. Sometimes you might add files to your solution that aren't in the subdirectory, and that can cause problems. References to other files need to be relative, instead of absolute.

A problem you might encounter is if both of you edit the same file, or accidentally overwrite an edited file with one from a developers machine that doesn't have that change yet.

Most developers use a source control system to share projects. Git is a fairly new one that has a growing audience. Subversion has been around a little longer and is very popular. Visual Studio integrates with TeamFoundation Server.

ProjectLocker.com offers free subversion hosting(so that you don't have to setup your own subversion repository).

Codeplex.com offers Team Foundation Server hosting for open source projects.

AaronLS
A: 

It sounds like the type of thing you see if the app-root isn't an application, or if the application isn't handling virtual directories correctly.

With virtuals; for example, you should rarely use "/foo/bar" - because if your app isn't installed at the site root you'll get unexpected behaviour - you mean "~/foo/bar", but this often needs extra code, as discussed here.

Marc Gravell
+1  A: 

OP here. The problem was that "Static Content" was not enabled in IIS on the second computer. The latest installation instructions for Azure (March '09 CTP) omit this crucial step. The first computer originally ran the Jan '09 CTP, whose instructions included the step about enabling Static Content. Moving projects around by zipping them up seems to work fine.

Slack
Cheers Bob. Wasted 30 minutes of troubleshooting till I found this post...
grenade