aspnet_compiler.exe error
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 troubleshooting this?
Julia
Answers
Hello Julia,
To troubleshoot why the runtime cannot find App_Licenses assembly and where is the assembly supposed to be, you can use fusion log to get some helpful information,
http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx
.NET runtime probe the assembly in serveral places,
1.GAC,
2.Codebase in a configuration file
3.Application base folder
4.Culture directories
5.Private binpath.
That is to say, you must have App_Licenses in one of them to make it work. App_Licenses seems to be some third party control libraries. http://forums.asp.net/t/1276386.aspx. So you should install something like ASPNET Audio described in this link..
Have a nice day!Ji Zhou
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer byJi.ZhouMSFT, ModeratorWednesday, November 04, 2009 7:20 AM
All Replies
- The assembly App_Licenses cannot be found. This is not a framework assembly so it would appear that your machine is missing the assembly that the server has.
Michael Taylor - 10/26/09
http://p3net.mvps.org Hello Julia,
To troubleshoot why the runtime cannot find App_Licenses assembly and where is the assembly supposed to be, you can use fusion log to get some helpful information,
http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx
.NET runtime probe the assembly in serveral places,
1.GAC,
2.Codebase in a configuration file
3.Application base folder
4.Culture directories
5.Private binpath.
That is to say, you must have App_Licenses in one of them to make it work. App_Licenses seems to be some third party control libraries. http://forums.asp.net/t/1276386.aspx. So you should install something like ASPNET Audio described in this link..
Have a nice day!Ji Zhou
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer byJi.ZhouMSFT, ModeratorWednesday, November 04, 2009 7:20 AM
Julia, have you resolved it? If you need any help on this, just let us know!
Ji Zhou
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Hi Ji
I did resolve it, but I've no idea how. I know that's really frustrating, but I was just deleting things and recreating them and it started working.
I think your checklist is a really good resource for others with similar problems though.
Sorry it wasn't a more useful response.
Julia.


