Skip to content

Conversation

@karl-sjogren
Copy link
Contributor

Problem

*.slnx files doesn't support conditional processing as described in #8784

Solution

Added *.slnx with ConditionalType.Xml in OperationConfigDefault.cs.

Checks:

  • Added unit tests

I've added tests, but I'm running into some problems.

  1. Can't build the main branch using build.sh, I'm getting a ton of IDE0055 errors all over the project.
  2. If I disable IDE0055 in editorconfig the project builds, but I get 8 failed tests in Microsoft.TemplateEngine.Edge.UnitTests, still in main.
  3. Due to the failed tests I'm not even sure if it gets to running the test I added in End2EndTests.cs.

@karl-sjogren karl-sjogren requested a review from a team as a code owner March 26, 2025 10:35
@karl-sjogren
Copy link
Contributor Author

@dotnet-policy-service agree

@karl-sjogren
Copy link
Contributor Author

CI seems to pass though, even for OSX, so not sure why it is such as problem locally for me.

Copy link
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc: @edvilme (slnxpert)

@Forgind
Copy link
Contributor

Forgind commented Mar 31, 2025

CI seems to pass though, even for OSX, so not sure why it is such as problem locally for me.

I'm not really sure why it would be failing for you locally...best guess is some random configuration thing or out-of-date files not getting updated properly. I tend to trust CI to have a nice, clean environment prior to running tests.

Copy link

@edvilme edvilme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the failed tests I'm not even sure if it gets to running the test I added in End2EndTests.cs.

Update: From this and the comments above, this leads me to believe the test was possibly not run correctly

@karl-sjogren
Copy link
Contributor Author

Due to the failed tests I'm not even sure if it gets to running the test I added in End2EndTests.cs.

Update: From this and the comments above, this leads me to believe the test was possibly not run correctly

I tried to build this on Windows now as well and got another error (this happens both in my fork and if I try the this repository so it doesn't seem to be related to my changes).

  Microsoft.TemplateEngine.Mocks net10.0 failed with 1 error(s) (1,7s)
    X:\github\templating\test\Microsoft.TemplateEngine.Mocks\MockInstallerFactory.cs(11,22): error IDE0044: Make field readonly (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044)

Maybe this is is something that changed since I got the latest .NET10 preview? It didn't have this warning for other any of the other target frameworks.

Did a quick (local) fix for that though and it builds and my tests passes on Windows so it seems to be something weird with building on my Mac. I can create a seperate issue for that if needed but it passes CI on OSX so I would say that my PR is probably fine.

@karl-sjogren karl-sjogren requested a review from edvilme April 8, 2025 14:15
Copy link

@edvilme edvilme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@edvilme edvilme merged commit bf6d102 into dotnet:main Apr 8, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants