Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.2.1" targetFramework="net461" />
<package id="CSharpAsyncGenerator.CommandLine" version="0.11.0" targetFramework="net461" />
<package id="vswhere" version="2.1.4" targetFramework="net461" />
<package id="gitreleasemanager" version="0.7.0" targetFramework="net461" />
</packages>
2 changes: 2 additions & 0 deletions default.build
Original file line number Diff line number Diff line change
Expand Up @@ -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

</exec>
</target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public async Task MergeEntityWithNonNullableEntityNullAsync()
await (session.MergeAsync(route, cancellationToken));
Assert.Fail("should have thrown an exception");
}
catch (OperationCanceledException) { throw; }
catch (Exception ex)
{
Assert.That(ex, Is.TypeOf(typeof(PropertyValueException)));
Expand Down
1 change: 1 addition & 0 deletions src/NHibernate.Test/Async/DebugConnectionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public override async Task<DbConnection> GetConnectionAsync(CancellationToken ca
connections.TryAdd(connection, 0);
return connection;
}
catch (OperationCanceledException) { throw; }
catch (Exception e)
{
throw new HibernateException("Could not open connection to: " + ConnectionString, e);
Expand Down
Loading