3 Errors On CSVConverterWindow.cs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
WakeArray
Posts: 5
Joined: Mon Apr 27, 2020 2:13 pm

3 Errors On CSVConverterWindow.cs

Post by WakeArray »

Error 1:

Code: Select all

The type 'InvalidDataException' exists in both 'CTNLayer, Version=2019.2.7146.36440, Culture=neutral, PublicKeyToken=null' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
error CS0433: Assets\Plugins\Pixel Crushers\Dialogue System\Scripts\Editor\Tools\Importers\CSV\CSVConverterWindow.cs(209,36)
Error 2:

Code: Select all

The type 'InvalidDataException' exists in both 'CTNLayer, Version=2019.2.7146.36440, Culture=neutral, PublicKeyToken=null' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
error CS0433: Assets\Plugins\Pixel Crushers\Dialogue System\Scripts\Editor\Tools\Importers\CSV\CSVConverterWindow.cs(257,43)
Error 3:

Code: Select all

The type 'InvalidDataException' exists in both 'CTNLayer, Version=2019.2.7146.36440, Culture=neutral, PublicKeyToken=null' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
error CS0433: Assets\Plugins\Pixel Crushers\Dialogue System\Scripts\Editor\Tools\Importers\CSV\CSVConverterWindow.cs(480,57)
They're all basically the same error and are upset at the same repeated line of code:

Code: Select all

throw new InvalidDataException("Line not recognized: " + line);
The STNLayer that the errors are referencing is a DLL file from a CrossTales plugin called DJ Pro that lets me easily play music from the local device storage.

Googling didn't help and no one seems to have posted about this before on this forum, so I assume I'm the only newb to have put these two plugins together in the same project. Hopefully I don't need to just say screw it to the DJ Pro plugin, but if that's the case, so be it.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by Tony Li »

It looks like it's conflicting with .NET's built-in System.IO.InvalidDataException and defining the same class in the global namespace.

In CSVConverterWindow.cs, change all 3 occurrences of InvalidDataException to System.IO.InvalidDataException. This should work around the issue. I'll make the same change in the next version, too.
User avatar
WakeArray
Posts: 5
Joined: Mon Apr 27, 2020 2:13 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by WakeArray »

Thanks for the quick reply. I actually did try that, I've tried it again, saved and shutdown the project to see if it made any difference, and still the errors persist. Same errors with no change.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by Tony Li »

As a test, what happens if you delete (or entirely comment out) the whole CSVConverterWindow.cs script?

Also, I think you're going to have to report this to Stefan so he can address the source of the conflict.
User avatar
WakeArray
Posts: 5
Joined: Mon Apr 27, 2020 2:13 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by WakeArray »

I found that the CTNLayer source code was provided with the project so I could fix and recompile it as needed, though looking though the entire project I can only find 5 references to it throwing the InvalidDataException the same way CSVConverterWindow.cs does and nothing redefining it. The two scripts that make use of it are using System and System.IO while creating a namespace called NLayer.Decoder. I'm afraid I'm a little too unskilled in C# and coding in general to understand why this is causing an issue because to me it doesn't seem like it should be.
User avatar
WakeArray
Posts: 5
Joined: Mon Apr 27, 2020 2:13 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by WakeArray »

Tony Li wrote: Mon Apr 27, 2020 4:11 pm As a test, what happens if you delete (or entirely comment out) the whole CSVConverterWindow.cs script?
Seems it's quite happy work without the CSVConverterWindow.cs script for the time. Not sure if there will be more errors later on, but I'll update this thread if I see any come from this.

Thanks :)
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by Tony Li »

Sounds good. Since CSVConverterWindow references the standard System.IO.InvalidDataException, it gets pulled into the compilation process. But CTNLayer also defines its own InvalidDataException, which causes a conflict between the two. Not much more can be done on the Dialogue System side. I'll change CSVConverterWindow to throw an entirely different exception such as the generic System.Exception. That's just eliminating the Dialogue System from the issue, though, not resolving the issue itself.
User avatar
WakeArray
Posts: 5
Joined: Mon Apr 27, 2020 2:13 pm

Re: 3 Errors On CSVConverterWindow.cs

Post by WakeArray »

Sounds good, thanks for all the help. I'll see if the CrossTales team can update their tool to make it not have an issue as well.
Post Reply