Visual Studio project sharing problem

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 1269 Views - Last Post: 14 September 2012 - 07:18 AM Rate Topic: -----

#1 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 59
  • View blog
  • Posts: 2,742
  • Joined: 04-August 09

Visual Studio project sharing problem

Posted 02 September 2012 - 12:49 PM

I started working on an xna project with another member here - the first time I've worked on a project with another person - and for a while we sent our copies of the project back and forth without any problems. Now when I download the other person's version of the project, extract it and stick in in my projects folder, as I've always done, I'm getting an error (attached below) every time I debug and hit a break point, and non of the changes I make to the code are affecting anything when I run the project. What is going wrong now, and how do I fix this?

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: Visual Studio project sharing problem

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,357
  • Joined: 02-June 10

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 01:18 PM

"... Or the files were moved between the time when the project was built and the debugging session was started"

That sounds exactly like what you're doing.

Are you downloading just a file from your buddy, or are you copying the entire solution?

Are you using any kind of project management/sharing system? Or just thinking you can copy/replace files when Visual Studio isn't looking and hope it doesn't catch you?
Are you using Visual Studio Team Server?
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3168
  • View blog
  • Posts: 9,581
  • Joined: 05-May 12

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 01:24 PM

You need to rebuild the project clean with your binaries and symbols pointing to your files. In the Solution Explorer, right click on the Solution. Clean Solution. Then right click on the Solution. Rebuild Solution.

If you get errors cleaning or rebuilding, that means that the files you extracted from your friend has changed the permissions of the files. (Some archiving programs move along the file permissions and/or ACLs and not just the file contents.) First thing to try to do is just make sure that the readonly and system attributes are not turned off: 'attrib -r -s' with the appropriate filenames should fix things.

If that still doesn't work, then you may need to take ownership of the files. You'll have to navigate through the Windows Explorer, right click on the file, Properties... Security Advanced... ... and I forget the rest of the steps. Hopefully you don't have to go to this extreme.

In general, when working with somebody else, the best solution is to use a source control system. Look at using Mercurial, Git, Perforce, etc.

Also, it is also better to just exchange source files. I know it's very convenient to just ZIP up the entire directory, but you save on bandwidth, and diskspace if you just have the sources and required files to be able to rebuild the project from scratch.

tlhIn`toq mentioned Team Server. That is another option. VS2010 Express may not have the integration support for Team Server, (you need at least VS2010 Pro as I recall), but you can always use the command line to run the commands.
Was This Post Helpful? 1
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1001
  • View blog
  • Posts: 3,555
  • Joined: 05-June 09

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 01:36 PM

View PostSkydiver, on 02 September 2012 - 09:24 PM, said:

tlhIn`toq mentioned Team Server. That is another option. VS2010 Express may not have the integration support for Team Server, (you need at least VS2010 Pro as I recall), but you can always use the command line to run the commands.

or Visual Studio Team Explorer :)
Was This Post Helpful? 0
  • +
  • -

#5 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 59
  • View blog
  • Posts: 2,742
  • Joined: 04-August 09

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 01:43 PM

Ok, its working now. Rebuilding the solution worked. I'd been trying to basically do that I was just hitting 'build' up in the debugging options not the 'rebuild' option. What is the exact difference between these two anyway?
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3168
  • View blog
  • Posts: 9,581
  • Joined: 05-May 12

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 02:08 PM

Build looks at time stamps on files. Rebuild forces it to ignore timestamps, but it isn't foolproof specially if you have custom build events. That is why I usually recommend Clean and then Rebuild.
Was This Post Helpful? 0
  • +
  • -

#7 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 59
  • View blog
  • Posts: 2,742
  • Joined: 04-August 09

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 02:20 PM

Oh ok. Also, I'm not seeing 'Clean Solution' option where you said, or anywhere, and I just went through all the menus. Never at any point using visual studio have I seen that. I'm just using the express version, you sure its there?
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3168
  • View blog
  • Posts: 9,581
  • Joined: 05-May 12

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 02:48 PM

Maybe Clean Solution is only on Pro and up, but I doubt it.
Attached ImageAttached Image

(Ignore the Rocket Ship menu item. That's from TestDriven.NET.)
Was This Post Helpful? 0
  • +
  • -

#9 .Aaron  Icon User is offline

  • Rock, paper, scissors, lizard, Spock
  • member icon

Reputation: 59
  • View blog
  • Posts: 2,742
  • Joined: 04-August 09

Re: Visual Studio project sharing problem

Posted 02 September 2012 - 03:13 PM

That explains why I've never seen it. I don't have a Build drop down section up there with file/edit/view/project in mine. And I don't get the same stuff when right clicking on the solution aside from the build and rebuild.

This post has been edited by .Aaron: 02 September 2012 - 03:21 PM

Was This Post Helpful? 0
  • +
  • -

#10 Curtis Rutland  Icon User is online

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 4311
  • View blog
  • Posts: 7,467
  • Joined: 08-June 10

Re: Visual Studio project sharing problem

Posted 04 September 2012 - 08:03 AM

You won't see all the same options. For one, he's using a full version of VS, not Express. He's also got at least one add-on. And it's a C++ project, which might have different options to begin with.
Was This Post Helpful? 0
  • +
  • -

#11 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3168
  • View blog
  • Posts: 9,581
  • Joined: 05-May 12

Re: Visual Studio project sharing problem

Posted 04 September 2012 - 10:06 AM

I was jumping between my C# test code and C++ test code. Sorry. C# also has the Clean option available. As Curtis pointed out, though, it maybe a result of my running with VS Pro and higher. I've got one machine with Ultimate and another machine with Pro. The TestDriven.NET plugin doesn't provide the Clean option, it's native to VS.
Was This Post Helpful? 0
  • +
  • -

#12 Curtis Rutland  Icon User is online

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 4311
  • View blog
  • Posts: 7,467
  • Joined: 08-June 10

Re: Visual Studio project sharing problem

Posted 04 September 2012 - 10:21 AM

I was just making the point to not expect to see all the same options when looking at other people's screenshots, because there are many things that would cause them to be different in otherwise similar situations.
Was This Post Helpful? 0
  • +
  • -

#13 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3168
  • View blog
  • Posts: 9,581
  • Joined: 05-May 12

Re: Visual Studio project sharing problem

Posted 04 September 2012 - 12:01 PM

Yup, like the splash screen option. :)

This post has been edited by Skydiver: 04 September 2012 - 12:03 PM

Was This Post Helpful? 0
  • +
  • -

#14 aresh  Icon User is offline

  • It's a 16-Bit World!
  • member icon

Reputation: 273
  • View blog
  • Posts: 4,089
  • Joined: 08-January 12

Re: Visual Studio project sharing problem

Posted 14 September 2012 - 02:26 AM

Sorry for necro-ing this thread, but is this "Visual Studio Team Explorer" any good for sharing the project?
Was This Post Helpful? 0
  • +
  • -

#15 Curtis Rutland  Icon User is online

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 4311
  • View blog
  • Posts: 7,467
  • Joined: 08-June 10

Re: Visual Studio project sharing problem

Posted 14 September 2012 - 07:13 AM

Team Explorer is a client for Team Foundation Server, which is a source control system. If you have TFS, then yes, Team Explorer will help you with sharing projects (though you don't need the separate client, VS has source control bindings built right in).

But not everyone can afford TFS. For smaller developer groups, I suggest the free alternatives, like github, bitbucket, codeplex, or sourceforge.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2