Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to control the version of aspnet_compiler #13

Open
paladanyCluj opened this issue Jun 20, 2019 · 1 comment
Open

Support to control the version of aspnet_compiler #13

paladanyCluj opened this issue Jun 20, 2019 · 1 comment

Comments

@paladanyCluj
Copy link

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
Copy link

Bouke commented Jun 25, 2021

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="" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants