I am using NAudio to merge a few mp3 files together for a Windows Azure product. It works fine in the dev environment but once i upload it to Azure, I get the \"No Drive Cal
See my answer to this question. Also, you need to be sure you are running a 32 bit process, as most ACMs are 32 bit.
I battled this myself, and these are the steps to follow:
Manually:
Automatically (Azure deployments):
Add these commands to a Startup.cmd startup task in Azure for your role:
echo Begin Install Desktop Experience Feature (for sound codec) >> startup.log
ServerManagerCMD.exe -install Desktop-Experience -restart -resultPath desktopexperience_results.xml
REM This return code indicates the feature is already installed. Reset the errorlevel to zero using the verify command.
IF %ERRORLEVEL% EQU 1003 (
echo Windows feature is already installed >> startup.log
VERIFY > NUL
)
echo End Install Desktop Experience Feature >> startup.log
Note that it is important this script returns a result code (%ERRORLEVEL%) of zero (which the above will do, bar any actual problems).
The ServerManagerCMD will return a non-zero error code when it does not need to install the feature (perhaps because it was already installed from a previous Startup.cmd run), so we explicitly need to check for that code (1003) and silence it using VERIFY > NUL.