Closed bhugot closed 7 years ago
A prior version of CG.R took that exact approach. But because MSBuild itself shares a directory with Roslyn, too often Roslyn assemblies would load from that directory instead of from my MSBuild Task's directory, leading to runtime failures because of assembly version mismatches.
That was just one side. I tried very hard to defend against that with AppDomains hosted by my task, etc., but no solution reliably worked on every platform -- except the approach of getting totally into my own process, which dotnet
offered the quickest way to do that in a xplat way.
Ok thanks for information.
Another question how do it working with Old csproj. as you can't add the DotNetCliToolReference Include="dotnet-codegen"
The current version of CG.R requires the DotNetCliToolReference
item. If you can't update to a compatible project, you can use the 0.3.x releases which did not share this requirement.
Hi,
why are you using a dotnet tools and not buildMultiTargeting http://www.natemcmaster.com/blog/2017/07/05/msbuild-task-in-nuget/
Thanks