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

Building latest 1.10.x from command line #8758

Closed
dmhiggins23 opened this issue Feb 16, 2024 · 3 comments · Fixed by #8764
Closed

Building latest 1.10.x from command line #8758

dmhiggins23 opened this issue Feb 16, 2024 · 3 comments · Fixed by #8764
Milestone

Comments

@dmhiggins23
Copy link
Contributor

I'm just updating my orchard application. It compiles in Visual Studio 2022, but does not compiled using the command line build.

It give a syntax error message "; expected" for the following line

secureSocketOptions = smtpConfiguration.EncryptionMethod switch {

I believe that there is a version conflict between the compiler that is being called from the command line and the version of the compiler required to handle the c# language constructs used in SmtpMessageChannel.cs (version 8, I believe). I believe that ClickToBuild.cmd determines which version of msbuild to use, and in my case it is using a version that does not support the more advanced language feature.

Any suggestions on whether this is due to version issues on my computer or if the ClickToBuild.cmd file can be updated to resolve the issue?

Thank you!

@sebastienros sebastienros added this to the 1.10.x milestone Feb 29, 2024
@sebastienros
Copy link
Member

Looks like we need to update this line https://github.com/OrchardCMS/Orchard/blob/dev/ClickToBuild.cmd#L6 to search within 19.0 too. And the lines after to take the result into account. Can you try it and make a PR if that works?

@dmhiggins23
Copy link
Contributor Author

dmhiggins23 commented Mar 1, 2024

I've create a pull request. Since VS2017 (MSBuild v15) and earlier can no longer compile the newer c# language features used in SmtpMessageChannel.cs, I removed these as build alternatives. I also made a change to the file SmtpSettingsPart.cs so that VS2019 (MSBuild v16) could still compile orchard. In the process, I noticed that the version of nuget.exe no longer worked, so I updated it to the latest from https://www.nuget.org/downloads (v 6.9.1).

@BenedekFarkas
Copy link
Member

Fixed by #8764

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

Successfully merging a pull request may close this issue.

3 participants