Web Project pdb files - VS always want to add to sourcesafe

I had posted about a problem in beta 2 where the output from a web project (dlls and pdbs) always were showing up as a new file to add to source safe in the pending check-ins.  Someone replied and said it was a beta 2 bug and would be fixed in the release version.  I have since installed the RC and the problem with the dlls has been fixed put the pdbs are still showing up as needing to be added.  Is there something I need to configure to make this go away or is it intended to be this way

Thanks,
Rod



Answer this question

Web Project pdb files - VS always want to add to sourcesafe

  • David So

    I've had the same thing.

    However, the problem was solved by using Alin Constantine's posts from 12/12/2005 and 13/12/2005.

    a reference to my blog on the matter: http://www.kenegozi.com/blog/VS2005AddingWebProjectsPdbFilesToVSSWhyIsThatAndHowToFixIt.aspx

    I'll advise another approach of adding the solution to vss, as described here: http://www.lnbogen.com/DOsAndDONTsAddingASolutionToVSS.aspx and here: http://www.avocadosoftware.com/csblogs/dredge/archive/2005/02/09/VSNET_VSS_AddToVSS.aspx

    Ken.


  • anonymoosee

    Alin,

    This sounds like the problem I am having.

    Unfortunately I am having difficulty in following the workaround. Is it documented anywhere, perhaps in a KB article

    If so, could you provide a link to it

    Many thanks,
    Jason

  • denish1

    I looked over the web project's code, and it seems that ".refresh" file can only be used to exclude from source control dll files (they are specifically looking for XXXXX.dll.refresh files, in which case the excluded file will be XXXXX.dll). Creating .pdb.refresh files will not help. It looks like you cannot exclude from source control a pdb file that just happens to be in Bin folder.

    However, if the pdb file is the generated output of another project in your solution, it will be automatically excluded. Say you have a ClassLibrary1 project in your solution, and you use AddReferrence on the web node in Solution Explorer to add the ClassLibrary1 as reference to the web project, then ClassLibrary1.dll, ClassLibrary1.xml and ClassLibrary1.pdb will appear in the Bin folder, and they will be excluded from source control. Pdb and xml file are build dependencies and they will be excluded; satellite assemblies will be excluded, too. I just verified this to be working with latest RTM builds.

    So, I'd make sure the pdb file you want to exclude is actually a build output of a reference to a project in your solution; I'd remove and re-add the referrence if necessary. If that doesn't work, someone on the 'vnetdev' alias at Microsoft may know a better answer.

    Alin









  • Brian2

    I think it may be caused by switched from Debug to Release configurations. The pdb files have been created whilst in Debug configuration, so when you change to Release and Rebuild it appears that the pdb files are not deleted and are not considered as output to exclude.

    I should also say that my solution consists of a web project with project references to class projects which have project references to other class projects.

    Anyone else experiencing this



  • Sujata

    Hi,

    I'm not sure what kind of update you're expecting...

    If you use VS2005 beta, you should upgrade to VS2005 RTM - the automatic exclusion of pdb files feature was added by the web team post beta2.

    Also, make sure the pdb files you're trying to exclude are references to other projects in your solution - the automatic exclusion works only for build output of referenced projects.

    If you encounter the bug that pdb files are excluded but randomly they re-appear as controlled, you should read above posts for the workaround. The fix is going to appear in the next version or in VS2005 SP1.

    If you want to exclude random files from web projects, you should read this thread for a possible workaround http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=115593&SiteID=1. Again, excluding random files from folder-based web projects is not going to be added as a feature before next VS release. There is however a good chance that excluding random files from web projects will work with this VS2005 add-on http://weblogs.asp.net/scottgu/archive/2005/12/07/432630.aspx that seems to treats webs as regular projects (project file-based).

    Alin

     


  • Lakshan

    Alin,

    Apologies, I completely re-wrote my post because I think I may got it wrong on the indirect references. I revised my opinion to it being caused by switching between configs.

  • JustCheckin

    This is still a problem. Is it going to be fixed New install of VSS 2005, .net 2005, et al. Does the same thing on all other workstations. Been fighting it for weeks now. It happens whether you are the initiator of the project (don't have the .root folder for solution) or you are someone that got the solution from source control.

    Here is the process. The solution/file/reference layout is defined at the botom.

    1. create solution
    2. add so SS by right clicking the solution
    3. it adds some files in the web's bin (see below)
    4. right click on the .pdb and .xml files it is including (it does NOT add the bll files, which is good since the silly project is in the solution... why it doesn't exclude the other two is beyond me)
    5. select delete from the drop down menu
    6. say Yes when asked whether to delete from SS also
    7. repeat for all files in the Bin folders of web services it's getting SS happy with
    8. check in the solution... it doesn't add the files cause they aren't there (haven't rebuilt)
    9. close solution
    10. open solution
    11. rebuild web
    12. no web bin files show SS related icons
    13. close solution
    14. open solution
    15. back to ground zero... the same old files in the web bin show SS icons saying it'll create it as new when you check the solution in
    16. go to pending check ins window
    17. the offending files have a checkbox, and the checkbox is checked
    18. uncheck them
    19. check in - nothing to check in cause nothing selected since all i did was a rebuidl
    20. summary: What headaches it causes me If i ever do edit anything, it will want to check those files in any time i don't remember to either delete the web bin and rebuild WITHOUT repopening the solution before checkin, or i'll forget to uncheck the little checkbox. Yes, i know there are some external projects for add-ins, but the last thing i want is yet another publisher of a part of my IDE to have to be relied upon for keeping things running right.
    21. conclusion: I'll refrain from comment.

    Here's my solution setup:

    • c:\projects\slnLPI\
      • <single solution file>
      • LPI.CRL\<common reference layer project>
        • <all files in the bin folder, including the bin folders themselves, are greyed-out (not included, not in SS)>
        • no references
      • LPI.DAL\<data access layer project>
        • <all files in the bin folder, including the bin folders themselves, are greyed-out (not included, not in SS)>
        • project reference: LPI.CRL
      • LPI.BLL\<business logic layer project>
        • <all files in the bin folder, including the bin folders themselves, are greyed-out (not included, not in SS)>
        • project reference: LPI.CRL
        • project reference: LPI.DAL

    Web Service Sites (these appear in the base folder under source control, as they should)

    • uses http
    • c:\inetpub\wwwroot\
      • LPIWebSWAN\<services that will be published across the WAN>
        • same as the LAN web service
      • LPIWebSLAN\<services that will be published on the LAN(s), with cached data
        • project reference: LPI.CRL
        • project reference: LPI.BLL
        • bin\ <this folder will not allow exclusion from project or SS, nor will any of the files it contains>
          • LPI.DAL.pdb<SS insists on wanting to add it>
          • LPI.DAL.xml <SS insists on wanting to add it>
          • LPI.DAL.dll <SS doesn't mess with it>
          • LPI.BLL.pdb<SS doesn't mess with it>
          • LPI.BLL.xml<SS doesn't mess with it>
          • LPI.BLL.dll<SS doesn't mess with it>
          • LPI.CRL.pdb<SS doesn't mess with it>
          • LPI.CRL.xml<SS doesn't mess with it>
          • LPI.CRL.dll<SS doesn't mess with it>

  • cybbe

    Hi Rod,

    Check out this thread: http://forums.microsoft.com/msdn/ShowPost.aspx PostID=102744
    Depending on your solution configuration (project locations on disk) you may be able to exclude that pdb file from source control by manually modifying the vssscc or vspscc files of other projects, even without Venus' support for exclude that was added post beta2...

    Alin

  • robboonline

    Hi Jason,

    For the scenario described above, the workaround was something like this:

    Result after step 7: the pdb file has a + sign in SolutionExplorer, it appears in Pending Checkins window (and will be checked in if you press the checkin button)
       8. Rebuild the solution - The file will still show in pending checkins window
       9. Close the solution
       10. Reopen the solution - now the pdb file is no longer listed in the pending checkins window, and it has no source control glyph in Solution Explorer.

    Alternately, instead of step 8-9, you can do any source control operation (like File/SourceControl/Refresh, or checkout/checkin any other file in the solution), and the pdb file will disappear from the checkin window (it may still show scc glyph in solution explorer in this case)

    Unfortunately I'm not aware of any KB article describing the issue. The bug is opened only in the internal database. Feel free to open another one against web projects in the external database (http://lab.msdn.microsoft.com/productfeedback) if you want to track progress or if the above workaround is not working for you - it may be a different issue altogether.

    Thanks,
    Alin

  • buzzy

    Hi Rod,

    The change to exclude files from source control control in web projects was done in web projects side, and not in source control integration side(like for the rest of projects). To exclude a file from source control the web project will simply not report that file as controllable, and scci will not add it to VSS; this is different from regular projects where the list of excluded files is maintained by scci in the project.vspscc file.

    Our understanding was that all files in the 'Bin' folder would be excluded from source control. I asked the web guys, and it looks like we were wrong.
    Here is their answer:
    "We exclude any dll's (and their dependendencies) that have an associated .refresh file. When you add a reference in RTM builds we generate a filename.dll.refresh file containing the source location of the assembly (where it was added from). These dll's, and their dependencies are not reported to SCC. Similaritly, Project to project references are excluded from source control."

    I'm not sure if this will work as a workaround, but I'd try to create a filename.pdb.refresh file and see if the webprojects will stop reporting the filename.pdb as controllable.

    Alin

  • Colby

    CMore,

    I looked last week in the bugs database, and there were 5 bugs assigned to the Web project team related to these pdb/dll files that gets sometimes treated as controllable in various scenarios (which causes scci package to treat them as "pending adds"). The bugs were all marked as fixed. So, while I suspect your scenario will be fixed, too, the fix will not appear sooner than VS2005 SP1 or the next version.

    What I'd recommend is to open a product bug at http://lab.msdn.microsoft.com/productfeedback/ and paste in your excellent repro steps (this way the web project team can make sure your scenario was not overlooked)

    Thank you,

    Alin


  • Nelson Xu

    It may be a bug, or may simply be "not implemented yet".
    I don't know if web project guys have implemented automatic exclude from source control only for direct references or if they are scanning recursively the references lists.
    It's likely in next version we'll implement exclude from source control for webs on scci side for any item (like for the regular projects), but I think automatic references exclusion should probably work recursively.
    Can you open a bug at http://lab.msdn.microsoft.com/productfeedback against web projects, so this scenario doesn't get overlooked next version

    Thanks,
    Alin


  • Ed Hazell

    Has there been any updates to this issue I have tried to modify the source safe files to exclude it but I wasn't able to get it working.

  • Raul Rodriguez

    Hi Jason,

    I found a bug in the web project side, that if the solution is cleaned, the pdb files appear again as controllable (and appear as newly added files in pending checkins window). The scenario is like this:

       1. Create a new web site
       2. Add a client project class library
       3. Add a project reference in the web site to the class library
       4. Add the solution to source control
       5. Build the web site (notice your binaries/pdb/xml files are not under source control)
       6. Do a Clean Solution
       7. Close and re-open the site

       Result: the PDB files have SCC glyphs and can be checked in

    The bug has a note "Adding another case. If you change from Debug to Release, your PDB files will not be deleted automatically by us, but we will add them to source control."

    The bug comment sounds like what happens in your scenario.
    If this is what you're doing, this is a known issue (and will be fixed in the next version). The workaround is to rebuild the solution and do another scc operation (or close and reopen the solution), and the web projects will track again the pdb fiel as a non-controllable file (The first scc operation will fully refresh the pending checkins window, and the pdb file will be removed from there)

    If you're doing something else, feel free to open a product bug using the links at
    http://lab.msdn.microsoft.com/productfeedback/

    Thanks,
    Alin


  • Web Project pdb files - VS always want to add to sourcesafe