Archived Support Site

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

MVC 5, C# ASP.Net missing assembly references?

Jose Luis's Avatar

Jose Luis

Mar 30, 2016 @ 08:37 PM

Hello, i have an issue while deploying an MVC5 to appharbor, im getting some errors in the precompilation step, it just says "An error occurred while compiling the views", locally the applications build and run correctly so i dont know what is happening.

Any help will be appreciated.

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.

d:\temp\e2plf50u.wui\temp\root\1b7960ee\b1ec95d1\App_Web_ojqqiqxf.9.cs(29): error CS0234: The type or namespace name 'ManageUserViewModel' does not exist in the namespace 'OpenOrderFramework.Models' (are you missing an assembly reference?)
d:\temp\e2plf50u.wui\temp\root\1b7960ee\b1ec95d1\App_Web_ojqqiqxf.1.cs(35): error CS0234: The type or namespace name 'ManageUserViewModel' does not exist in the namespace 'OpenOrderFramework.Models' (are you missing an assembly reference?)

[HttpCompileException]: d:\temp\e2plf50u.wui\temp\root\1b7960ee\b1ec95d1\App_Web_ojqqiqxf.9.cs(29): error CS0234: The type or namespace name 'ManageUserViewModel' does not exist in the namespace 'OpenOrderFramework.Models' (are you missing an assembly reference?)
   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.WebDirectoryBatchCompiler.CompileAssemblyBuilder(AssemblyBuilder builder)
   at System.Web.Compilation.WebDirectoryBatchCompiler.CompileAssemblyBuilderParallel(ICollection assemblyBuilders)
   at System.Web.Compilation.WebDirectoryBatchCompiler.CompileNonDependentBuildProviders(ICollection buildProviders)
   at System.Web.Compilation.WebDirectoryBatchCompiler.Process()
   at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
   at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors)
   at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
   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

  1. Support Staff 1 Posted by rune on Mar 31, 2016 @ 10:36 PM

    rune's Avatar

    Hi there,

    Looks like a file may not have been included in the repository -- I took a look at the application though, and it seems like you've been able to fix this issue already?

    Best,
    Rune

  2. 2 Posted by athlonbe2300 on Apr 01, 2016 @ 02:23 AM

    athlonbe2300's Avatar

    El mar. 31, 2016 4:36 PM, "rune" <[email blocked]> escribió:
    >
    Hello, thanks for answer, actually i couldnt fix the issue, i just disabled
    precompilation and i didnt get any errors after, but i dont know if this
    affects someway the aplication.

    Thanks

  3. Support Staff 3 Posted by rune on Apr 01, 2016 @ 10:10 PM

    rune's Avatar

    Ok so the error you received indicates that the ManageUserViewModel isn't being compiled/included in your project, which causes the issue to occur at precompilation. It should however also cause the issue to occur at runtime (as precompilation errors typically indicates exactly that).

    Are you able to access and use the views that rely on the ManageUserViewModel when you access the deployed application?

    Best,
    Rune

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