Azure support?

Feb 19, 2013 at 10:37 PM
Hi, I am trying to implement AjaxMin on my site hosted by Azure. I have followed the tutorial and am using AjaxMin BuildTask to minify javascript files at run time. This is working on my local machine, but it does not work on my azure environment. I have included the AjaxMin.dll and AjaxMinTask.dll in the project. I know they are being referenced correctly because I've seen a few minify errors, such as 'could not minify because target destination is read-only.' I've cleaned those errors by removing the .min.js files, which i read cannot be under source control. I am now receiving no errors server side, but the browser throws a 404 error, somefile.min.js cannot be found.

I am not sure how to trouble shoot this. Can anyone help me? thank you!
Coordinator
Feb 20, 2013 at 4:53 PM
I'm confused -- build tasks at run-time? AjaxMin isn't meant to be used at run-time; it's a build-time tool. I'm not sure what it is you're trying to do here. Can you explain a little more?
Feb 20, 2013 at 5:18 PM
Yes, Sorry. I wish to minify Javascript at build time.

I've followed this tutorial: http://www.asp.net/ajaxlibrary/AjaxMinQuickStart.ashx

I've added the following code to my web project .csproj, according to the tutorial.
<UsingTask TaskName="AjaxMin" AssemblyFile="$(MSBuildProjectDirectory)\Build\AjaxMinTask.dll" />
  <Target Name="AfterBuild">
    <ItemGroup>
      <JS Include="**\*.js" Exclude="**\*.min.js" />
    </ItemGroup>
    <ItemGroup>
      <CSS Include="**\*.css" Exclude="**\*.min.css" />
    </ItemGroup>
    <AjaxMin JsSourceFiles="@(JS)" JsSourceExtensionPattern="\.js$" JsTargetExtension=".min.js" CssSourceFiles="@(CSS)" CssSourceExtensionPattern="\.css$" CssTargetExtension=".min.css" />
  </Target>
This works fine on my local machine, but it does not work with on the azure environment, the .min.js files are not written on the azure machine.
I've included the AjaxMin.dll and AjaxMinTask.dll in the web project under folder named Build.

I've tried modifying this code to <JS Include="***.js" /> (Removed the exclude) and I can see the .min.js files if i create a deployment package and unzip it, but I still get a 404 error on the azure site when the webpage tries to load the .min.js file.
The solution also has an azure cloud service project, which is used for some configuration settings. I haven't made any changes to that. I don't see any build errors and I'm not sure what i am missing.

thank you.