Can't Build Asp.net mvc project generated from vstudio 2015 enterprise

diegogarcia's Avatar

diegogarcia

04 Aug, 2015 02:30 PM

Hi,

I'm getting this error on my build:

Microsoft (R) ASP.NET Compilation Tool version 4.0.30319.33440
Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights reserved.

error ASPRUNTIME: Could not find a part of the path 'D:\temp\0m0pcli1.jfv\output\_PublishedWebsites\WebApplication1\bin\roslyn\csc.exe'.

[DirectoryNotFoundException]: Could not find a part of the path 'D:\temp\0m0pcli1.jfv\output\_PublishedWebsites\WebApplication1\bin\roslyn\csc.exe'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.get_CompilerName()
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames)
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames)
   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp)
   at System.Web.Compilation.BuildManager.CompileGlobalAsax()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

[HttpException]: Could not find a part of the path 'D:\temp\0m0pcli1.jfv\output\_PublishedWebsites\WebApplication1\bin\roslyn\csc.exe'.
   at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths)
   at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback, Boolean forceCleanBuild)
   at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback)
   at System.Web.Compilation.Precompiler.Main(String[] args)

Website precompilation failed with exit code 1. Precompilation can optionally be disabled in your AppHarbor application settings

The way I see, there is something wrong with your roslyn exe.

  1. Support Staff 1 Posted by rune on 05 Aug, 2015 09:46 PM

    rune's Avatar

    Hi,

    The problem with the default VS2015 templates is that the compiler isn't actually copied to the {outdir}_PublishedWebsites\tfr\bin\roslyn\ directory, but rather the {outdir}\roslyn\ directory. This is likely different from your local environment since AppHarbor builds apps using an output directory instead of building the solution "in-place".

    We're working on a way to make the build process work better with the new templates, but right now you could get around it simply by copying the files to the expected directory as a post-build event in your web project file using for instance xcopy.

    I've made a quick sample MVC5 app based on the VS2015 templates where you can see how this is done. You can likely just copy-paste the lines added in this commit in the bottom of your web project file to fix this issue.

    Hope this helps!

    Best,
    Rune

  2. 2 Posted by diegogarcia on 07 Aug, 2015 07:03 PM

    diegogarcia's Avatar

    Really nice solution,

    Very thanks

  3. 3 Posted by diegogarcia on 08 Aug, 2015 05:41 PM

    diegogarcia's Avatar

    I was able to build the Project, but it entered a infinte loop of build and precompilation, like this:

  4. Support Staff 4 Posted by rune on 11 Aug, 2015 01:42 PM

    rune's Avatar

    Hi,

    We're working on addressing the issue that prevents the builds from completing in some cases. It's intermittent though and will only happen on some builds, so it should be possible to get the deployment through despite this. It also looks like the last built went through OK?

    Best,
    Rune

  5. 5 Posted by SenseMaking on 11 Aug, 2015 08:47 PM

    SenseMaking's Avatar

    Hi Rune,

    I've modified my csproj as suggested but it doesn't seem to make any difference.

    Regards,
    Chris

  6. 6 Posted by SenseMaking on 12 Aug, 2015 08:50 AM

    SenseMaking's Avatar

    My Error seems slightly differrent - will open in a new ticket

  7. rune closed this discussion on 12 Aug, 2015 10:00 PM.

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