Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RT0999: Input string was not in a correct format. #254

Open
j-mok opened this issue Mar 1, 2023 · 0 comments
Open

RT0999: Input string was not in a correct format. #254

j-mok opened this issue Mar 1, 2023 · 0 comments

Comments

@j-mok
Copy link

j-mok commented Mar 1, 2023

RT version: 1.6.1
.NET 6

I've been getting this when building:

Reinforced.Typings : Unexpected error RT0999: Input string was not in a correct format.

After some investigation I've found that what sparked a cascade of problems is a newline in my Reinforced.Typings.settings.xml (I didn't do it on purpose, it was a hard wrap from the formatter):

<RtConfigurationMethod>MyFancyReinforcedTypingsConfigurationWithALongClassName.Configure
    </RtConfigurationMethod>

From what I understand the MsBuild <RtCli> task puts all input props (including whitespace) in a temp file that is then parsed line-by-line by the command line tool. The extra newline in this prop (and possibly others?) seems to break the parsing, as the parses assumes one parameter per line. The error directly comes from here:

result.SuppressedWarnings = tr.ReadLine();
result.SourceAssemblies = new string[int.Parse(tr.ReadLine())];
for (int i = 0; i < result.SourceAssemblies.Length; i++)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant