Skip to content

Add missing IsUnitTestProject to StringTools.UnitTests.net35#12697

Merged
YuliiaKovalova merged 8 commits into
mainfrom
dev/ygerges/add-missing
Oct 27, 2025
Merged

Add missing IsUnitTestProject to StringTools.UnitTests.net35#12697
YuliiaKovalova merged 8 commits into
mainfrom
dev/ygerges/add-missing

Conversation

@Youssef1313

@Youssef1313 Youssef1313 commented Oct 25, 2025

Copy link
Copy Markdown
Member

Arcade sets this property by naming convention, which doesn't apply to this project.

See https://github.com/dotnet/arcade/blob/f11f9fc40850209eb01a890dabd5e7d7506c7b4e/src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.props#L16

This project was previously not run in CI at all because of this.

This is from the latest build on main:

image

which makes sense based on the condition in https://github.com/dotnet/arcade/blob/f11f9fc40850209eb01a890dabd5e7d7506c7b4e/src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.targets#L35

Additionally, this can easily be verified by looking at build artifact and noticing that there are no trx files for this project.

This also has an impact on signing the assembly:

<PropertyGroup Condition="'$(IsUnitTestProject)' != 'true'">
<StrongNameKeyId>Microsoft</StrongNameKeyId>
</PropertyGroup>
<PropertyGroup Condition="'$(IsTestLibrary)' == 'true' or '$(IsUnitTestProject)' == 'true'">
<StrongNameKeyId>MSBuildTest</StrongNameKeyId>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Test.snk</AssemblyOriginatorKeyFile>
<PublicKey>002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4</PublicKey>
<PublicKeyToken>9d77cc7ad39b68eb</PublicKeyToken>
</PropertyGroup>

(as well as collecting code coverage)

In addition, any property conditions around IsTestProject needs to be during targets. It's very early to do that in props, because the property can be altered by the project itself.

Copilot AI review requested due to automatic review settings October 25, 2025 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the IsUnitTestProject property to the StringTools.UnitTests.net35.csproj file. The Arcade SDK typically sets this property automatically based on naming conventions, but this project's name doesn't match the expected pattern, requiring an explicit property declaration.

Key Changes

  • Added <IsUnitTestProject>true</IsUnitTestProject> to align with Arcade SDK test project requirements

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