locked
Build fails on absolute path in solution file RRS feed

  • Question

  • Hi

    Got the buil service up and running (thanks to a post on the fact that it had to be installed separately, reminds me of those commercials on Cartoon Network my kids know by hart which goes something like this "bla, bla, sold separately" :-)

    Anyway, decided to kick off a build of my first Team Project (called Kiosk!).

    Now I am playing both the independent thinking developer and the buildmanager with a sentralized mind here, so wearing the dev-hat i configured my client workspace to map to c:\Development (as you can see). For the build-setup on the other hand I specified a build directory of c:\Build (where has my imagination gone?).

    Got the following CompilationLog.txt on the build server (installed the build-system on the One-Tier Foundation Server).

    Solution: Kiosk.sln, Project: C:\Development\Kiosk\, Configuration: Debug, AnyCPU
    ASPNETCOMPILER(0,0): error 1003: The directory 'c:\Development\Kiosk\' doesn't exist.

    Surprise, surprise :-)

    So a workaround could be to become the dictator and force all developers to standardize on either c:\Development or C:\Build. But it shouldn't be like that.

    Am I missing something? Shouldn't the build service parse and change the solution files to make this work no matter what or indeed where?

    Martin
    Monday, April 25, 2005 5:27 PM

Answers

  • Your physical path should be set relative to the .sln file location. So the physical path will be "..\Myweb2_1"

    Please let me know if that works.
    Thursday, October 13, 2005 4:05 PM
  • Apologies, my previous posting seems to have some formatting issues, reposting it.

    Martin,

    Thanks for trying out Team Build.

    The behavior you observed was due to the solution file and the web site directory being created at two separate locations but they get checked into source code control in a nested project structure. Please refer http://msdn2.microsoft.com/library/ms178455(en-us,vs.80).aspx on how web projects work with source control. If you look at the property ‘Debug.AspNetCompiler.PhysicalPath’ or ‘Release.AspNetCompiler.PhysicalPath’ in the solution file, you may find that they still point to the directory structure on your dev box. These two properties need to be updated to reflect the directory structure in the source control.

    Assume on your dev box, the website is created at c:\development\kiosk and the solution file is saved at “c:\documents and settings\MyUsername\My Documents\Visual Studio 2005\Projects\WebSite1\WebSite1.sln”. You will see ‘Debug.AspNetCompiler.PhysicalPath’ being set to “..\..\..\..\..\..\development\kiosk”. Please change it to “kiosk\” and try.

    The above guidelines are required for any web development under source code control.

    Regards,
    Nagaraju Palla,
    Team Build, Visual Studio Team System

    ----------------------------------------------
    This post is provided as-is and without warranty

    Wednesday, April 27, 2005 5:21 AM

