2011-03-30 35 views
2

我想使用aspnet_compile.exe來編譯ASP.NET web應用程序。命令我使用看起來像這樣:使用aspnet_compiler與VS2010項目構建.NET 3.5程序集的問題

aspnet_compiler.exe -f -c -p PATH_TO_WEB_APP -v/
-fixednames -errorstack PATH_TO_DESIRED_FOLDER 

過去,這是工作的罰款,但我試圖遷移涉及從VS2008到VS2010的項目。但是,我不想將所有項目升級到.NET 4(還)。所以他們都在VS2010中工作,並且在那裏正常工作。

但是,當我發出aspnet_compiler命令(使用2.0版本的編譯器)時,我得到以下內容。

error ASPCONFIG: Could not load file or assembly 'ASSEMBLY_NAME' 
or one of its dependencies. This assembly is built by a runtime newer than 
the currently loaded runtime and cannot be loaded. 

但是,如果我嘗試使用包括新aspnet_compiler與VS2010,它構建在.NET 4中,然後創建的組件不能由3.5組件的其餘部分使用。

所以我的問題:我如何使用aspnet_compiler對VS2010 web應用程序項目,同時仍然爲它構建.NET 2.0/3.5?

回答

相關問題