aspnet_compiler.exe error

Last post 10-26-2009 4:27 PM by hongping. 1 replies.

Sort Posts:

  • aspnet_compiler.exe error

    10-26-2009, 2:05 PM

    Hi

    I have been given a batch file by the developer that compiles a website. This works fine when I run it locally on the server, but errors when I run it on my machine. The offending line seems to be as follows:

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v
    /PortalWebApp.csproj -p V:\MyApp\PortalWebApp\PortalWebApp -u -f .\TempBuild
    Dir\ -keyfile "V:\MyApp\Shared Assets\Corp.snk" -errorstack
    Utility to precompile an ASP.NET application
    Copyright (C) Microsoft Corporation. All rights reserved.

    error ASPRUNTIME: Could not load file or assembly 'App_Licenses, Version=0.0.0.0
    , Culture=neutral, PublicKeyToken=null' or one of its dependencies. The paramete
    r is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    [ArgumentException]: The parameter is incorrect. (Exception from HRESULT: 0x8007
    0057 (E_INVALIDARG))


    [FileLoadException]: Could not load file or assembly 'App_Licenses, Version=0.0.
    0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The param
    eter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
    Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boo
    lean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E
    vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool
    ean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence
     assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as
    semblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at System.Web.Compilation.BuildManager.LoadLicensesAssemblyIfExists()
       at System.Web.Compilation.BuildManager.Initialize()
       at System.Web.Compilation.BuildManager.InitializeBuildManager()
       at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)

    [HttpException]: Could not load file or assembly 'App_Licenses, Version=0.0.0.0,
     Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter
     is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
       at System.Web.Compilation.ClientBuildManager.EnsureHostCreated()
       at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil
    dManagerCallback callback, Boolean forceCleanBuild)
       at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil
    dManagerCallback callback)
       at System.Web.Compilation.Precompiler.Main(String[] args)

    I'm running Visual Studio 2008 (v9.0.30729.1) and Microsoft Web Deployment Projects 2008 (v9.0.21022) on Vista. The server is running Windows Server 2008 with the same versions of VS and Web Deployment Projects.

    Can anyone give me any advice about traoubleshooting this?

    Julia

    Filed under:
  • Re: aspnet_compiler.exe error

    10-26-2009, 4:27 PM
    Answer
    • Contributor
      3,389 point Contributor
    • hongping
    • Member since 11-02-2006, 5:42 PM
    • Posts 633

    If the same command works on one machine but not another, it probably means there are differences in how the machine are set up.

    Check the version of .NET installed on both machines, and also the file version of System.Web.dll. It is something like 2.0.50727.3053, and it depends on the OS and what service packs you have installed. 

    ==============================================
    If you get the answer to your question, please mark it as the answer.
Page 1 of 1 (2 items)