- TeamCity: TeamCity Professional 2022.10 (build 116751)
- MSBuild 2022
- SDK style csproj files (netstandard2.0)
I'm having a problem where builds keep failing when one of the project in the solution requires access to internal classes of a different project in the same solution. While that class defines a [assembly: InternalsVisibleTo("")] attribute. That is correct because everything works in Visual Studio.
I keep getting the following errors that fail the build
C:\B\a92eea093e3c0317\Framework.Actions.Test\UnitTest1.cs(18,53): error CS0122: 'InternalTestAction<T>' is inaccessible due to its protection level
If I run the exact same MSBuild command that TeamCity uses on the same system these errors don't pop up.
.\MSBuild.exe C:\B\a92eea093e3c0317\Actions.Framework.sln @C:\T\agentTmp\1.rsp -restore -noLogo -m:1
I'm at a complete loss what can cause this different behaviours.