All replies

  • Hi Martin, chemas-microsoft-comSurprisefficeSurpriseffice" />>>

    >

    Thanks for trying out Team Build. >>

    >

    The behavior you observed was due to the solution file and the web site directory being created at two separate locations but they get checked into source code control in a nested project structure. Please refer http://msdn2.microsoft.com/library/ms178455(en-us,vs.80).aspx on how web projects work with source control. If you look at the property ‘Debug.AspNetCompiler.PhysicalPath’ or ‘Release.AspNetCompiler.PhysicalPath’ in the solution file, you may find that they still point to the directory structure on your dev box. These two properties need to be updated to reflect the directory structure in the source control. >>

    >

    Assume on your dev box, the website is created at c:\development\kiosk and the solution file is saved at “c:\documents and settings\MyUsername\My Documents\Visual Studio 2005\Projects\WebSite1\WebSite1.sln”. You will see ‘Debug.AspNetCompiler.PhysicalPath’ being set to “..\..\..\..\..\..\development\kiosk”. Please change it to “kiosk\” and try.>>

    >

    The above guidelines are required for any web development under source code control.>>

    >

    Regards,>>

    Nagaraju Palla,>>

    Team Build, Visual Studio Team System>>

    >

    This post is provided as-is and without warranty>>

    Tuesday, April 26, 2005 11:40 PM
  • Apologies, my previous posting seems to have some formatting issues, reposting it.

    Martin,

    Thanks for trying out Team Build.

    The behavior you observed was due to the solution file and the web site directory being created at two separate locations but they get checked into source code control in a nested project structure. Please refer http://msdn2.microsoft.com/library/ms178455(en-us,vs.80).aspx on how web projects work with source control. If you look at the property ‘Debug.AspNetCompiler.PhysicalPath’ or ‘Release.AspNetCompiler.PhysicalPath’ in the solution file, you may find that they still point to the directory structure on your dev box. These two properties need to be updated to reflect the directory structure in the source control.

    Assume on your dev box, the website is created at c:\development\kiosk and the solution file is saved at “c:\documents and settings\MyUsername\My Documents\Visual Studio 2005\Projects\WebSite1\WebSite1.sln”. You will see ‘Debug.AspNetCompiler.PhysicalPath’ being set to “..\..\..\..\..\..\development\kiosk”. Please change it to “kiosk\” and try.

    The above guidelines are required for any web development under source code control.

    Regards,
    Nagaraju Palla,
    Team Build, Visual Studio Team System

    ----------------------------------------------
    This post is provided as-is and without warranty

    Wednesday, April 27, 2005 5:21 AM
  • My website is not in a subfolder below my solution under source control, they are at the same level i.e. my sln file is in a folder called 'MyWeb2' and my source code is in a folder at the same level called 'MyWeb2_1'. What should the syntax of my PhysicalPath attribute be?

    When I try the above fix i.e. ....PhysicalPath = 'MyWeb2\', then I then get the following error:

    ......
    Target Build:

    Target C:\___\MyWeb2\:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /MyWeb2 -u -f -d PrecompiledWeb\MyWeb2\

    ASPNETCOMPILER : error ASPRUNTIME: '/MyWeb2' is not a valid IIS application.

    Done building target "C:\___\MyWeb2\" in project "MyWeb2.sln" -- FAILED.

    Done building target "Build" in project "MyWeb2.sln" -- FAILED.

    Done building project "MyWeb2.sln" -- FAILED.

    Thursday, October 13, 2005 2:44 PM
  • Simon - I still cannot see a -p MyWeb2\ in your command line in the build log.

    1. Are you sure you have entered the physical path as MyWeb2\ in your solution file?
    2. Would you please post the solution file?
    3. What is your solution and project file structure? Are they like:

    C:\Dev\.sln file
    C:\Dev\MyWeb2\Website files

    - Anu
    Thursday, October 13, 2005 3:03 PM
  • Anu

    First of all, my solution isn't called Kiosk thats why you wont see it.

    In my solution file I have now blanked out the physicalpath because, when I did as the original post suggests i.e. physicalpath = 'MyWeb2\' then my team build failed because it was looking for source in a folder that didn't exist on the build machine 'C:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2\MyWeb2'

    It was going a folder level too far i.e. there should only be 1 'MyWeb2' folder in the above path. My website source is actually in the following folder on my build machine 'C:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2_1' and my solution is in 'C:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2' on the build machine, therefore what should my physical path be?

    Here is my solution file


    Microsoft Visual Studio Solution File, Format Version 9.00
    # Visual Studio 2005
    Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\...\MyWeb2\", "..\..\..\..\..\..\SourceControl\Project_01\Exweb\MyWeb2", "{7F8A167E-DBEE-4A8C-B48C-224D273CBDE7}"
     ProjectSection(WebsiteProperties) = preProject
      SccProjectName = "SAK"
      SccAuxPath = "SAK"
      SccLocalPath = "SAK"
      SccProvider = "SAK"
      Debug.AspNetCompiler.VirtualPath = "/MyWeb2"
      Debug.AspNetCompiler.PhysicalPath = ""
      Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MyWeb2\"
      Debug.AspNetCompiler.Updateable = "true"
      Debug.AspNetCompiler.ForceOverwrite = "true"
      Debug.AspNetCompiler.FixedNames = "false"
      Debug.AspNetCompiler.Debug = "True"
      Release.AspNetCompiler.VirtualPath = "/MyWeb2"
      Release.AspNetCompiler.PhysicalPath = ""
      Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MyWeb2\"
      Release.AspNetCompiler.Updateable = "true"
      Release.AspNetCompiler.ForceOverwrite = "true"
      Release.AspNetCompiler.FixedNames = "false"
      Release.AspNetCompiler.Debug = "False"
      VWDPort = "9684"
      DefaultWebSiteLanguage = "Visual Basic"
     EndProjectSection
    EndProject
    Global
     GlobalSection(TeamFoundationVersionControl) = preSolution
      SccNumberOfProjects = 2
      SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
      SccTeamFoundationServer = http://vsts-cm-03:8080/
      SccLocalPath0 = .
      SccWebProject1 = true
      SccProjectUniqueName1 = ..\\..\\..\\..\\..\\..\\SourceControl\\Project_01\\Exweb\\MyWeb2
      SccProjectName1 = ../MyWeb2_1
      SccLocalPath1 = ..\\..\\..\\..\\..\\..\\SourceControl\\Project_01\\Exweb\\MyWeb2
      SccProjectEnlistmentChoice1 = 2
     EndGlobalSection
     GlobalSection(SolutionConfigurationPlatforms) = preSolution
      Debug|.NET = Debug|.NET
     EndGlobalSection
     GlobalSection(ProjectConfigurationPlatforms) = postSolution
      {7F8A167E-DBEE-4A8C-B48C-224D273CBDE7}.Debug|.NET.ActiveCfg = Debug|.NET
      {7F8A167E-DBEE-4A8C-B48C-224D273CBDE7}.Debug|.NET.Build.0 = Debug|.NET
     EndGlobalSection
     GlobalSection(SolutionProperties) = preSolution
      HideSolutionNode = FALSE
     EndGlobalSection
    EndGlobal
    Thursday, October 13, 2005 3:25 PM
  • Your physical path should be set relative to the .sln file location. So the physical path will be "..\Myweb2_1"

    Please let me know if that works.
    Thursday, October 13, 2005 4:05 PM
  • The solution was to change my physicalpath attribute in the solution to '..\MyWeb2_1' instead of 'MyWeb2\' as my solution folder and source folder were at the same level rather than subordinate to each other

    My next problem is that I have my website has an external file reference that my team build does not copy correctly into the websites bin folder and therefore does not resolve it.

    My team build first builds the ExampleComponent02.sln with no problems but then attempts to build my website solution which references the examplecomponent02.dll. As you can see from the log there is a path that does not exist on the build machine because even though the examplecomponent02.sln builds successfully, it doesn't create a bin folder, there is just a obj\debug folder containing the new dll.

    Target Build:

    Target C:\___\MyWeb2\:

    Copying file from "c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\ExampleComponent02\ExampleComponent02\bin\Debug\ExampleComponent02.dll" to "..\MyWeb2_1\Bin\ExampleComponent02.dll".

    MSBUILD : warning MSB3021: Unable to copy file "c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\ExampleComponent02\ExampleComponent02\bin\Debug\ExampleComponent02.dll" to "..\MyWeb2_1\Bin\ExampleComponent02.dll". Could not find a part of the path 'c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\ExampleComponent02\ExampleComponent02\bin\Debug\ExampleComponent02.dll'.

    The previous error was converted to a warning because the task was called with ContinueOnError=true.

    Build continuing because "ContinueOnError" on the task "Copy" is set to "true".

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /MyWeb2 -p ..\MyWeb2_1 -u -f -d c:\Build\Project_01\MyWeb2_Build\Binaries\.NET\Debug\_PublishedWebsites\MyWeb2_1\

    c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2_1\Default.aspx.vb(29): error BC30002: Type 'ExampleComponent02.Class1' is not defined.

    c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2_1\Default.aspx.vb(31): error BC30002: Type 'ExampleComponent02.Class1' is not defined.

    Done building target "C:\___\MyWeb2\" in project "MyWeb2.sln" -- FAILED.

    Thursday, October 13, 2005 4:43 PM
  • If you add the file reference as a project to project reference to the web site, this problem automatically gets solved. If you need an external file reference only, then you will have to check in this file explicitly in a folder other than bin and refer the dll from this folder.

    Please let me know if this helps.
    Thursday, October 13, 2005 5:21 PM
  • the file that I'm referncing is external to my websites solution but it is still in another solution I am building in the same team build type i.e my team build first builds my class library solution and then my website solution that references the class library - shouldn't the AdditionalReferencePath property in my tfsbuild.proj mean that the reference can be resolved?

    Also the build log suggests that the build is trying to copy the class library ExampleComponent02.dll from a directory that doesn't exist on the build server ('..Sources\ExWeb\ExampleComponent02\ExampleComponent02\bin') even though the class library has been successfully built. Why is this?

    Here is the website build section of my build log:

    Target Build:

    Target C:\___\MyWeb2\:

    Copying file from "c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\ExampleComponent02\ExampleComponent02\bin\Debug\ExampleComponent02.dll" to "..\MyWeb2_1\Bin\ExampleComponent02.dll".

    MSBUILD : warning MSB3021: Unable to copy file "c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\ExampleComponent02\ExampleComponent02\bin\Debug\ExampleComponent02.dll" to "..\MyWeb2_1\Bin\ExampleComponent02.dll". Could not find a part of the path 'c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\ExampleComponent02\ExampleComponent02\bin\Debug\ExampleComponent02.dll'.

    The previous error was converted to a warning because the task was called with ContinueOnError=true.

    Build continuing because "ContinueOnError" on the task "Copy" is set to "true".

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /MyWeb2 -p ..\MyWeb2_1 -u -f -d c:\Build\Project_01\MyWeb2_Build\Binaries\.NET\Debug\_PublishedWebsites\MyWeb2_1\

    c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2_1\Default.aspx.vb(29): error BC30002: Type 'ExampleComponent02.Class1' is not defined.

    c:\Build\Project_01\MyWeb2_Build\Sources\Exweb\MyWeb2_1\Default.aspx.vb(31): error BC30002: Type 'ExampleComponent02.Class1' is not defined.

    Done building target "C:\___\MyWeb2\" in project "MyWeb2.sln" -- FAILED.

    Friday, October 14, 2005 4:01 PM
  • Yes - the AdditionalReferencePath can be used to resolve additional references by providing additional paths.

    Manish has a blog describing the exact scenario you mention above. Would you please try the steps and let me know if that does not help you?
    Friday, October 14, 2005 4:31 PM
  • hi martin,

     iam having a project named frmeworksolution in TFS, the structure is like this

    Frameworksolution

    1.FrameworkSolution(frameworksolution.sln)

    2.FrameworkSolution_07Feb07(frameworksolution.sln)

    3.FrameworkSolution_Release01.0(frameworksolution.sln)

    4.FrameworkSolution_Release01.1(frameworksolution.sln)

    iam trying to build FrameworkSolution_Release01.1.how to take only that solution, the solution file name for all solutions inside framework is same(frameworksolution.sln)

    <executable>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe</executable>

    <workingDirectory>D:\BLFWVSS</workingDirectory>

    <projectFile>FrameworkSolution.sln</projectFile>

    </msbuild>

     

    iam getting the error like this

    ASPNETCOMPILER (,):  error 1003: The directory 'D:\SWCode\CodeFromIndia\VirtualPathProvider\VirtualPathProvider\' doesn't exist.
    ASPNETCOMPILER (,):  error 1003: The directory 'D:\netEditor\netEditoFromTFS\SampleProjects\BasePage\' doesn't exist.
    Monday, March 26, 2007 9:54 AM