-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
BuildIisNativeProjects -> UseIisNativeAssets #39655
Conversation
Directory.Build.props
Outdated
@@ -220,7 +220,7 @@ | |||
<MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\Mvc.Testing\src\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets> | |||
<_MvcTestingTasksAssembly>$(ArtifactsBinDir)\Microsoft.AspNetCore.Mvc.Testing.Tasks\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Testing.Tasks.dll</_MvcTestingTasksAssembly> | |||
<!-- IIS native projects can only be built on Windows for x86/x64/ARM64. --> | |||
<BuildIisNativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'ARM64') ">true</BuildIisNativeProjects> | |||
<UpdateIisNativeAssets Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'ARM64') ">true</UpdateIisNativeAssets> |
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.
IIS native projects can only be built on Windows, but also they are always built on Windows. When can this property be false on Windows? I currently set it when I build Kestrel for instance, even from a fresh clone. Can some project build.cmd files set it to false
safely?
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 believe you can just pass in -noBuildNative if you explicitly want to skip native code building as that turns off. But hence the rename here, there's a bunch of projects that need to update iis native assets which is why we are renaming this to something not called build
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.
Basically projects that want to pull in ancm will have this set, and if you don't have ancm built, when it tries to update/include it, it will fail, as it should
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.
-noBuildNative
won't change most of what the property does. That switch only controls whether a native (desktop) msbuild
happens if you use one of our build.cmd or build.ps1 scripts.
The $(BuildNative)
property reflect that choice while we're building but only when building using desktop msbuild
and mainly to distinguish the scenario from -buildInstallers
/ $(BuildInstallers)
(the other case where we build using desktop msbuild
).
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.
Looks like you missed a couple?
@wtgodbe can you point to the ones you saw that I missed? main is failing due to a bad PR pranav merged, so the checks will be red until that's fixed |
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 I understand the word "update" in this context though I agree Build
isn't correct much of the time. I suggest picking another word to start the name.
The property does a bunch of stuff. Mostly it
- controls whether managed projects use (pack, copy around, …) native assemblies built in an earlier eng/build.ps1 phase or separate
-buildNative
build - controls how Microsoft.AspNetCore.App.Runtime brings in aspnetcorev2_inprocess.dll when that project is built using desktop
msbuild
ordotnet msbuild
(a corner case but a supported one)
Directory.Build.props
Outdated
@@ -220,7 +220,7 @@ | |||
<MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\Mvc.Testing\src\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets> | |||
<_MvcTestingTasksAssembly>$(ArtifactsBinDir)\Microsoft.AspNetCore.Mvc.Testing.Tasks\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Testing.Tasks.dll</_MvcTestingTasksAssembly> | |||
<!-- IIS native projects can only be built on Windows for x86/x64/ARM64. --> | |||
<BuildIisNativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'ARM64') ">true</BuildIisNativeProjects> | |||
<UpdateIisNativeAssets Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'ARM64') ">true</UpdateIisNativeAssets> |
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.
-noBuildNative
won't change most of what the property does. That switch only controls whether a native (desktop) msbuild
happens if you use one of our build.cmd or build.ps1 scripts.
The $(BuildNative)
property reflect that choice while we're building but only when building using desktop msbuild
and mainly to distinguish the scenario from -buildInstallers
/ $(BuildInstallers)
(the other case where we build using desktop msbuild
).
Unless you have a specific suggestion @dougbu I'm going to stick with update since the main motivation was just to move away from build since its not even really building the native bits, update conveys the notion that its trying to 'update' ancm/native bits, that's the idea anyways. Happy to switch it to something better if you have any ideas, given that this isn't something we are going to set/use, just untangling this from build seems good enough |
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.
@wtgodbe can you point to the ones you saw that I missed? main is failing due to a bad PR pranav merged, so the checks will be red until that's fixed
Ah, in that case this looks fine to me
My suggestion would be "Use…` since it doesn't change ("update") the native bits at all. "Pack…" would also make sense but may be too specific. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Okay so UpdateIisNativeAssets -> UseIisNativeAssets |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Fixes #39654
Clarifies what this property actually does