Page view counter

Web Deployment Project copies .csproj and .sln files

Rate It (1)

Last post 12-06-2006 5:32 PM by Broken0007. 11 replies.

Sort Posts:

  • Web Deployment Project copies .csproj and .sln files

    03-07-2006, 10:38 AM
    • Loading...
    • fcsobel
    • Joined on 03-06-2006, 10:42 PM
    • Posts 6
    • Points 17

    How do I keep  project (.csproj) and solution (.sln) files from being copied to the release folder? 

  • Re: Web Deployment Project copies .csproj and .sln files

    04-07-2006, 2:53 PM
    • Loading...
    • trms
    • Joined on 04-07-2006, 6:43 PM
    • Posts 7
    • Points 35
    I'm having this same problem. 

    When using a Deployment Project with a Web Site Project, things work out just fine.  However, when using a Deployment Project with a Web Application Project, things like the .csproj file and the obj, Properties, etc folders get copied to the release folder.

    I suppose there's no good way for the deployment project to know which files in the directory are used by the site or not...  Anyone have any solutions?

    -John Reilly
    Tightrope Media Systems
    http://www.trms.com/
  • Re: Web Deployment Project copies .csproj and .sln files

    04-13-2006, 3:32 PM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam

    That is a nice suggestion -- I've gone ahead and entered a Design Change Request (DCR) 590603 to consider it for a future release.

    Thanks!

    -Mike-

  • Re: Web Deployment Project copies .csproj and .sln files

    04-24-2006, 11:21 AM
    • Loading...
    • thisisafish
    • Joined on 04-24-2006, 3:13 PM
    • Denmark
    • Posts 2
    • Points 10
    Open the project file and add in /Project/ItemGroup:
    ~A~
  • Re: Web Deployment Project copies .csproj and .sln files

    04-24-2006, 11:23 AM
    • Loading...
    • thisisafish
    • Joined on 04-24-2006, 3:13 PM
    • Denmark
    • Posts 2
    • Points 10
    Oki, forum dont like "<".. test "heello".. Anyway - add: [ExcludeFromBuild Include="$(SourceWebPhysicalPath)\*.csproj"/]
    ~A~
  • Re: Web Deployment Project copies .csproj and .sln files

    04-25-2006, 10:45 AM
    • Loading...
    • Yury Kravtsov
    • Joined on 04-25-2006, 2:25 PM
    • Posts 4
    • Points 20
    Hi!

    It seems that WDP copies vssver2.scc file also. This is the mark file for VSS 2005 and it is present in probably every folder of a project.
    So
    thisisafish:
    [ExcludeFromBuild Include="$(SourceWebPhysicalPath)\*.scc"/]

    might not be correct solution for it.

    Any idea?



  • Re: Web Deployment Project copies .csproj and .sln files

    04-25-2006, 1:40 PM
    • Loading...
    • mbund
    • Joined on 04-22-2005, 5:48 PM
    • Redmond
    • Posts 126
    • Points 630
    • AspNetTeam

    According to http://filext.com/detaillist.php?extdetail=SCC

    Program and/or Extension Function:

    A special file called MSSCCPRJ.SCC is created in your working folder when Visual SourceSafe works with Visual Studio projects and solutions. The default MSSCCPRJ.SCC settings *.VBP, *.MAK, and *.DSP ensure that whenever you get or add a file with these extensions, SourceSafe creates the MSSCCPRJ.SCC file so that SourceSafe integration in Visual Studio works correctly for these files.

    Also, when any Visual SourceSafe operation puts a copy of a file on your local drive, it creates or updates a file called VSSVER.SCC in the working folder. That file lets VSS determine which files in that folder have and haven't changed.


    Since *.scc files are not used by ASP.NET, I would recommend not deploying them.
    The following will exclude all *.scc files in the root folder and subfolder, and (as a bonus) exclude DummyFile.mak from the root folder only. Add this under the Project element in the deployment project file. Remember to replace the square brackets with angle brackets. You can find info like this in the WDP white paper found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/web_deployment_projects.asp

    [ItemGroup]
      [
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.scc"/]
      [ExcludeFromBuild Include="$(SourceWebPhysicalPath)\DummyFile.mak"/]
    [/ItemGroup]

    -Mike-

  • Re: Web Deployment Project copies .csproj and .sln files

    05-24-2006, 4:57 PM
    • Loading...
    • freelancer
    • Joined on 11-28-2005, 7:38 PM
    • Posts 15
    • Points 49
    I tried this, but the resulting output is all screwed up.  You get an additional directory as a sibling to the output location named 'Source' and the output location contains everything from the directory that we're building from (including all of the .svn folders).

    Instead I tried to delete the files in the After Build target, but the delete task is extremely flaky.  Most of the time the delete won't even delete.
    <ItemGroup>
    <ProjFiles Include="$(OutputPath)\*.csproj*" />
    </ItemGroup>
    <Target Name="AfterBuild">
       <!-- Strip out stuff we don't want -->
       <RemoveDir Directories="$(OutputPath)\Properties" />
       <RemoveDir Directories="$(OutputPath)\obj" />
       <Delete Files="@(ProjFiles)" />
    
       <!-- Move site to deployment destination -->
       <Copy SourceFiles="@(PrecompiledOutput)" DestinationFiles="@(PrecompiledOutput->'$(DeploymentPath)\%(RecursiveDir)%(Filename)%(Extension)')"
              Condition="'$(DeploymentPath)' != ''" />
    </Target>
    Any ideas why the delete won't work?  Sometimes it will, but then the @(PrecompiledOutput) is out of sync and the copy fails, so I'll need to generate a new file list after the delete.  Now aspnet_compiler includes the .csproj files too, so the problem lies there I think.  Anybody have a good solution for getting rid of the extra stuff (.csproj, obj, Properties)?

  • Re: Web Deployment Project copies .csproj and .sln files

    08-16-2006, 3:17 PM
    • Loading...
    • Steele
    • Joined on 09-30-2002, 1:31 AM
    • Phoenix, AZ
    • Posts 3
    • Points 15

    The following do NOT work for eliminating .svn folders:

    <

    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\.svn\*.*" />

    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.svn\*.*" />

    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.*svn\*.*" />

    What is the correct way to accomplish this?

    I would settle for excluding all folders with an attribute of Hidden

    Thanks,

    Steele Price
    MVP - VB
    http://steeleprice.net

    Microsoft MVP - Visual Developer - Visual Basic
  • Re: Web Deployment Project copies .csproj and .sln files

    09-08-2006, 11:08 AM
    • Loading...
    • mpowell
    • Joined on 09-08-2005, 3:30 PM
    • Charlottesville, VA
    • Posts 3
    • Points 15

    Steele,

    Here's what I use to remove .svn folders; a bit klugey but it seems to work fine.  For some reason the ** wildcard doesn't work on the .svn folder at the project root, so I just break that one out separately. 

    <ItemGroup>

    <RemoveAfterBuild Include="$(OutputPath)\.svn\" />

    <RemoveAfterBuild Include="$(OutputPath)\**\.svn\" />

    </ItemGroup>

    <Target Name="AfterBuild">

    <RemoveDir Directories="@(RemoveAfterBuild)" />

    </Target>

  • Re: Web Deployment Project copies .csproj and .sln files

    11-21-2006, 3:22 PM
    • Loading...
    • goodeye
    • Joined on 11-21-2006, 8:15 PM
    • Posts 3
    • Points 6

    Hi,

    Combining mpowell and steele's, this is working for me:

    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\.svn\**\*.*;$(SourceWebPhysicalPath)\**\.svn\**\*.*"

    (add the outer brackets - never sure if they work in posts)

    - Bob

  • Re: Web Deployment Project copies .csproj and .sln files

    12-06-2006, 5:32 PM
    • Loading...
    • Broken0007
    • Joined on 12-06-2006, 5:24 PM
    • Corvallis, OR
    • Posts 2
    • Points 7
    goodeye:

    Combining mpowell and steele's, this is working for me:

    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\.svn\**\*.*;$(SourceWebPhysicalPath)\**\.svn\**\*.*"


    I can also confirm that this is working to remove the .svn folders.

    I also found that I could not build a web deployment project if my solution included a C++ project as it was having trouble accessing the .ncb intellisense file.  I found that adding the following will work around this:

     <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\*.ncb" />

     
     
    -Chris
Page 1 of 1 (12 items)