ASP.NET Web Deploy 發布項目二次開發發布編譯出錯原因

來源:互聯網
上載者:User

標籤:webdeploy publication Null 參考 aspnet_compiler

    原先的ASP.NET 轉換為 Web Deploy 項目後, 將所有的.CS檔案打成一個包, 頁面aspx檔案保留, 

項目開發人員拿到之後, 進行build, 開發沒有問題, 但是publish WebSite的時候, 會出錯.


錯誤: 


   Publication (web): 未將對象引用設定到對象的執行個體。


沒有任何其他相關資訊 , 

開啟aspnet_compiler.exe 的errorstack 選項後, 發現報錯堆棧:

error ASPRUNTIME: 未將對象引用設定到對象的執行個體。


[NullReferenceException]: 未將對象引用設定到對象的執行個體。

   在 System.Web.Compilation.BuildManager.CopyPrecompiledFile(VirtualFile vfile, String destPhysicalPath)

   在 System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirectory sourceVdir, String destPhysicalDir,

Boolean topLevel)

   在 System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirectory sourceVdir, String destPhysicalDir,

Boolean topLevel)

   在 System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir)

   在 System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir)

   在 System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback)

   在 System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)

   在 System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)

   在 System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback, Boolean forc

CleanBuild)

   在 System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback)


懷疑是不是那個需要的檔案沒有找到?

嘗試將aspx移掉一些, 沒用, 依舊報錯...

後面發現bin下面的__browserCapabilitiesCompiler.compiled

(因為項目中有APP_Browser)

然後將其刪除後, 項目publish成功......


原因不是很明確, 待後面有時間找找具體的原因, 先記錄下來.


希望對看到的朋友有協助.

本文出自 “跬步,千裡” 部落格,請務必保留此出處http://weixq.blog.51cto.com/1576819/1441288

ASP.NET Web Deploy 發布項目二次開發發布編譯出錯原因

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.