jjthomps
jjthomps
CC#
Created by jjthomps on 8/29/2023 in #help
❔ T4 Compiling transformation error
Hi, I'm upgrading a solution to .net 7.0. One of the projects contains T4 transformation templates. Getting the following error even though the target framework is set to net7.0 for all projects contained within the solution. Compiling transformation: The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. I have updated the tarhet sdk to net7.0 in all the projects, updated sdk version in the global.json files, deleted the vs, bin and obj directories, cleaned the solution, reopened solution, rebuilt solution, upgrade Visual Studio 2022 to the latest version but there is still an issue when I try to add a reference to system.Collections an error is displayed saying that the dll is invalid or not supported anyone got any ideas what's wrong? Thanks
10 replies