8000 .NET 6.0 and Visual Studio 2022 port (beta-3.0) by mortend · Pull Request #424 · fuse-open/uno · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

.NET 6.0 and Visual Studio 2022 port (beta-3.0) #424

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

Merged
merged 4 commits into from
Oct 8, 2022
Merged
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
7 changes: 2 additions & 5 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%
- npm test %TARGET% Release
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ obj/
/packages/
/release/
/upload/
MonoBundle

# Sublime files
*.sublime-project
Expand Down
18 changes: 9 additions & 9 deletions .unoconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// 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
Uno.Command: bin/uno.js
// FIXME: Xamarin.Mac doesn't work on .NET 6.0:
AppLoader.Assembly: bin/generic/net6.0/uno-app.dll
Uno.Command: bin/net6.0/uno
} else {
AppLoader.Exe: bin/generic/uno-app.exe
Uno.Command: bin/uno.js
AppLoader.Assembly: bin/generic/net6.0/uno-app.dll
Uno.Command: bin/net6.0/uno
}

// Package config
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
default:
@bash scripts/build.sh
lib:
@bin/uno doctor -e lib
@bin/net6.0/uno doctor -e lib
unocore:
@bin/net6.0/uno build lib/UnoCore -DLIBRARY
uno:
@dotnet build uno.sln -v m
disasm:
@dotnet build disasm.sln -v m
runtime:
@dotnet build runtime.sln -v m
release:
@bash scripts/pack.sh
check:
@bash scripts/test.sh
@bash scripts/test.sh dotnet
clean:
@bash scripts/clean.sh
install:
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
12 changes: 3 additions & 9 deletions docs/build-instructions.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
# Build instructions

Uno is built using the command-line on Linux, macOS or Windows – or [from inside an IDE](#building-from-an-ide).
Uno is built using the command-line on Linux, macOS or Windows – or [from Visual Studio 2022](#building-from-an-ide).

## Building from command-line

### Prerequisites

- [Mono](http://www.mono-project.com/download/) / [Visual Studio](https://www.visualstudio.com/downloads/)
- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) / [Visual Studio 2022](https://www.visualstudio.com/downloads/)
- [Bash](http://www.msys2.org/) and [Make](http://gnuwin32.sourceforge.net/packages/make.htm)
- [Node.js](https://nodejs.org/en/download/)
- [NuGet](https://www.nuget.org/downloads/)

> Our cross-platform build scripts are written in `bash`, and `make` is a convenient way to invoke build tasks. Bash is included in [Git for Windows](https://git-scm.com/downloads).

> On Windows, we need [vswhere] to locate your Visual Studio installation. Please make sure we can find `vswhere` in
`%PATH%` or at `%PROGRAMFILES(x86)%\Microsoft Visual Studio\Installer`.

[vswhere]: https://github.com/Microsoft/vswhere

### Build

```
Expand Down Expand Up @@ -58,7 +52,7 @@ This will add your local-built `uno` to PATH and print version information.

## Building from an IDE

Open `uno.sln` in an IDE that supports C# (Visual Studio or JetBrains Rider?).
Open `uno.sln` in Visual Studio 2022.

Make sure to set `tool/uno` as startup project when launching `uno`.

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>prom A92E pt</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>
3 changes: 3 additions & 0 deletions lib/Uno.Net.Sockets/System.Net.Sockets.uxl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Extensions Backend="CIL">
<Require Assembly="System.Net.Sockets" />
</Extensions>
1 change: 1 addition & 0 deletions lib/Uno.Net.Sockets/Uno.Net.Sockets.unoproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"NetworkHelpers.uno:Source",
"NetworkStream.uno:Source",
"Socket.uno:Source",
"System.Net.Sockets.uxl:Extensions",
"TcpListener.uno:Source"
]
}
9 changes: 2 additions & 7 deletions lib/Uno.Net.Sockets/tests/Dns.Test.uno
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,8 @@ namespace Uno.Net.Sockets.Test
Assert.Throws<SocketException>(GetHostAddressesLongHostname);
Assert.Throws<SocketException>(GetHostAddressesLongHostname2);

// https://github.com/fusetools/uno/issues/1518
if defined (CIL && HOST_OSX)
{
Assert.Throws<SocketException>(GetHostAddressesLongHostname3);
Assert.Throws<SocketException>(GetHostAddressesLongHostname4);
}
else
// FIXME: Fails on .NET 6.0
if defined (!DOTNET)
{
Assert.Throws<ArgumentOutOfRangeException>(GetHostAddressesLongHostname3);
Assert.Throws<ArgumentOutOfRangeException>(GetHostAddressesLongHostname4);
Expand Down
Loading
0