Closed autofire372 closed 3 years ago
The newest update of Visual Studio 2019, version 16.9.0, appears to have problems with C#9's implicit casting of bytes. You can revert to version 16.8.6 by downloading the installer here and choosing the appropriate version.
Got it. Took a bit to learn how to wield MSBuild from the dev console, but running "MSBuild -help" got things sorted.
If someone is using the VS Community edition, using any recent vsCommunity.exe with these argument will work too: --installChannelUri "https://aka.ms/vs/16/release/170920363-646948117/channel"
Describe the bug The PKHeX Core project cannot compile. Visual Studio spews multiple CS0266/CS1503 errors when trying. This of course causes the other projects to fail.
To Reproduce Steps to reproduce the behavior:
Error CS1503 Argument 3: cannot convert from 'int' to 'ushort' PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Mail\Mail5.cs 31 Active Error CS1503 Argument 3: cannot convert from 'int' to 'ushort' PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Mail\Mail4.cs 34 Active Error CS1503 Argument 5: cannot convert from 'int' to 'ushort' PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Mail\Mail2.cs 26 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen8\TrainerCard8.cs 310 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen8\TrainerCard8.cs 104 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen8\TrainerCard8.cs 98 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen8\TrainerCard8.cs 92 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen8\TitleScreen8.cs 70 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\WormholeInfoReader.cs 13 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\QR7.cs 66 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\QR7.cs 65 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\JoinFesta7.cs 48 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\FestaFacility.cs 23 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\Daycare7.cs 28 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\Daycare7.cs 17 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen7\BoxLayout7.cs 128 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen5\EntreeForest.cs 64 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\Substructures\Gen3\Roamer3.cs 62 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV6XY.cs 97 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV6XY.cs 96 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV6AO.cs 178 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV6AO.cs 160 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV5.cs 151 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV5.cs 104 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 626 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 625 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 624 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 623 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 619 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 618 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 617 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 614 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 613 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 612 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4.cs 611 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV3.cs 894 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV3.cs 886 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV3.cs 881 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV3.cs 877 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV2.cs 435 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV2.cs 407 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV1.cs 294 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV1.cs 166 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\XK3.cs 72 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\Util\SpeciesConverter.cs 21 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\Shared\IFormArgument.cs 99 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\Shared\GBPKML.cs 101 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\PK5.cs 248 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\PB7.cs 296 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 178 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 177 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 176 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 169 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 168 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 167 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 166 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 165 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 164 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 163 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 162 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 161 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 160 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 159 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PKM\CK3.cs 158 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\PersonalInfo\PersonalInfoSM.cs 34 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WC8.cs 182 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WC8.cs 166 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WC7.cs 220 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WC7.cs 114 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WC6.cs 178 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WC6.cs 110 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WB7.cs 208 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\WB7.cs 116 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\PL6.cs 138 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\PL6.cs 30 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\PGF.cs 143 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\MysteryGifts\PGF.cs 86 Active Error CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Editing\CommonEdits.cs 255 Active Error CS0266 Cannot implicitly convert type 'int' to 'ushort'. An explicit conversion exists (are you missing a cast?) PKHeX.Core (netstandard2.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Core\Saves\SAV4BR.cs 244 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Core\bin\Release\net46\PKHeX.Core.dll' could not be found PKHeX.WinForms (net46) C:\Emulation\Tools\PKHeX\source\PKHeX.WinForms\CSC 1 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Core\bin\Release\net46\PKHeX.Core.dll' could not be found PKHeX.Drawing (net5.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Drawing\CSC 1 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Core\bin\Release\netstandard2.0\PKHeX.Core.dll' could not be found PKHeX.WinForms (net46) C:\Emulation\Tools\PKHeX\source\PKHeX.WinForms\CSC 1 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Core\bin\Release\netstandard2.0\PKHeX.Core.dll' could not be found PKHeX.Core.Tests C:\Emulation\Tools\PKHeX\source\Tests\PKHeX.Core.Tests\CSC 1 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Core\bin\Release\netstandard2.0\PKHeX.Core.dll' could not be found PKHeX.Drawing (net5.0) C:\Emulation\Tools\PKHeX\source\PKHeX.Drawing\CSC 1 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Drawing\bin\Release\net46\PKHeX.Drawing.dll' could not be found PKHeX.WinForms (net46) C:\Emulation\Tools\PKHeX\source\PKHeX.WinForms\CSC 1 Active Error CS0006 Metadata file 'C:\Emulation\Tools\PKHeX\source\PKHeX.Drawing\bin\Release\net5.0\ref\PKHeX.Drawing.dll' could not be found PKHeX.WinForms (net46) C:\Emulation\Tools\PKHeX\source\PKHeX.WinForms\CSC 1 Active
Expected behavior PKHeX should compile with no errors.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.