StackExchange/StackExchange.Precompilation

MsBuild injection point conflicts with OctoPack

scottt732 opened this issue · 5 comments

I have a project which is deployed via Octopus Deploy. Looking through the build logs it appears that the Octopack is building it's package earlier in the pipeline than StackExchange.Precompilation.Build.targets. It looks like you are using BuildDependsOn where they are using CompileDependsOn. I'm not sure if that's the cause. As a result, while we are pre-compiling our views during build, they aren't making it to our deployment targets.

m0sa commented

Hey. Never dealt with OctoPack before, but thanks for reporting this, since we're planing to look at OctoPack internally as well!

Actually, OctoPack.targets hooks into BuildDependsOn as well, and SE.Precompilation hooks into CompileDependsOn. The thing is, that BuildDependsOn depends on CompileDependsOn via CoreBuild -> CoreBuildDependsOn. So, assuming all the precompilation properties are set correctly it should work (SEPrecompilerSkip = false, SEPrecompilerIncludeRazor = true). My guess would be that the later is false, due to a different command / msbuild target you're running on the build server vs. locally.

I wonder how you run octopus deploy (on your build server, from msbuild, do you invoke the task directly or indirectly). A msbuild command like with args would be super useful, and an structured log of the same command would be even more useful.

m0sa commented

@scottt732 any updates on this?

Hey. Would you mind if I e-mailed this to you or would you mind describing what you're looking for. I go by my username at gmail.

Apologies. Configuration/RTFM issue on my part. Thank you for your time and for helping me get this resolved.

m0sa commented

np, glad I could help