Closed bryanparke closed 6 years ago
I learned from some other issues that this error is happening when I do a Preview Transformation because the preview function appears to only work if the transform has an associated build / project configuration. There are 2 "preview transform" options when you right click a transform file, the first one fails (no error), the second one fails with the error mentioned in the original post. However, if I add a project config that matches the name of the transform, the preview works.
The v2.5.48 release notes indicate that you have to manually uninstall the old version of SlowCheetah.
Would not uninstalling the old version cause the issue where you'd see two "Preview Transform" menu items?
@bryanparke If I'm not mistaken, that issue is with XDT, but your file is JSON. As @icnocop mentioned, you probably have the older install version of SlowCheetah that only works with XML files. Can you verify that you have the latest version of the extension (3.0.61)?
I'm having the same issue in an app that has never had the old version of Slow Cheetah. I added a brand new json file
@TheMrAnderson what version of the SlowCheetah nuget package is installed in your project? The correct nuget package is Microsoft.VisualStudio.SlowCheetah which contains versions 3.0.56 and above, that support JSON transformations
My apologies. I thought this issue was caused by Slow Cheetah, but it was caused by a previous extension I tried to use to transform JSON files. It wrote some config lines in my .csproj file that I had to manually remove. Once those were gone, Slow Cheetah did it's job.
Closing for now, since it seems to be fixed. Please reopen if more assistance is needed.
With any .json file that I attempt to preview the transform, I get the above error. Here is the sample input json:
{ "A" : { "A1" : "11" }, "B" : { "1B" : 12, "2B" : 22 }, "C" : { "C1" : 31, "C2" : 32 } }
No matter what, when I choose to preview the transform, the error is always "Data at the root level is invalid. Line 1, position 1." It is as if it doesn't work with JSON files and is expecting XML? Taking a wild guess.