-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add some msbuild magic to deploy dependent ASP.NET Core app #3
base: master
Are you sure you want to change the base?
Conversation
LegacyApi/Web.config
Outdated
@@ -22,7 +22,6 @@ | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break running in VS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, it needs to work "in-place" without a publish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?)
@@ -5,54 +5,59 @@ | |||
--> | |||
<configuration> | |||
<appSettings> | |||
<add key="webpages:Version" value="3.0.0.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Triggered! 😄
Co-authored-by: David Fowler <[email protected]>
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.