Add some msbuild magic to deploy dependent ASP.NET Core app - #3
Add some msbuild magic to deploy dependent ASP.NET Core app#3twsouthwick wants to merge 7 commits into
Conversation
| <add name="Pages" path="*.aspx" verb="*" type="System.Web.Handlers.TransferRequestHandler" modules="AspNetCoreModuleV2" preCondition="integratedMode,runtimeVersionv4.0" /> | ||
| <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" modules="AspNetCoreModuleV2" preCondition="integratedMode,runtimeVersionv4.0" /> | ||
| </handlers> | ||
| <aspNetCore processPath="dotnet" arguments="..\Greenfield\bin\Debug\netcoreapp3.1\Greenfield.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="outofprocess" /> |
There was a problem hiding this comment.
Doesn't this break running in VS?
There was a problem hiding this comment.
We can do some transform/msbuild stuff here to cause the right config to happen in the end, can't we?
There was a problem hiding this comment.
Not sure, it needs to work "in-place" without a publish.
There was a problem hiding this comment.
We can always make this file development.web.config and convert it into web.config as part of the build with the right stuff on it.
There was a problem hiding this comment.
Remember web.config is in source control. So the goal is to avoid physical paths in this file.
There was a problem hiding this comment.
at the moment it's editing in place. Can totally change it to another path. It keeps all the paths relative.
It's using an xml transform to remove the node and add it with the correct pathing
There was a problem hiding this comment.
We could also update it to handle any of the extensions in the static output that we want to let through
There was a problem hiding this comment.
The problem is the user might have made changes to web.config and we'll blast it away
There was a problem hiding this comment.
Are you referring to the aspNetCore node? That's the only one it'll affect (at the moment). It seems like moving that to build-generated would be best since then we can update paths/etc. I can disable the web.config transform so this PR just focuses on getting things published.
There was a problem hiding this comment.
I pushed a change with what the web.config changes look like (the TransformXml task messes with whitespace :(). I like what @javiercn said about dev.web.config. Not sure how to include that, though (is that auto-included as part of the build process?)
| --> | ||
| <configuration> | ||
| <appSettings> | ||
| <add key="webpages:Version" value="3.0.0.0" /> |
Co-authored-by: David Fowler <davidfowl@gmail.com>
This change adds some targets that will publish the .NET Core app and copy the contents to the legacy output directory. This will also update the web.config to ensure the path/hosting model is correct.