Skip to content

Commit

Permalink
.NET 6.0 port (WIP)
Browse files Browse the repository at this point in the history
Work in progress port to .NET 6.0 and Visual Studio 2022.

* Update .NET projects, solutions and assemblies

* Reimport IKVM.Reflection (with modifications) from [ikvm-revived]

* Rewrite obsolete code and fix other fallouts

[ikvm-revived]: https://github.com/ikvm-revived/ikvm/tree/a91e31b6ded415d42c52b87cb8e30a83e1d9588d/src/IKVM.Reflection
  • Loading branch information
mortend committed Sep 23, 2022
1 parent b6da86f commit 3596655
Show file tree
Hide file tree
Showing 143 changed files with 6,291 additions and 9,556 deletions.
5 changes: 1 addition & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '{build}'
image: Visual Studio 2019
image: Visual Studio 2022

environment:
matrix:
Expand Down Expand Up @@ -44,7 +44,4 @@ before_test:
}
test_script:
- nunit3-console
src\test\tests\bin\Release\Uno.TestRunner.Tests.dll
src\ux\tests\bin\Release\Uno.UX.Markup.Tests.dll
- npm test %TARGET%
13 changes: 6 additions & 7 deletions .unoconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// Core config
AppLoader.Mac: bin/mac
AppLoader.Windows: bin/win
Uno.Exe: bin/uno.exe
AppLoader.Mac: bin/mac/net6.0
AppLoader.Windows: bin/win/net6.0-windows

if WIN32 {
AppLoader.Exe: bin/win/uno-app.exe
Uno.Command: bin/uno.exe
AppLoader.Assembly: bin/win/net6.0-windows/uno-app.dll
Uno.Command: bin/net6.0/uno.exe
} else if MAC {
AppLoader.Exe: bin/mac/uno-app.exe
AppLoader.Assembly: bin/mac/net6.0/uno-app.dll
Uno.Command: bin/uno.js
} else {
AppLoader.Exe: bin/generic/uno-app.exe
AppLoader.Assembly: bin/generic/net6.0/uno-app.dll
Uno.Command: bin/uno.js
}

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
default:
@bash scripts/build.sh
lib:
@bin/uno doctor -e lib
@bin/net6.0/uno doctor -e lib
release:
@bash scripts/pack.sh
check:
Expand Down
2 changes: 1 addition & 1 deletion disasm.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30002.166
VisualStudioVersion = 25.0.1703.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "disasm-wpf", "src\disasm\wpf\disasm-wpf.csproj", "{E9E95DD1-03F6-45A3-945F-E1CC82E6B8D4}"
EndProject
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,64 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9AA47731-A7CE-4113-9A78-C8FAD8862D90}</ProjectGuid>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Uno.Net.Http.Implementation.Test</RootNamespace>
<AssemblyName>Uno.Net.Http.Implementation.Test</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Uno.Net.Http.Implementation\Uno.Net.Http.Implementation.csproj">
<Project>{d20c6ce2-b067-4911-acb1-3ee928c297a6}</Project>
<Name>Uno.Net.Http.Implementation</Name>
</ProjectReference>
<ProjectReference Include="..\Uno.Net.Http.Implementation\Uno.Net.Http.Implementation.csproj" />
</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>
</Project>
Binary file modified lib/Uno.Net.Http/cil/Uno.Net.Http.Implementation.dll
Binary file not shown.
5 changes: 2 additions & 3 deletions lib/Uno.Net.Http/cil/Uno.Net.Http.Implementation.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30324.0
# Visual Studio Version 16
VisualStudioVersion = 25.0.1703.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Uno.Net.Http.Implementation", "Uno.Net.Http.Implementation\Uno.Net.Http.Implementation.csproj", "{D20C6CE2-B067-4911-ACB1-3EE928C297A6}"
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ public static Task<HttpWebResponse> Send(HttpWebRequest request, byte[] buffer)

// Write the post data to the request stream
return request.GetHttpRequestStreamAsync()
.Then(stream => stream.WriteAsync(buffer).Then(stream.Dispose))
.Then(stream =>
{
stream.Write(buffer);
stream.Dispose();
})
.Then(() => request.GetHttpResponseAsync());
}

