我實現斯科特Hanselman的方法與web.config中的開發/ QA/PROD版本跟上: http://www.hanselman.com/blog/CommentView.aspx?guid=93bfa4b3-44cd-4681-b70e-f4a2b0386466如何解決「@echo」是無法識別的命令
出於某種原因,當我編譯我的項目我在我的輸出窗口中收到此錯誤消息。
任何想法?
------ Build started: Project: ABC.Flims.Web, Configuration: Development Any CPU ------
"C:\Projects\ballyhoo-trunk\src\ABC.Flims.Web\scripts/copyifnewer.bat" "C:\Projects\ballyhoo-trunk\src\ABC.Flims.Web\web.config.Development" "C:\Projects\ballyhoo-trunk\src\ABC.Flims.Web\web.config"
'@echo' is not recognized as an internal or external command,
operable program or batch file.
這裏是腳本文件:
@echo off
echo Comparing two files: %1 with %2
if not exist %1 goto File1NotFound
if not exist %2 goto File2NotFound
fc %1 %2
if %ERRORLEVEL%==0 GOTO NoCopy
echo Files are not the same. Copying %1 over %2
copy %1 %2 /y & goto END
:NoCopy
echo Files are the same. Did nothing
goto END
:File1NotFound
echo %1 not found.
goto END
:File2NotFound
copy %1 %2 /y
goto END
:END
echo Done.
此問題解決了我正在處理的Azure啓動問題。我使用的.cmd文件創建爲UTF-8而不是ANSI。以您建議的方式改變它解決了問題。 – Bern 2013-07-18 16:09:45