upgrade to .net6 part 1

This commit is contained in:
2022-06-07 12:47:34 +02:00
parent 675dd6594a
commit 446bd0111c
8 changed files with 24 additions and 29 deletions

View File

@@ -1,5 +1,7 @@
Imports System.Windows.Forms Imports System.Windows.Forms
Imports OpenTK Imports OpenTK
Imports OpenTK.Mathematics
Namespace CameraN Namespace CameraN

View File

@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFramework>net48</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DocumentationFile>Pilz.Drawing.Drawing3D.OpenGLFactory.xml</DocumentationFile> <DocumentationFile>Pilz.Drawing.Drawing3D.OpenGLFactory.xml</DocumentationFile>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>
@@ -25,18 +26,15 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="OpenTK.Input" Version="4.7.2" />
<PackageReference Include="OpenTK.WinForms" Version="4.0.0-pre.6" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" /> <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" /> <PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="OpenTK" Version="3.2" /> <PackageReference Include="OpenTK" Version="4.7.2" />
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" /> <PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="Microsoft.VisualBasic" />
<Import Include="System" /> <Import Include="System" />
@@ -52,9 +50,7 @@
<Compile Update="Preview\ModelPreview.Designer.vb"> <Compile Update="Preview\ModelPreview.Designer.vb">
<DependentUpon>ModelPreview.vb</DependentUpon> <DependentUpon>ModelPreview.vb</DependentUpon>
</Compile> </Compile>
<Compile Update="Preview\ModelPreview.vb"> <Compile Update="Preview\ModelPreview.vb" />
<SubType>Form</SubType>
</Compile>
<Compile Update="My Project\Application.Designer.vb"> <Compile Update="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon> <DependentUpon>Application.myapp</DependentUpon>

View File

@@ -6,10 +6,11 @@ Imports OpenTK
Imports OpenTK.Graphics.OpenGL Imports OpenTK.Graphics.OpenGL
Imports Pilz.S3DFileParser Imports Pilz.S3DFileParser
Imports Point = System.Drawing.Point Imports Point = System.Drawing.Point
Imports KeyboardState = OpenTK.Input.KeyboardState
Imports Keyboard = OpenTK.Input.Keyboard
Imports Key = OpenTK.Input.Key
Imports Color = System.Drawing.Color Imports Color = System.Drawing.Color
Imports OpenTK.Mathematics
Imports OpenTK.WinForms
Imports OpenTK.Input
Imports OpenTK.Windowing.GraphicsLibraryFramework
Namespace PreviewN Namespace PreviewN
@@ -132,7 +133,6 @@ Namespace PreviewN
Me.glControl1.Size = Me.ClientSize Me.glControl1.Size = Me.ClientSize
Me.glControl1.TabIndex = 0 Me.glControl1.TabIndex = 0
Me.glControl1.TabStop = False Me.glControl1.TabStop = False
Me.glControl1.VSync = False
Me.Controls.Add(Me.glControl1) Me.Controls.Add(Me.glControl1)
Me.ResumeLayout(False) Me.ResumeLayout(False)
@@ -247,7 +247,7 @@ Namespace PreviewN
End Sub End Sub
Private Sub glControl1_Resize(sender As Object, e As EventArgs) Handles glControl1.Resize Private Sub glControl1_Resize(sender As Object, e As EventArgs) Handles glControl1.Resize
glControl1.Context.Update(glControl1.WindowInfo) 'glControl1.Context.Update(glControl1.WindowInfo)
GL.Viewport(0, 0, glControl1.Width, glControl1.Height) GL.Viewport(0, 0, glControl1.Width, glControl1.Height)
ProjMatrix = Matrix4.CreatePerspectiveFieldOfView(FOV, glControl1.Width / glControl1.Height, 100.0F, 100000.0F) ProjMatrix = Matrix4.CreatePerspectiveFieldOfView(FOV, glControl1.Width / glControl1.Height, 100.0F, 100000.0F)
glControl1.Invalidate() glControl1.Invalidate()

View File

@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFramework>net48</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DocumentationFile>Pilz.Drawing.xml</DocumentationFile> <DocumentationFile>Pilz.Drawing.xml</DocumentationFile>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFramework>net48</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DocumentationFile>Pilz.Networking.xml</DocumentationFile> <DocumentationFile>Pilz.Networking.xml</DocumentationFile>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>

View File

@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFramework>net48</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DocumentationFile>Pilz.Threading.xml</DocumentationFile> <DocumentationFile>Pilz.Threading.xml</DocumentationFile>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>
@@ -35,12 +36,10 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" /> <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" /> <PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="Microsoft.VisualBasic" />
<Import Include="System" /> <Import Include="System" />

View File

@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFramework>net48</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DocumentationFile>Pilz.UI.xml</DocumentationFile> <DocumentationFile>Pilz.UI.xml</DocumentationFile>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>
@@ -43,9 +44,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="Microsoft.VisualBasic" />
<Import Include="System" /> <Import Include="System" />
@@ -58,9 +56,7 @@
<Import Include="System.Threading.Tasks" /> <Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="PaintingControl\PaintingControl.vb"> <Compile Update="PaintingControl\PaintingControl.vb" />
<SubType>UserControl</SubType>
</Compile>
<Compile Update="My Project\Application.Designer.vb"> <Compile Update="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon> <DependentUpon>Application.myapp</DependentUpon>

View File

@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFramework>net48</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DocumentationFile>Pilz.Win32.xml</DocumentationFile> <DocumentationFile>Pilz.Win32.xml</DocumentationFile>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>