LorandBiro/OctoPack.Precompile

Support to control the version of aspnet_compiler

Opened this issue · 1 comments

First of all really nice work with this.

I want to ask if it would be possible to force the Precompile to use the aspnet_compiler.exe from a diffrent path.
So for example if needed you can use the x64 version of it.
I tried this without the Precompile package and it works ok.

"PropertyGroup
AspnetCompilerPath$(windir)\Microsoft.NET\Framework64\v4.0.30319 /AspnetCompilerPath
/PropertyGroup"

but can't make it work with the package.
any help it is appreciated

Bouke commented

I've changed the targets file (you can copy it to your repository and import manually). Add the following property:

    <OctoPackPrecompileAspNetToolPath Condition=" '$(Platform)' == 'x64'">$(windir)\Microsoft.NET\Framework64\$(FrameworkVersion)</OctoPackPrecompileAspNetToolPath>

and change the invocation:

    <AspNetCompiler PhysicalPath="$(ProjectDir)$(OctoPackPrecompileIntermediateOutputPath)"
                    TargetPath="$(ProjectDir)$(OctoPackPrecompileOutputPath)"
                    VirtualPath="/"
                    ToolPath="$(OctoPackPrecompileAspNetToolPath)" />

Note that the output path might be different as well. So change your nuspec to:

        <file src="obj\x64\Release\Precompiled\**\*.*" target="" />