Expand All @@ -109,7 +113,7 @@ public static void Send(HttpWebRequest request,
{
Send(request, buffer).Then(httpWebResponse =>
{
if(httpWebResponse == null)
if (httpWebResponse == null)
throw new ArgumentNullException("httpWebResponse");

onHeadersReceived(httpWebResponse);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,58 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D20C6CE2-B067-4911-ACB1-3EE928C297A6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Uno.Net.Http.Implementation</RootNamespace>
<AssemblyName>Uno.Net.Http.Implementation</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="HttpClientImpl.cs" />
<Compile Include="MyHttpLib\HttpHelper.cs" />
<Compile Include="MyHttpLib\HttpRequest.cs" />
<Compile Include="MyHttpLib\HttpResponse.cs" />
<Compile Include="MyHttpLib\StreamExtensions.cs" />
<Compile Include="MyHttpLib\TaskAsyncHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</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>

</Project>
4 changes: 4 additions & 0 deletions lib/UnoCore/cil/config.cil.uxl
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@
<!-- Core assemblies -->
<Require Assembly="System" />
<Require Assembly="System.Core" />
<Require Assembly="System.Collections" />
<Require Assembly="System.Console" />
<Require Assembly="System.Runtime" />
<Require Assembly="System.Threading" />

</Extensions>
9 changes: 5 additions & 4 deletions lib/UnoCore/cil/exe.cil.uxl
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@

<Set AppDirectory="@(Project.Name).app" Condition="HOST_MAC" />
<Set AssemblyDirectory="@(HOST_MAC:Defined:Test('@(AppDirectory)/Contents/MonoBundle', '.'))" />
<Set Product="@(AssemblyDirectory)/@(Project.Name).exe" />
<Set Product="@(AssemblyDirectory)/@(Project.Name).dll" />

<Set Commands.Run="@('@(AppDirectory)/Contents/MacOS/@(Project.Name)':QuoteSpace)" Condition="HOST_MAC" />
<Set Commands.Run="@(Product:QuoteSpace)" />

<!-- AppLoader & dependencies -->
<Set AppLoader.Assembly="@(Config.AppLoader.Exe:Path)" />
<Set AppLoader.Assembly="@(Config.AppLoader.Assembly:Path)" />
<Set AppLoader.Class="Uno.AppLoader.Program" />
<Set AppLoader.Method="UnoGenerated" />

<Require UnmanagedLibrary="@(Config.AppLoader.Mac:Path)/OpenTK.dll" Condition="HOST_MAC" />
<Require UnmanagedLibrary="@(Config.AppLoader.Mac:Path)/System.Drawing.Common.dll" Condition="HOST_MAC" />
<Require UnmanagedLibrary="@(Config.AppLoader.Mac:Path)/Xamarin.Mac.dll" Condition="HOST_MAC" />
<Require UnmanagedLibrary="@(Config.AppLoader.Mac:Path)/libxammac.dylib" Condition="HOST_MAC" />

<CopyFile Name="@(Config.AppLoader.Mac:Path)/uno-app.deps.json" TargetName="@(Project.Name).deps.json" Condition="HOST_MAC" />

<Require UnmanagedLibrary="@(Config.AppLoader.Windows:Path)/OpenTK.dll" Condition="HOST_WIN32" />
<Require UnmanagedLibrary="@(Config.AppLoader.Windows:Path)/libEGL.dll" Condition="HOST_WIN32" />
<Require UnmanagedLibrary="@(Config.AppLoader.Windows:Path)/libGLESv2.dll" Condition="HOST_WIN32" />
<Require UnmanagedLibrary="@(Config.AppLoader.Windows:Path)/d3dcompiler_47.dll" Condition="HOST_WIN32" />
<CopyFile Name="@(Config.AppLoader.Windows:Path)/uno-app.deps.json" TargetName="@(Project.Name).deps.json" Condition="HOST_WIN32" />

<!-- macOS bundle -->
<Set BundleIdentifier="@(Project.Mac.BundleIdentifier || 'com.apps.@(Project.Name:QIdentifier:Replace('_', '-'):ToLower)')" Condition="HOST_MAC" />
<ProcessFile Name="@(AppDirectory)/Contents/Info.plist" Condition="HOST_MAC" />
<CopyFile Name="@(Config.AppLoader.Mac:Path)/monostub" TargetName="@(AppDirectory)/Contents/MacOS/@(Project.Name)" IsExecutable=true Condition="HOST_MAC" />
<CopyFile Name="@(Project.Mac.Icon:Path || @//assets/icon.icns)" TargetName="@(AppDirectory)/Contents/Resources/Icon.icns" Condition="HOST_MAC" />

</Extensions>
8 changes: 4 additions & 4 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@fuse-open/uno",
"version": "2.4.1",
"version": "3.0.0-beta.0",
"description": "Extremely fast, native C#-dialect and powerful tooling for mobile and desktop developers.",
"dependencies": {
"@fuse-open/opentk": "^3.2.0",
"@fuse-open/transpiler": "^1.17.3",
"@fuse-open/xamarin-mac": "^8.8.0",
"dotnet-run": "^1.5.0"
"dotnet-run": "^2.0.0-beta.0"
},
"devDependencies": {
"filecompare": "^1.0.4",
Expand All @@ -19,7 +19,7 @@
"prepack": "bash scripts/pack.sh",
"test": "bash scripts/test.sh",
"version": "bash scripts/version.sh",
"uno": "dotnet-run bin/uno.exe"
"uno": "dotnet-run bin/net6.0/uno.dll"
},
"bin": {
"uno": "bin/uno.js"
Expand Down
Loading

0 comments on commit 3596655

Please sign in to comment.