rb29
rb29

Reputation: 1

How to fix a CS0281 error on build server

First off everything builds fine locally. However when running a build on check-in the pipeline throws this error.

##[error]ABC\ABC.Test\BAL\DataModels\DataModelSupport.cs(200,25): Error CS0281: Friend access was granted by 'ABC.DAL, Version=2.10.3730.1641, Culture=neutral, PublicKeyToken=abc123', but the public key of the output assembly ('0012a1b2') does not match that specified by the InternalsVisibleTo attribute in the granting assembly.

In the error the output assembly key listed, the 0012a1b2, does not match what I put in the InternalsVisibleTo. I have checked a few times using sn -p to generate the snk and then sn -tp to get the output. When I do that the key is much longer than what is in the error message.

The only other thing changed in the pipeline recently was that I switched the Visual Studio Version to Visual Studio 2022. It all works OK if I set that down to Visual Studio 2013. Is there something else to change?

Upvotes: 0

Views: 102

Answers (0)

Related Questions