Ajax minifier and Visual Studio 2008 with 3.5?

Dec 12, 2012 at 8:43 AM

I downloaded the latest AjaxMinifier (4.78) but it appears to only work for .Net 4?

Changing my project to target 4 isn't an option at this point.

Can anyone point me to a download that will work with 3.5 or a solution to this problem?

I noticed that my ToolsVersion="3.5" but i tried "4.0" and it didn't make any difference?

The error for reference that i get on build is:

error MSB4062: The "AjaxMin" task could not be loaded from the assembly C:\Program Files\MSBuild\Microsoft\MicrosoftAjax\AjaxMinTask.dll. Could not load file or assembly 'file:///C:\Program Files\MSBuild\Microsoft\MicrosoftAjax\AjaxMinTask.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.

my project contains:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\AjaxMin.tasks" />
  <Target Name="AfterBuild">
    <ItemGroup>
      <JS Include="**\*.js" Exclude="**\*.min.js;Scripts\*.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>
  

Coordinator
Dec 12, 2012 at 3:16 PM

Correct. The MSI-distributed binaries are for the .NET 4.0 framework. I also build the task for 3.5, and the EXE and DLL for 2.0 and 3.5, I just don't include them in the MSI. The nuget package has the 2.0 and 3.5 versions of the AjaxMin.dll, but not the task. I can send you the .NET3.5 version of the task now, and I'll add it to the nuget package for next time so you can continue to pull newer version as they become available.

Dec 19, 2012 at 3:16 PM

I download the last version from Nuget (4.78), but i need the task (and EXE) for 3.5 version.

Can you send me this package, please?

Thanks you

 

Coordinator
Dec 19, 2012 at 4:03 PM

I can't seem to send a ZIP file to the discussion thread. Let me see what my options are here.

Jan 29, 2013 at 5:10 PM
Edited Jan 29, 2013 at 5:10 PM

I am having the same exact issue. I have a project in VS2008 and .NET 3.5. All I need is the 3.5 version of AjaxMin.dll but it appears NuGet only works with VS2010.

Apr 23, 2013 at 10:14 AM
I fixed this problem using the old AjaxMinSetup-4.19.msi that works with 3.5, see:
https://ajaxmin.codeplex.com/releases/view/65673
Coordinator
May 7, 2013 at 11:10 PM
Starting with version 4.91, the .NET 3.5 DLLs (AjaxMin.dll and AjaxMinTask.dll) are included in the NuGet package under the tools\net35 folder.