0
我有兩步生成最終輸出的過程。在WCF應用程序上運行aspnet_merge後找不到App_global.asax
首先,我用MSBuild任務預編譯的WCF應用
<AspNetCompiler Debug="false" PhysicalPath="$(RootBuildDir)/DeploymentPackages/Helium" TargetPath="$(RootBuildDir)/Packages/theWCFProj" VirtualPath="/theWCFProj" ></AspNetCompiler>
在這一點上,如果我在IIS中創建一個應用程序所產生的預編譯Packages/theWCFProj
目錄,一切似乎工作。
我然後運行它成功完成命令
<Exec Command='aspnet_merge "$(RootBuildDir)/Packages/theWCFProj" -o theWCFProj_aspnet' />
。
然而,在嘗試加載.SVC網址,或者從一個WCF客戶端調用它,我得到以下錯誤:
Could not load file or assembly 'App_global.asax, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
我可以看到但是,該.compiled文件正確指向合併的程序集,因爲App_global.asax.compiled
包含:
<?xml version="1.0" encoding="utf-8"?>
<preserve resultType="8" virtualPath="/theWCFProj/global.asax" hash="ffffffff8d3606ab" filehash="ffffe951d4811dee" flags="150000" assembly="theWCFProj_aspnet" type="ASP.global_asax">
<filedeps>
<filedep name="/theWCFProj/global.asax" />
</filedeps>
</preserve>
WCF服務託管在IIS7中。
有什麼想法可能會出錯?