-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Move some targets into a Directory.Build.targets file #39712
Conversation
c32b6ae
to
eada1f5
Compare
eada1f5
to
d1678d5
Compare
@adityamandaleeka could you find a reviewer for this quick fix please❔ |
/btw the bottom line here is an attempt to make the IIS projects slightly less unusual |
ace2ddc
to
9b5b80f
Compare
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" /> | ||
|
||
<PropertyGroup> | ||
<!-- Work around until we get a new WebSdk --> |
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.
@Tratcher any context about what this workaround comment is talking about?
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 wondered about this too❕
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.
LOL, no, but it happened back in 3.0 so it's probably safe to say we got a fresh WebSdk update since then 😁.
dougbu@a474a05
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 current default (in Microsoft.NET.Sdk.Web.ProjectSystem.targets) is inprocess
and this override may make sense still. Let's use this space to answer
- Should we update InProcessNewShimWebSite.csproj and InProcessWebSite.csproj instead of leaving this setting here❔
- Did I break anything by effectively removing this setting from NativeIISSample.csproj and ServerComparison.TestSites.csproj❔
- Does the setting have any impact in projects that import testsite.props but don't use
Microsoft.NET.Sdk.Web
❔ - What are the best hosting models for each of the affected projects❔
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.
On (1), I suspect (given the names), the current setting is unhelpful for both InProcess*WebSite projects. Suggest we simply delete these lines and focus on the other projects.
On (2), "break" is probably too strong a word but I did change things. Good thing tests are still working.
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 good assuming you tried running the tests locally (dotnet test) and in VS test explorer (note make sure you run in an administrator powershell)
I am unable to test locally even on main and can't find instructions about which IIS components I may be missing. Suggestions❔ In the meantime, I'll see whether the IIS Express functional tests work better for me. |
You'll need regular IIS enabled, I think you just will need to make sure IIS is installed/enabled, and have the hosting bundle, https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-6.0 might be a good verification, basically make sure you can publish to IIS in VS and that is what the tests need to work |
- tests have for a while worked only after `publish` anyhow nits: - remove outdated comment - use `$(DotNetRoot)` property
- not used outside IIS testassets folder
- this reverts some of commit 4bb1920bfa4f - leave nits alone
9b5b80f
to
20414d6
Compare
I reverted the |
<Import Project="..\..\..\..\build\testsite.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> | ||
<AssemblyName>InProcessWebSite</AssemblyName> | ||
<TestAssetOutputName>InProcessNewShimWebSite</TestAssetOutputName> |
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.
Another nit: Setting matches the default.
@@ -2,7 +2,7 @@ | |||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | |||
|
|||
<PropertyGroup> | |||
<!-- Tests do not work on Helix or when bin/ directory is not in project directory due to undeclared dependency on test content. --> | |||
<!-- Local testing does not work when bin/ directory is not in project directory due to deployer expectations. --> |
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.
nit: I don't think this was about "test content". Problem seems rooted in the various deployers.
Well, even w/ IIS Express installed and much of the previous change reverted, I'd like to try IIS but obviously don't have all the components I need. Trying a complete removal of the "Internet Information Services" fix, removing the hosting bundle, and rebooting before a retry… |
This didn't help much. Getting errors like My leaning is toward giving up on local testing unless using IIS Express until and unless I decide to take another crack at finally migrating these tests to understand artifacts/bin/. Any reason not to merge this PR in the meantime❔ |
I wouldn't worry too much about getting IIS working as long as some IISExpress tests were working for you locally with your change. Its fine if you merge this as is, if things are completely broken locally for me after picking up this PR, I'll fix/revert at that point |
Revert "Move some targets into a Directory.Build.targets file (#39712)" This reverts commit 209ff13. Bring back directory build Revert "Revert fx_ver rename and use aspnet namespace" This reverts commit d9c3d28. Revert "Revert "Revert fx_ver rename and use aspnet namespace"" This reverts commit e2b34b88cde041b9e4bf1137eb4c07b9788b2232. Revert "Bring back directory build" This reverts commit ad9007e3ef6b7fce1c3677aa8cfa891c23fea32e. Revert "Revert "Move some targets into a Directory.Build.targets file (#39712)"" This reverts commit e7937bc.
Minor cleanup More Cleanup/CommonLibTests Move more settings into Common.Settings More build cleanup Revert stuff Revert "Revert stuff" This reverts commit 7faa512f84631f7ef7588e498c6a70c62c8ea350. Undo -nobuild changes to iis tests to fix running tests locally Revert "Move some targets into a Directory.Build.targets file (#39712)" This reverts commit 209ff13. Bring back directory build Revert "Revert fx_ver rename and use aspnet namespace" This reverts commit d9c3d28. Revert "Revert "Revert fx_ver rename and use aspnet namespace"" This reverts commit e2b34b88cde041b9e4bf1137eb4c07b9788b2232. Revert "Bring back directory build" This reverts commit ad9007e3ef6b7fce1c3677aa8cfa891c23fea32e. Revert "Revert "Move some targets into a Directory.Build.targets file (#39712)"" This reverts commit e7937bc. Unskip some more local tests
nits:
$(DotNetRoot)
property