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

Upgrade to net8-windows #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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: 2 additions & 0 deletions SolutionInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
Copy link
Member

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...

[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("OSPSuite.DataBinding.Tests")]
[assembly: SupportedOSPlatform("windows")]
Copy link
Member Author

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.

2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
configuration: Debug
image: Visual Studio 2019
image: Visual Studio 2022

environment:
app_version: '3.0.0'
Expand Down
87 changes: 12 additions & 75 deletions src/OSPSuite.DataBinding/OSPSuite.DataBinding.csproj
Copy link
Member Author

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.

Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2A29ACC0-9E37-4C97-8814-5F247C66B127}</ProjectGuid>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OSPSuite.DataBinding</RootNamespace>
<AssemblyName>OSPSuite.DataBinding</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -33,68 +17,26 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\OSPSuite.DataBinding.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="OSPSuite.Utility, Version=4.0.0.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\OSPSuite.Utility.4.0.0.4\lib\netstandard2.0\OSPSuite.Utility.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq">
<Reference Update="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<Reference Update="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="ControlEnableElementBinder.cs" />
<Compile Include="Controls\ComboBoxElementBinder.cs" />
<Compile Include="Controls\LabelBinder.cs" />
<Compile Include="Controls\TextBoxBinder.cs" />
<Compile Include="ElementBinderExtensions.cs" />
<Compile Include="IBinder.cs" />
<Compile Include="ListElementBinder.cs" />
<Compile Include="Core\PropertyBinderNotifier.cs" />
<Compile Include="ElementBinderValidator.cs" />
<Compile Include="IElementBinder.cs" />
<Compile Include="ScreenToElementBinder.cs" />
<Compile Include="ListElementBinderExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScreenBinder.cs" />
<Compile Include="ScreenBinderExtensions.cs" />
<Compile Include="ElementBinder.cs" />
<Compile Include="ScreenToElementBinderExtensions.cs" />
<Compile Include="PropertyValueSetEventArgs.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
Expand All @@ -109,17 +51,12 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="OSPSuite.DataBinding.nuspec">
<None Update="OSPSuite.DataBinding.nuspec">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
</Project>
7 changes: 0 additions & 7 deletions src/OSPSuite.DataBinding/Properties/AssemblyInfo.cs

This file was deleted.

4 changes: 0 additions & 4 deletions src/OSPSuite.DataBinding/packages.config

This file was deleted.

135 changes: 14 additions & 121 deletions tests/OSPSuite.DataBinding.Starter/OSPSuite.DataBinding.Starter.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F9880840-16A0-45B4-87AD-2F587605BD91}</ProjectGuid>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OSPSuite.DataBinding.Starter</RootNamespace>
<AssemblyName>OSPSuite.DataBinding.Starter</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -33,107 +17,26 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<ItemGroup>
<Reference Include="OSPSuite.Utility, Version=4.0.0.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\OSPSuite.Utility.4.0.0.4\lib\netstandard2.0\OSPSuite.Utility.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<Reference Update="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Design" />
<Reference Include="System.Xml.Linq">
<Reference Update="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FormComboBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormComboBox.Designer.cs">
<DependentUpon>FormComboBox.cs</DependentUpon>
</Compile>
<Compile Include="Individual.cs" />
<Compile Include="Population.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FormComboBox.resx">
<DependentUpon>FormComboBox.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ScreenBinderSimple.resx">
<DependentUpon>ScreenBinderSimple.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="ScreenBinderSimple.cs">
<Compile Update="ScreenBinderSimple.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ScreenBinderSimple.Designer.cs">
<DependentUpon>ScreenBinderSimple.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
Expand All @@ -148,21 +51,11 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\OSPSuite.DataBinding\OSPSuite.DataBinding.csproj">
<Project>{2a29acc0-9e37-4c97-8814-5f247c66b127}</Project>
<Name>OSPSuite.DataBinding</Name>
</ProjectReference>
<ProjectReference Include="..\OSPSuite.DataBinding.Tests\OSPSuite.DataBinding.Tests.csproj">
<Project>{af1abbb0-0e07-4479-a345-80806641937d}</Project>
<Name>OSPSuite.DataBinding.Tests</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\OSPSuite.DataBinding\OSPSuite.DataBinding.csproj" />
<ProjectReference Include="..\OSPSuite.DataBinding.Tests\OSPSuite.DataBinding.Tests.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
7 changes: 0 additions & 7 deletions tests/OSPSuite.DataBinding.Starter/Properties/AssemblyInfo.cs

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions tests/OSPSuite.DataBinding.Starter/app.config

This file was deleted.

4 changes: 0 additions & 4 deletions tests/OSPSuite.DataBinding.Starter/packages.config

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Windows.Forms;
using FakeItEasy;
using OSPSuite.BDDHelper;
using OSPSuite.BDDHelper.Extensions;
Expand All @@ -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());
Copy link
Member Author

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.

Copy link
Member Author

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


_validationEngine = A.Fake<IValidationEngine>();
sut = new ElementBinderValidator<IAnInterface, string>(_validationEngine);
Expand Down
Loading