none
Build Error Could Not Open Source File (Though I know it Exists)

    Question

  • Hello All,

    I have a solution file that has multiple projects in it. The solution builds perfectly in Visual Studio though when I try to build the solution using Team Foundation Services it throws this error:

    C:\Program Files
    (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets
    (2352): Could not open Source file: Could not find a part of the path
    'C:\a\src\Orchard\Trunk\src\Orchard.Web\Core\web.config;Core\web.config'.

    "Trunk" is the name of the folder I am using in Team Foundation Service and the
    path does exist there so I am not sure why I am encountering this error.  I say the path exists, but in reality, I can only confirm it exists in $Orchard\Trunk\src\Orchard.Web\Core\web.config though I don't know what "C:\a\src\" really is (I am just assuming that is the levels above "Orchard" folder).

    In short, being as it works perfect in Visual Studio, I am not sure where to turn. I am going to start with a clean solution file and try one more time - will let you know if anything changes. In the meantime, are there any recommendations on what I can look for?

    UPDATE: I started with a clean solution and received the same error message, not sure what else to test.


    Monday, November 19, 2012 1:50 PM

Answers

  • With a fresh copy of 1.6 I was able to successfully execute a deployment to a localhost IIS installation through a WebDAV deployment by commenting out the line below:

    <Content Include="Media\web.config" />

    <ItemGroup>
        <Compile Include="Global.asax.cs">
          <DependentUpon>Global.asax</DependentUpon>
        </Compile>
        <Content Include="Config\log4net.config">
          <SubType>Designer</SubType>
        </Content>
        <Content Include="Config\Sample.HostComponents.config">
          <SubType>Designer</SubType>
        </Content>
        <!-- <Content Include="Media\web.config" /> -->
        <Compile Include="Properties\AssemblyInfo.cs" />
    </ItemGroup>

    The <ItemGroup> node was located at line 130 for me in my Orchard.Web.csproj file.

    - Eric

    • Proposed as answer by EricTung Thursday, March 21, 2013 3:12 AM
    • Marked as answer by Jeff A Olmstead Thursday, March 21, 2013 3:38 AM
    Thursday, March 21, 2013 3:12 AM

All replies

  • Here is a snippet from the Activity Log where the issue occurs:

    Built $/Orchard/Trunk/src/Orchard.sln for default targets.
    00:16
    Built $/Orchard/Trunk/src/Orchard.Web/Orchard.Web.csproj for default targets.
    00:00
    Built $/Orchard/Trunk/src/Orchard.WarmupStarter/Orchard.WarmupStarter.csproj for default targets.
    00:02
    Built $/Orchard/Trunk/src/Orchard/Orchard.Framework.csproj for default targets.
    00:00
    Built $/Orchard/Trunk/src/Tools/Orchard/Orchard.csproj for default targets.
    00:07
    Built $/Orchard/Trunk/src/Orchard.Web/Core/Orchard.Core.csproj for default targets.
    00:00
    Built $/Orchard/Trunk/src/Orchard/Orchard.Framework.csproj for default targets.
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (2352): Could not open Source file: Could not find a part of the path 'C:\a\src\Orchard\Trunk\src\Orchard.Web\Core\web.config;Core\web.config'.
    00:00
    Built $/Orchard/Trunk/src/Orchard.WarmupStarter/Orchard.WarmupStarter.csproj for default targets.
    00:00
    Built $/Orchard/Trunk/src/Orchard/Orchard.Framework.csproj for default targets.
    00:00
    Built $/Orchard/Trunk/src/Tools/Orchard/Orchard.csproj for default targets.
    00:00
    Built $/Orchard/Trunk/src/Orchard.Web/Core/Orchard.Core.csproj for default targets.

    For some reason the forum won't let me upload a picture, here is a link to where you can see a screen shot of the above (which is far easier to understand):

    http://www.endlessmountainsolutions.com//Media/EndlessMountainSolutions/Developer/ScreenCapture.JPG">http://www.endlessmountainsolutions.com//Media/EndlessMountainSolutions/Developer/ScreenCapture.JPG

    Hope this information is useful.


    • Edited by Jeff A Olmstead Monday, November 19, 2012 2:59 PM Added Link to Screenshot
    Monday, November 19, 2012 2:54 PM
  • Hi Jeff,

    Thank you for your post.

    Hope you can provide following information for narrow down the issue.
    1. What application you want to build?
    2. Do you set path 'C:\a\src\Orchard\Trunk\src\Orchard.Web\Core\web.config;Core\web.config' in any place?
    3. Is there any event log in your local machine?

    Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, November 21, 2012 8:31 AM
  • Hi Lily,

    Thanks for your offer to help.

    Question 1: I am looking to build an Orchard CMS (version 1.6) application. Builds great locally, just not on Team Foundation Services. The source code or download can be found on this site: http://orchard.codeplex.com I am just trying to run a native build on the Team Foundation Services (no changes)
    Question 2: The file "web.config" is included in one of the projects that make up this solution but other than that I don't explicitly reference it anywhere else.
    Question 3: I am using the Team Explorer Build so the build would be done on the Team Foundation Services server (I think). As such, I am not sure where to look for an event log on my local machine.

    UPDATE: I just tried another build on the Team Foundation Services without it being connected to an Azure Website and it worked great.  However, when I attach it to my Azure Website so it is all integrated I receive the same error.  This means the real issue is somewhere between Team Foundation Services and Azure Websites - any thoughts on where I could look?

    Wednesday, November 21, 2012 8:24 PM
  • Hi Jeff,

    As you mentioned, the issue occur when attach the build to your azure website, I move the case to http://social.msdn.microsoft.com/Forums/en-US/azuretfs/threads, you can get better support there.

    Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, November 22, 2012 5:46 AM
  • Hello Lily,

    It isn't an error of the azure website, nor the Team Foundation server; I'm having the next error when I try to publish to a Local IIS or deploy to an external web server:

    Could not open Source file: Could not find a part of the path 'C:\Users\Armando\ITTCMS\src\Orchard.Web\Media\web.config;Media\web.config'.

    Notes:

    All this happens on Orchard.Web.

    I think there's some module that parses the paths incorrectly.

    Regards.

    Thursday, November 22, 2012 7:15 AM
  • Hi Jose,

    There is an issue with Media\web.config but this is addressed on the orchard.codeplex forums. I am sure this will be addressed in the next release. However, I don't want the media folder in my build so I ignore the file anway therefore it is not an issue in my build.

    Can anyone else help me understand why a project would build fine locally and in Team Foundation Services but not in Team Foundation Services when it is connected to an Azure Website?

    Thanks

    Monday, November 26, 2012 1:19 PM
  • I am having the same issue, although with another module within orchard.  Mine is the Core\web.config.  For some reason during transformation calls, it creates a path to a file that doesn'e exist, by repeating part of the path name....  in your case it is Media\web.config\Media\web.config.  in my case it is Core\web.config;Core\web.config.  Did you ever figure out  a resolution?
    Monday, March 18, 2013 5:17 PM
  • With a fresh copy of 1.6 I was able to successfully execute a deployment to a localhost IIS installation through a WebDAV deployment by commenting out the line below:

    <Content Include="Media\web.config" />

    <ItemGroup>
        <Compile Include="Global.asax.cs">
          <DependentUpon>Global.asax</DependentUpon>
        </Compile>
        <Content Include="Config\log4net.config">
          <SubType>Designer</SubType>
        </Content>
        <Content Include="Config\Sample.HostComponents.config">
          <SubType>Designer</SubType>
        </Content>
        <!-- <Content Include="Media\web.config" /> -->
        <Compile Include="Properties\AssemblyInfo.cs" />
    </ItemGroup>

    The <ItemGroup> node was located at line 130 for me in my Orchard.Web.csproj file.

    - Eric

    • Proposed as answer by EricTung Thursday, March 21, 2013 3:12 AM
    • Marked as answer by Jeff A Olmstead Thursday, March 21, 2013 3:38 AM
    Thursday, March 21, 2013 3:12 AM