locked
ASP MVC Solution projects and 3rd party dll's missing from TFS new branch download. RRS feed

  • Question

  • User93267240 posted

    This is a product of poor design and improper use of TFS but I have started on a new project with big problems. A little background first. This is an ASP .NET MVC 3 EntityFramework multiple project application. Now, when development first began several years ago the application had a production branch of TFS source control and no other branches. Two programmers started and worked on creating this application. Now, as each did work they would download directly from the production branch and check-in directly into the production branch. This went on until two weeks before I started work on the application.

    Three weeks ago a three separate named user branch tree, named for each developer, was created off of the production branch for each new developer to work on so now Checkout/Check-in is no longer directly off of the production branch. What we have is a main production branch as the root and three sub branches right off of the production branch. What a mess!

    Now to the problem we are currently having. When they downloaded source control application code from the production branch to each person's named branch all of the asp project and third party dll's are gone along with the bin and bin/debug directories. Each of the new branches won't build their projects and the main Web project won't build.  What I have done is pulled all of the asp project and third party dll's into my branch from production created a working branch. Than I checked my branch back into MY named branch of source control. Now, after doing this another developer has downloaded the new updated, MY named branch, branch to their machine and again the bin and bin\debug directories and all of the dll's are missing. Based on my confusing description of the problem can someone provide guidance on how we can fix this problem?

    Friday, May 25, 2018 12:38 AM

Answers

  • User1120430333 posted

    Well, you have a misusage of TFS here. There should be no bin or bin/debug full of DLL(s) even being checked into TFS, which should be controlled by Nuget and package management with a package folder with the packages used by the solution checked into TFS. Then upon the build of the solution, Nuget would restore the packages to the Bin folder on the developer  machine's hard drive. 

    The link also talks about how to handle 3rd party DLL(s) under the control of TFS.

    https://www.benday.com/2012/12/07/tfs2012-how-to-deal-with-binary-dependencies-in-source-control/

    You need to start doing things right at this time,  or you are just going to face the same problems again.

    And this thing about 3 branches one named for each developer is very questionable to say the least about it. The branch should be  based on code versions released into production with a new branch that all developers used based off of the base code released into production and not some branch based on some developer's version.   If a developer needs to work on a previous branch, then a workspace is created on the developer's machine,  and the code is worked on and checked back into the branch and prorogated to the current branch if need be.  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 25, 2018 4:13 AM

All replies

  • User409696431 posted

    This is not a Web Forms question, so it should not be in this section.   If it were an MVC question, it should be in the MVC section.  But it's really a TFS question, which belongs in a TFS forum, which was a completely separate forum area.  The original TFS forum area is closed, but from the notice:

    "Report a problem with TFS itself on Developer Community, provide a suggestion on UserVoice, get advice on Stack Overflow, and get support on TFS Support."

    I suspect a post on StackOverflow (with a tfs tag) will get you the best results, if no one here jumps in to try and help.

    Friday, May 25, 2018 3:46 AM
  • User1120430333 posted

    Well, you have a misusage of TFS here. There should be no bin or bin/debug full of DLL(s) even being checked into TFS, which should be controlled by Nuget and package management with a package folder with the packages used by the solution checked into TFS. Then upon the build of the solution, Nuget would restore the packages to the Bin folder on the developer  machine's hard drive. 

    The link also talks about how to handle 3rd party DLL(s) under the control of TFS.

    https://www.benday.com/2012/12/07/tfs2012-how-to-deal-with-binary-dependencies-in-source-control/

    You need to start doing things right at this time,  or you are just going to face the same problems again.

    And this thing about 3 branches one named for each developer is very questionable to say the least about it. The branch should be  based on code versions released into production with a new branch that all developers used based off of the base code released into production and not some branch based on some developer's version.   If a developer needs to work on a previous branch, then a workspace is created on the developer's machine,  and the code is worked on and checked back into the branch and prorogated to the current branch if need be.  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 25, 2018 4:13 AM
  • User93267240 posted

    I did mark your answer correct because I created the project folder suggestion. I thought about trying Nuget like you suggested but because the application is on an intranet I don't think Nuget is possible. Do you agree? 

    Saturday, May 26, 2018 12:14 AM
  • User1120430333 posted

    I did mark your answer correct because I created the project folder suggestion. I thought about trying Nuget like you suggested but because the application is on an intranet I don't think Nuget is possible. Do you agree? 

    No I don't agree, becuase I use TFS Express at home with TFS  server on the desktop computer, a laptop computer is on the LAN too with both machines using VS 2017 Community and Nuget has no problems keeping the packages folder up to date. Any new packages added to the solution by Nuget, then the package folder is updated with a new package that should be checked-in. When another developer does a Getlates on the solution bringing the solution down to their workspace and the build is done, VS and Nuget work in concert to get things up to date and current on the developer's machine. At least that what happens on my LAN.

    There is also the Nuget server that I have seen used in companies.

     https://www.hanselman.com/blog/HowToHostYourOwnNuGetServerAndPackageFeed.aspx

    Saturday, May 26, 2018 3:26 AM
  • User93267240 posted

    I read the link to the article you sent but I wanted to inform you that none of the computers on my intranet have access to the internet. It is a totally closed network. How would nuget be installed and updated in this case? 

    Saturday, May 26, 2018 1:32 PM
  • User1120430333 posted

    I read the link to the article you sent but I wanted to inform you that none of the computers on my intranet have access to the internet. It is a totally closed network. How would nuget be installed and updated in this case? 

    It is just an example of what you could do.

    If all of the non 3rd party DLL(s) in your solution were installed by Nuget through Visual Studio, then Nuget and VS would work perfectly fine in keeping things in sync between developer machines.

    Saturday, May 26, 2018 2:00 PM
  • User1120430333 posted

    The below is the content of the packages.config in each project where Nuget has been used to install all packages that the project needs. As packages are installed/uninstalled in the project, Nuget updates the packages.config , and Nuget and VS work in concert to keep the development machine for the Bin folder up to date with the correct packages in the Bin folder on the hard drive for the project. Of course, the packages.config is part of the project that is checked into TFS. 

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="Antlr" version="3.4.1.9004" targetFramework="net461" />
      <package id="bootstrap" version="3.0.0" targetFramework="net461" />
      <package id="EntityFramework" version="6.1.3" targetFramework="net461" />
      <package id="jQuery" version="1.10.2" targetFramework="net461" />
      <package id="jQuery.Validation" version="1.11.1" targetFramework="net461" />
      <package id="log4net" version="2.0.8" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.0.6" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.Web" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.WindowsServer" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net461" />
      <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net461" />
      <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net461" />
      <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net461" />
      <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.7" targetFramework="net461" />
      <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net461" />
      <package id="Microsoft.Net.Compilers" version="2.1.0" targetFramework="net461" developmentDependency="true" />
      <package id="Microsoft.Owin" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
      <package id="Modernizr" version="2.6.2" targetFramework="net461" />
      <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" />
      <package id="Owin" version="1.0" targetFramework="net461" />
      <package id="Respond" version="1.2.0" targetFramework="net461" />
      <package id="WebGrease" version="1.5.2" targetFramework="net461" />
    </packages>

    Sunday, May 27, 2018 7:39 PM