System.Web.Compilation.BuildManager.CopyPrecompiledFile 並未將物件參考設定為物件的執行個體


使用MSBUild 的 aspnet_compiler.exe 發布網站,

過程中出現錯誤

[NullReferenceException]: 並未將物件參考設定為物件的執行個體
    System.Web.Compilation.BuildManager.CopyPrecompiledFile(VirtualFile vfile,
 String destPhysicalPath)
    System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect
ory sourceVdir, String destPhysicalDir, Boolean topLevel)
    System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath star
tingVirtualDir, IEnumerable`1 excludedVirtualPaths)
    System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirt
ualDir, IEnumerable`1 excludedVirtualPaths)
    System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallba
ck callback, IEnumerable`1 excludedVirtualPaths)
    System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCa
llback callback, List`1 excludedVirtualPaths)
    System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCa
llback callback, List`1 excludedVirtualPaths)
    System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil
dManagerCallback callback, Boolean forceCleanBuild)
    System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil
dManagerCallback callback)
    System.Web.Compilation.Precompiler.Main(String[] args)

可在網站的屬性頁中,取消"允許更新此編譯站點"

Updateable 設置為false 
Updateable='true': Allow this precompiled site to be updatable
FixedNames='true': Use fixed nameing and single page assemblies
        <AspNetCompiler
        VirtualPath='/Web'
        PhysicalPath='C:\Jenkins\jobs\KM_ERP2\workspace\Web\'
        TargetPath='C:\Jenkins\jobs\KM_ERP2\workspace\PrecompiledWeb\Web\'
        Force='false'
        Debug='false'
        Updateable='false'
        FixedNames='false' />

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM