-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade to net8-windows #11
base: main
Are you sure you want to change the base?
Conversation
[assembly: AssemblyCompany("Open Systems Pharmacology Community")] | ||
[assembly: AssemblyProduct("OSPSuite.DataBinding")] | ||
[assembly: AssemblyCopyright("Copyright � 2002-2019 - Open Systems Pharmacology Community")] | ||
[assembly: ComVisible(false)] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: InternalsVisibleTo("OSPSuite.DataBinding.Tests")] | ||
[assembly: SupportedOSPlatform("windows")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this to tell VS that all assemblies are targeting windows only, otherwise there is a lot of warnings generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the csproj files are upgraded by right click, then select Upgrade. There's a few confirmations etc, but it's automatic. You just have to pick the target.
Then you have to go back and put -windows
by hand.
I was able to run the starter ok many of the tests pass as well. There is a test named Welcome any help you can add, although, we could get away without upgrading these projects that are Windows specific for now. But, since we're doing it, let's really do it... you know? |
Appveyor is also not picking up the tests. Not sure why |
@@ -22,7 +23,8 @@ protected override void Context() | |||
A.CallTo(() => _elementToValidate.Source).Returns(_source); | |||
A.CallTo(() => _elementToValidate.PropertyName).Returns("FirstName"); | |||
A.CallTo(() => _elementToValidate.GetValueFromControl()).Returns("Toto"); | |||
_elementToValidate.ParentBinder = _screenBinder; | |||
A.CallTo(() => _elementToValidate.ParentBinder).Returns(_screenBinder); | |||
A.CallTo(() => _elementToValidate.Control).Returns(new Label()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the line needed to eliminate stack overflow exception. Looks like it was related to tests, not to the code itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appveyor still not running any tests though
The next hurdle is this: nunit won't run these tests because by default nunit3-console is started as a netcore app and cannot access the windows runtime. You can patch the runtimeconfig.json file to make it work
instead of:
Or there are ways of adding multiple frameworks. At least, this is the reason the console runner would not work for me locally. AppVeyor isn't giving too many hints. |
SolutionInfo.cs
Outdated
@@ -1,10 +1,12 @@ | |||
using System.Runtime.CompilerServices; | |||
using System.Reflection; | |||
using System.Runtime.InteropServices; | |||
using System.Runtime.Versioning; | |||
[assembly: AssemblyCompany("Open Systems Pharmacology Community")] | |||
[assembly: AssemblyProduct("OSPSuite.DataBinding")] | |||
[assembly: AssemblyCopyright("Copyright � 2002-2019 - Open Systems Pharmacology Community")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor issue: could change the copyright to ... 2002-2024...
Can you temporarily add
to the appveyor.yml? (compare https://www.appveyor.com/docs/appveyor-yml/ ) |
no luck with any additional details
|
Can you try to use the test script with the explicit call to dotnet test, e.g. like here: s. also this discussion https://help.appveyor.com/discussions/problems/9856-appveyor-not-discovering-my-xunit-tests |
No description provided.