admin管理员组

文章数量:1431772

We’re having an issue with Visual Studio 2013, TFS, and _references.js file.

There are 3 of us on the development team. We all have the following installed on our development laptops:

  • Visual Studio 2013 Premium with Update 2
  • Productivity Power Tools 2013 v12.0.30519.1
  • Web Essentials 2013 for Update 2 v2.2
  • Plus a couple other extensions, such as SideWaffle Template Pack.

Our solution consists of an ASP.NET MVC project plus a couple other class library projects, and everything is checked into TFS.

The problem we’re having is that the _references.js file gets automatically checked out when simply opening the solution and projects, even though no explicit changes were made to anything. Then when one of the team members has the _references.js file checked out and the other team members just want to open the solution and projects, VS tries to checkout _references.js but can’t because it’s already checked out. VS then throws up an endless number of message boxes with an error about not being able to check out the file. The only way around it is to kill the VS process, make the person with the file checked out check it in, and then all team members can continue with their work.

We can’t figure out why this is happen, and how to fix it. Is it a VS 2013 thing? Is there some setting to stop VS from automatically checking it out? Is it a Web Essentials issue? Basically, how can we stop this behavior since there will be client-side development time when one person needs to have that file checked out and this can’t prevent the other team members from working.

Thanks!

We’re having an issue with Visual Studio 2013, TFS, and _references.js file.

There are 3 of us on the development team. We all have the following installed on our development laptops:

  • Visual Studio 2013 Premium with Update 2
  • Productivity Power Tools 2013 v12.0.30519.1
  • Web Essentials 2013 for Update 2 v2.2
  • Plus a couple other extensions, such as SideWaffle Template Pack.

Our solution consists of an ASP.NET MVC project plus a couple other class library projects, and everything is checked into TFS.

The problem we’re having is that the _references.js file gets automatically checked out when simply opening the solution and projects, even though no explicit changes were made to anything. Then when one of the team members has the _references.js file checked out and the other team members just want to open the solution and projects, VS tries to checkout _references.js but can’t because it’s already checked out. VS then throws up an endless number of message boxes with an error about not being able to check out the file. The only way around it is to kill the VS process, make the person with the file checked out check it in, and then all team members can continue with their work.

We can’t figure out why this is happen, and how to fix it. Is it a VS 2013 thing? Is there some setting to stop VS from automatically checking it out? Is it a Web Essentials issue? Basically, how can we stop this behavior since there will be client-side development time when one person needs to have that file checked out and this can’t prevent the other team members from working.

Thanks!

Share Improve this question asked Aug 4, 2014 at 14:36 lmttaglmttag 2,4994 gold badges26 silver badges30 bronze badges 4
  • Have you upgraded this project from a previous version of TFS? Are you using local or server workspaces? – Wouter de Kort Commented Aug 4, 2014 at 14:53
  • 1 Maybe turn off autosync? <autosync enabled="false" /> (blogs.msdn./b/webdev/archive/2013/09/30/…) – Ilya Luzyanin Commented Aug 4, 2014 at 14:53
  • Thanks Wouter. To answer your questions, no, we didn't upgrade this project from a previous version of TFS. It's a new TFS repository and a new solution, with new projects. And, we're using local workspaces. – lmttag Commented Aug 4, 2014 at 21:17
  • Thanks for the reply Ilya. We turned off autosync as you suggested, and this works for us. At some point later, we might want/need autosync on (who knows???), but, for now, keeping it off is good enough. If you want to answer the question, I can accept it. Thanks again! – lmttag Commented Aug 4, 2014 at 21:20
Add a ment  | 

1 Answer 1

Reset to default 8

My team was having the same problem, _references.js was being checked out every time the solution was opened, for no apparent reason. And therefore it always appeared in the Pending Changes window. I fixed it by disabling autosync as mentioned by @IlyaLuzyanin.

i.e. In Solution Explorer, right-click on the _references.js file, and uncheck the "Auto-sync Javascript References" item.

Alternatively if you can't see this menu-item (as mentioned in many other threads), open _references.js and change this:

/// <autosync enabled="true" />

to:

/// <autosync enabled="false" />

and then check it in.

本文标签: javascriptProblems with Visual Studio 2013TFSand referencesjs fileStack Overflow