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

System.ArgumentException: SyntaxTree is not part of the compilation #527

Closed
Peter-Simpson opened this issue Feb 18, 2020 · 6 comments
Closed
Labels
C# -> VB Specific to C# -> VB conversion

Comments

@Peter-Simpson
Copy link

Hi,

I'm using 7.8 and tried to convert a small C# project to VB that is part of a much larger solution and received the exception message below that displays a message: " System.ArgumentException: SyntaxTree is not part of the compilation Parameter name syntaxtree".

The output window just had the text "Converting ASCOM.Utilities.Support...".

Any thoughts?

Thanks, Peter

image

@GrahamTheCoder
Copy link
Member

Thanks for posting. The stack trace should be enough to fix the bug. I'll try to take a look soon. It's probably something like you've declared a names pace also used in a different project, but used different casing.

@GrahamTheCoder GrahamTheCoder added the C# -> VB Specific to C# -> VB conversion label Feb 18, 2020
GrahamTheCoder added a commit that referenced this issue Feb 18, 2020
(i.e. Even without the "fix" added, it doesn't repro)
@GrahamTheCoder
Copy link
Member

I can't reproduce the issue, but I have a possible fix in master. You can uninstall your current build and try a CI build here: https://icsharpcode.visualstudio.com/icsharpcode-pipelines/_build/results?buildId=922&view=artifacts&type=publishedArtifacts or run from source if you'd like to test. Thanks!

@Peter-Simpson
Copy link
Author

Peter-Simpson commented Feb 18, 2020 via email

@Peter-Simpson
Copy link
Author

Peter-Simpson commented Feb 19, 2020 via email

@GrahamTheCoder
Copy link
Member

GrahamTheCoder commented Feb 19, 2020

Hi Peter, it sounds like you may now be hitting #524 which I was in dire need of a repro for, so this will be very helpful. I'll try to look into it in the next few days. Thanks!

I assume it's ASCOM.Utilities.vbproj that is showing the issue?

@GrahamTheCoder
Copy link
Member

GrahamTheCoder commented Feb 20, 2020

Hi @Peter-Simpson, I just ran the converter on the whole solution's VB to C# in about 10 minutes. Here are just the changed files that you could unzip at the base directory in case it's helpful:
ASCOMPlatform - Copy_3360d902608377c83f337039707434e324947b28.zip

Since it worked, I suspect something deeper is going on with VS software versions (I'm running 16.5 preview 2), hardware, or antivirus scanning. I've posted more about it here:
#524 (comment)
I'd really appreciate it if you could provide some of the info I talk about there, or even just RAM amount and whether you have an SSD as the system drive / place the conversion is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# -> VB Specific to C# -> VB conversion
Projects
None yet
Development

No branches or pull requests

2 participants