Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

WebProjectOutputDir

mgfeller's Avatar

mgfeller

Dec 11, 2015 @ 02:29 PM

The WebProjectOutputDir gets not filled with the correct path.

I have following code in my post build:
Found here:
https://support.appharbor.com/discussions/problems/78633-cant-build-aspnet-mvc-project-generated-from-vstudio-2015-enterprise
if not exist "$(WebProjectOutputDir)\bin\Roslyn" md "$(WebProjectOutputDir)\bin\Roslyn"
start /MIN xcopy /s /y /R "$(OutDir)roslyn\*.*" "$(WebProjectOutputDir)\bin\Roslyn"

This results in:
if not exist "\bin\Roslyn" md "\bin\Roslyn"
start /MIN xcopy /s /y /R "D:\temp\yt2xo11b.u4r\output\roslyn\*.*" "\bin\Roslyn"

Is something wrong with WebProjectOutputDir?

  1. Support Staff 1 Posted by rune on Dec 13, 2015 @ 08:59 PM

    rune's Avatar

    Hi,

    That's a good question -- the script you've used usually reference the web project directory as expected, but I can see that this doesn't seem to be the case here. The issue could perhaps be that another referenced configuration file overwrites some variables, but I'm not quite sure what would cause that.

    Was this project created with Visual Studio using the default templates, or did you use another tool? It might be worth comparing your project file with the sample project file here to see if any differences there might explain the unexpected result.

    BEst,
    Rune

  2. 2 Posted by mgfeller on Dec 14, 2015 @ 05:52 AM

    mgfeller's Avatar

    Thanks for your answer.

    I used the ASP.NET 4.5.2 MVC template from Visual Studio 2015.

    I found this:
    <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
      <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
    </Target>

    I will test it tomorrow.

  3. 3 Posted by mgfeller on Dec 15, 2015 @ 07:34 AM

    mgfeller's Avatar

    Here is my project file (without any changes) - i tried to adjust it but nothing has changed.

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
      <Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
      <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
      <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
        <ProductVersion>
        </ProductVersion>
        <SchemaVersion>2.0</SchemaVersion>
        <ProjectGuid>{4F019190-C4E7-4AAD-9C73-8F1EE6CFB289}</ProjectGuid>
        <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
        <OutputType>Library</OutputType>
        <AppDesignerFolder>Properties</AppDesignerFolder>
        <RootNamespace>PizzaApp</RootNamespace>
        <AssemblyName>PizzaApp</AssemblyName>
        <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
        <MvcBuildViews>false</MvcBuildViews>
        <UseIISExpress>true</UseIISExpress>
        <IISExpressSSLPort />
        <IISExpressAnonymousAuthentication />
        <IISExpressWindowsAuthentication />
        <IISExpressUseClassicPipelineMode />
        <UseGlobalApplicationHostFile />
        <NuGetPackageImportStamp>
        </NuGetPackageImportStamp>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>bin\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\</OutputPath>
        <DefineConstants>TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <ItemGroup>
        <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
          <Private>True</Private>
        </Reference>
        <Reference Include="Microsoft.CSharp" />
        <Reference Include="System" />
        <Reference Include="System.Data" />
        <Reference Include="System.Drawing" />
        <Reference Include="System.Web.DynamicData" />
        <Reference Include="System.Web.Entity" />
        <Reference Include="System.Web.ApplicationServices" />
        <Reference Include="System.ComponentModel.DataAnnotations" />
        <Reference Include="System.Core" />
        <Reference Include="System.Data.DataSetExtensions" />
        <Reference Include="System.Xml.Linq" />
        <Reference Include="System.Web" />
        <Reference Include="System.Web.Extensions" />
        <Reference Include="System.Web.Abstractions" />
        <Reference Include="System.Web.Routing" />
        <Reference Include="System.Xml" />
        <Reference Include="System.Configuration" />
        <Reference Include="System.Web.Services" />
        <Reference Include="System.EnterpriseServices" />
        <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
        </Reference>
        <Reference Include="System.Net.Http">
        </Reference>
        <Reference Include="System.Net.Http.WebRequest">
        </Reference>
        <Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
        </Reference>
        <Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
        </Reference>
        <Reference Include="System.Web.Optimization">
          <HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
        </Reference>
        <Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
        </Reference>
        <Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
        </Reference>
        <Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
        </Reference>
        <Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Private>True</Private>
          <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
        </Reference>
        <Reference Include="WebGrease">
          <Private>True</Private>
          <HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
        </Reference>
        <Reference Include="Antlr3.Runtime">
          <Private>True</Private>
          <HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
        </Reference>
      </ItemGroup>
      <ItemGroup>
        <Reference Include="Newtonsoft.Json">
          <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
        </Reference>
        <Reference Include="EntityFramework">
          <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
        </Reference>
        <Reference Include="EntityFramework.SqlServer">
          <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.AspNet.Identity.Core">
          <HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.AspNet.Identity.Owin">
          <HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.AspNet.Identity.EntityFramework">
          <HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
        </Reference>
        <Reference Include="Owin">
          <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin">
          <HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Host.SystemWeb">
          <HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security">
          <HintPath>..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security.Facebook">
          <HintPath>..\packages\Microsoft.Owin.Security.Facebook.3.0.1\lib\net45\Microsoft.Owin.Security.Facebook.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security.Cookies">
          <HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security.OAuth">
          <HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security.Google">
          <HintPath>..\packages\Microsoft.Owin.Security.Google.3.0.1\lib\net45\Microsoft.Owin.Security.Google.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security.Twitter">
          <HintPath>..\packages\Microsoft.Owin.Security.Twitter.3.0.1\lib\net45\Microsoft.Owin.Security.Twitter.dll</HintPath>
        </Reference>
        <Reference Include="Microsoft.Owin.Security.MicrosoftAccount">
          <HintPath>..\packages\Microsoft.Owin.Security.MicrosoftAccount.3.0.1\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath>
        </Reference>
      </ItemGroup>
      <ItemGroup>
        <Compile Include="App_Start\BundleConfig.cs" />
        <Compile Include="App_Start\FilterConfig.cs" />
        <Compile Include="App_Start\IdentityConfig.cs" />
        <Compile Include="App_Start\RouteConfig.cs" />
        <Compile Include="App_Start\Startup.Auth.cs" />
        <Compile Include="Controllers\AccountController.cs" />
        <Compile Include="Controllers\HomeController.cs" />
        <Compile Include="Controllers\ManageController.cs" />
        <Compile Include="Controllers\OrderController.cs" />
        <Compile Include="Global.asax.cs">
          <DependentUpon>Global.asax</DependentUpon>
        </Compile>
        <Compile Include="Models\AccountViewModels.cs" />
        <Compile Include="Models\IdentityModels.cs" />
        <Compile Include="Models\ManageViewModels.cs" />
        <Compile Include="Models\Order.cs" />
        <Compile Include="Properties\AssemblyInfo.cs" />
        <Compile Include="Startup.cs" />
      </ItemGroup>
      <ItemGroup>
        <Content Include="Content\bootstrap.css" />
        <Content Include="Content\bootstrap.min.css" />
        <Content Include="Content\Images\pizza.jpg" />
        <Content Include="favicon.ico" />
        <Content Include="fonts\glyphicons-halflings-regular.svg" />
        <Content Include="Global.asax" />
        <Content Include="Content\Site.css" />
        <Content Include="Scripts\bootstrap.js" />
        <Content Include="Scripts\bootstrap.min.js" />
        <None Include="Scripts\jquery-1.10.2-vsdoc.js" />
        <Content Include="Scripts\jquery-1.10.2.js" />
        <Content Include="Scripts\jquery-1.10.2.min.js" />
        <None Include="Scripts\jquery.validate-vsdoc.js" />
        <Content Include="Scripts\jquery.unobtrusive-ajax.js" />
        <Content Include="Scripts\jquery.unobtrusive-ajax.min.js" />
        <Content Include="Scripts\jquery.validate.js" />
        <Content Include="Scripts\jquery.validate.min.js" />
        <Content Include="Scripts\jquery.validate.unobtrusive.js" />
        <Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
        <Content Include="Scripts\modernizr-2.6.2.js" />
        <Content Include="Scripts\respond.js" />
        <Content Include="Scripts\respond.min.js" />
        <Content Include="Scripts\_references.js" />
        <Content Include="Web.config" />
        <Content Include="Web.Debug.config">
          <DependentUpon>Web.config</DependentUpon>
        </Content>
        <Content Include="Web.Release.config">
          <DependentUpon>Web.config</DependentUpon>
        </Content>
        <Content Include="Views\Web.config" />
        <Content Include="Views\_ViewStart.cshtml" />
        <Content Include="Views\Shared\Error.cshtml" />
        <Content Include="Views\Shared\_Layout.cshtml" />
        <Content Include="Views\Home\About.cshtml" />
        <Content Include="Views\Home\Contact.cshtml" />
        <Content Include="Views\Home\Index.cshtml" />
        <Content Include="Views\Account\_ExternalLoginsListPartial.cshtml" />
        <Content Include="Views\Account\ConfirmEmail.cshtml" />
        <Content Include="Views\Account\ExternalLoginConfirmation.cshtml" />
        <Content Include="Views\Account\ExternalLoginFailure.cshtml" />
        <Content Include="Views\Account\ForgotPassword.cshtml" />
        <Content Include="Views\Account\ForgotPasswordConfirmation.cshtml" />
        <Content Include="Views\Account\Login.cshtml" />
        <Content Include="Views\Account\Register.cshtml" />
        <Content Include="Views\Account\ResetPassword.cshtml" />
        <Content Include="Views\Account\ResetPasswordConfirmation.cshtml" />
        <Content Include="Views\Account\SendCode.cshtml" />
        <Content Include="Views\Account\VerifyCode.cshtml" />
        <Content Include="Views\Manage\AddPhoneNumber.cshtml" />
        <Content Include="Views\Manage\ChangePassword.cshtml" />
        <Content Include="Views\Manage\Index.cshtml" />
        <Content Include="Views\Manage\ManageLogins.cshtml" />
        <Content Include="Views\Manage\SetPassword.cshtml" />
        <Content Include="Views\Manage\VerifyPhoneNumber.cshtml" />
        <Content Include="Views\Shared\Lockout.cshtml" />
        <Content Include="Views\Shared\_LoginPartial.cshtml" />
        <Content Include="Views\Order\Create.cshtml" />
        <Content Include="Views\Order\OrderOk.cshtml" />
      </ItemGroup>
      <ItemGroup>
        <Folder Include="App_Data\" />
      </ItemGroup>
      <ItemGroup>
        <Content Include="fonts\glyphicons-halflings-regular.woff" />
        <Content Include="fonts\glyphicons-halflings-regular.ttf" />
        <Content Include="fonts\glyphicons-halflings-regular.eot" />
        <Content Include="packages.config" />
        <None Include="Project_Readme.html" />
        <Content Include="Scripts\jquery-1.10.2.min.map" />
      </ItemGroup>
      <PropertyGroup>
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
        <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
      </PropertyGroup>
      <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
      <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
      <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
      <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
        <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
      </Target>
      <ProjectExtensions>
        <VisualStudio>
          <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
            <WebProjectProperties>
              <UseIIS>True</UseIIS>
              <AutoAssignPort>True</AutoAssignPort>
              <DevelopmentServerPort>9490</DevelopmentServerPort>
              <DevelopmentServerVPath>/</DevelopmentServerVPath>
              <IISUrl>http://localhost:9490/</IISUrl>
              <NTLMAuthentication>False</NTLMAuthentication>
              <UseCustomServer>False</UseCustomServer>
              <CustomServerUrl>
              </CustomServerUrl>
              <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
            </WebProjectProperties>
          </FlavorProperties>
        </VisualStudio>
      </ProjectExtensions>
      <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
        <PropertyGroup>
          <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
        </PropertyGroup>
        <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
        <Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
      </Target>
      <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
           Other similar extension points exist, see Microsoft.Common.targets.
      <Target Name="BeforeBuild">
      </Target>
      <Target Name="AfterBuild">
      </Target> -->
    </Project>

  4. Support Staff 4 Posted by rune on Dec 15, 2015 @ 06:18 PM

    rune's Avatar

    Ok coming to think of it I suspect the issue might simply be where the task appears in your project file. Can you try and move it to the very bottom of the project file (as in the example application?

    It also seems like other people have faced this issue before. Of course this doesn't apply if you had already put the post build task in the bottom of the file before you wrote.

    Best,
    Rune

  5. 5 Posted by mgfeller on Dec 16, 2015 @ 06:35 AM

    mgfeller's Avatar

    Thanks!
    That was the problem.
    I didn't think that the order of the items has an impact!

  6. mgfeller closed this discussion on Dec 16, 2015 @ 08:39 AM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac