Skip to content

Conversation

EamonHetherton
Copy link
Contributor

@EamonHetherton EamonHetherton commented Apr 30, 2018

And regenerate the Async classes.
See #1672.

@hazzik hazzik changed the title updated CSharpAsyncGenerator.CommandLine to v 0.11.0 to fix #1672 an… Update CSharpAsyncGenerator.CommandLine to v 0.11.0 to fix #1672 an… Apr 30, 2018
@fredericDelaporte
Copy link
Member

Since you have added maca88/AsyncGenerator#96, I guess this should be considered WIP for now.

@fredericDelaporte fredericDelaporte changed the title Update CSharpAsyncGenerator.CommandLine to v 0.11.0 to fix #1672 an… WIP - Update AsyncGenerator to v0.11.0 to fix #1672 Apr 30, 2018
@@ -50,6 +50,8 @@
<arg value="msbuild" />
<arg value="/t:Restore" />
<arg value="${root.dir}/src/NHibernate.sln" />
<arg value="/p:Platform=&quot;Any CPU&quot;" />
<arg value="/p:Configuration=&quot;${build.config}&quot;"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because without them I get the following when trying to generate the async classes (menu option H. Generate async code)

solution-restore:

     [exec] Starting 'dotnet (msbuild /t:Restore ./src/NHibernate.sln)' in 'C:\Git\nhibernate-core'
     [exec] Microsoft (R) Build Engine version 15.6.82.30579 for .NET Core
     [exec] Copyright (C) Microsoft Corporation. All rights reserved.
     [exec]
     [exec] C:\Git\nhibernate-core\src\NHibernate.sln.metaproj : error MSB4126: The specified solution configuration "Debug|AnyCPU" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [C:\Git\nhibernate-core\src\NHibernate.sln]

BUILD FAILED

it was the easiest solution I could find.

Copy link
Member

@fredericDelaporte fredericDelaporte Apr 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check your environment variables. You likely have a configuration or platform one defined in the command line you use for generating async code. They must be unset to avoid having their values messing with MsBuild parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a reboot it worked again without the specific platform and configuration switches. However given that these are explicitly specified for the build, is it not also worthwhile doing so for the solution-restore step? Would avoid similar unexpected issues in future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granted. Still a bit unrelated to this PR and commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true

@nhibernate nhibernate deleted a comment from maca88 Apr 30, 2018
@nhibernate nhibernate deleted a comment from maca88 Apr 30, 2018
hazzik added a commit to hazzik/nhibernate-core that referenced this pull request May 7, 2018
Code regenerated to add missing OperationCanceledException where required.

Fixes nhibernate#1674
fredericDelaporte added a commit to fredericDelaporte/nhibernate-core that referenced this pull request May 8, 2018
Code regenerated to add missing OperationCanceledException where
required.

Fixes nhibernate#1674
@hazzik
Copy link
Member

hazzik commented May 8, 2018

Fixed by #1684 + #1685

@hazzik hazzik closed this May 8, 2018
@fredericDelaporte
Copy link
Member

I think we need to keep something opened, because merging 5.1.x in master will currently only temporarily fix the trouble: the master AsyncGenerator is a 0.10 version which does not yet handle properly cancellation exceptions. When merging, I do not think we should downgrade the generator to 0.8.2.4, so the next AsyncGeneration would lose the proper exception handling.

@hazzik
Copy link
Member

hazzik commented May 9, 2018

the master AsyncGenerator is a 0.10 version

But the master is on 0.8.2.1, so this can be really closed.

@hazzik hazzik closed this May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants