Commit a1ea6121 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Added UWP support.

parent 1a39e4db
NUnit Console 3.10 - March 24, 2019
NUnit Console & Engine 3.11.1 - February 15, 2020
This hotfix fixes a problem with NUnit Project file settings being ignored.
Issues Resolved
* 730 NUnit project file settings are ignored
* 732 Upgrade Cake Build to fix Linux CI
NUnit Console 3.11 - January 26, 2020
This release fixes a range of minor bugs, and includes a significant amount
of internal restructuring work. In future, this will enable improved .NET Standard
support in the engine, and a .NET Core build of the console.
Issues Resolved
* 22 Engine modifies TestPackage
* 53 Add project element to top-level sub-project before merging
* 181 XSLT Transform not honoring --encoding value
* 336 Should legacyCorruptedStateExceptionsPolicy enabled=true in nunit3-console.exe.config?
* 386 nUnit project loader does not work when --inprocess is set
* 453 build-mono-docker.ps1 fails to run out the box
* 514 Add higher-level unit tests for structure of TestRunners
* 586 Create Separate Addin File for the Engine NuGet Package
* 588 licenseUrl in NuGet packages are deprecated
* 591 Release 3.10 merge
* 592 Add status badge from Azure pipelines
* 594 Fixed typos in release notes
* 595 Clean extension dir before running FetchExtensions task
* 603 Engine returns assembly-level test-suite event twice
* 605 Trailing \ in --work argument causes agent to crash
* 607 Unload + Load changes TestPackage IDs
* 611 Set DisableImplicitNuGetFallbackFolder and bump Ubuntu on Travis
* 612 Fix logging when including exception
* 617 Consider expanding projects before building ITestRunner structure
* 625 [Feature] Extend <start-run> data for ITestEventListener
* 628 [Question] Possible to set both labels=After and labels=Before
* 634 Remove unnecessary stream creation in XML Transform writer
* 635 Remove all #regions from codebase
* 636 Labels option: Rename On as OnOutputOnly, and deprecate On and All
* 637 Refactor RunnerSelectionTests
* 639 Engine initializes DriverService too early
* 667 Console Runner loads wrong .NET framework version when executing tests from multiple assemblies at once
* 669 nunit.console-runner-with-extensions.nuspec: Remove outdated release notes
* 671 Manually updated .NET Core SDK on Linux build
* 681 Display path and version of extension assemblies
* 683 Safely encapsulating the atomic agent database operations
* 684 Split engine into upper and lower parts
* 691 Sign NuGet Packages and msi
* 693 Update Engine tests to run on LTS .NET Core version
* 696 Minimal compilation/test of .NET Core Console
* 698 Update NUnit v2 driver extension in combined packages
* 703 Update Console options for .NET Core Console build
* 704 Agent in nupkg should not be referenced and causes warnings in consuming projects
* 706 build.cake maintenance
* 707 Set agent to reference core and not full engine
* 713 Engine will not recognize .NET Framework versions beyond 4.5
NUnit Console 3.10 - March 24, 2019
This release merges the .NET Standard version of the engine back into the nunit.engine
NuGet package and adds a .NET Standard 2.0 version of the engine that re-enables most
......@@ -10,7 +69,7 @@ The `--params` command line option which took multiple test parameters separated
a semi-colon is now deprecated in favor of the new `--testparam` command line option.
One of the most common uses for test parameters was to pass connection strings into
tests but this required workarounds to handle the semi-colons. Now you must pass in
each test paramater separately using a `--testparam` or `-tp` option for each.
each test parameter separately using a `--testparam` or `-tp` option for each.
Issues Resolved
......@@ -61,7 +120,7 @@ NUnit Console 3.9 - September 5, 2018
This release should stop the dreaded SocketException problem on shutdown. The
console also no longer returns -5 when AppDomains fail to unload at the end of a
test run. These fixes should make CI runs much more stable and predictible.
test run. These fixes should make CI runs much more stable and predictable.
For developers working on the NUnit Console and Engine project, Visual Studio
2017 update 5 or newer is now required to compile on the command line. This does
......
Copyright (c) 2019 Charlie Poole, Rob Prouse
Copyright (c) 2020 Charlie Poole, Rob Prouse
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -22,6 +22,14 @@
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!--
Since legacyUnhandledExceptionPolicy keeps the console from being killed even though an NUnit framework
test worker thread is killed, this is needed to prevent a hang. NUnit framework can only handle these
exceptions when this config element is present. (Or if future versions of NUnit framework drop support
for partial trust which would enable it to use [HandleProcessCorruptedStateExceptions].)
-->
<legacyCorruptedStateExceptionsPolicy enabled="true" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
......
......@@ -22,6 +22,14 @@
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!--
Since legacyUnhandledExceptionPolicy keeps the console from being killed even though an NUnit framework
test worker thread is killed, this is needed to prevent a hang. NUnit framework can only handle these
exceptions when this config element is present. (Or if future versions of NUnit framework drop support
for partial trust which would enable it to use [HandleProcessCorruptedStateExceptions].)
-->
<legacyCorruptedStateExceptionsPolicy enabled="true" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
......
../../NUnit.Extension.*/**/tools/ # nuget v2 layout
../../../NUnit.Extension.*/**/tools/
../../../../NUnit.Extension.*/**/tools/ # nuget v3 layout
../../../NUnit.Extension.*/**/tools/ # nuget v3 layout
......@@ -229,6 +229,16 @@
<param name="name">The property name</param>
<returns>A collection of values</returns>
</member>
<member name="P:NUnit.Engine.Extensibility.IExtensionNode.AssemblyPath">
<summary>
The path to the assembly implementing this extension.
</summary>
</member>
<member name="P:NUnit.Engine.Extensibility.IExtensionNode.AssemblyVersion">
<summary>
The version of the assembly implementing this extension.
</summary>
</member>
<member name="T:NUnit.Engine.Extensibility.IExtensionPoint">
<summary>
An ExtensionPoint represents a single point in the TestEngine
......@@ -478,7 +488,7 @@
<summary>
Logs the specified message at the error level.
</summary>
<param name="message">The message.</param>
<param name="format">The message.</param>
<param name="args">The arguments.</param>
</member>
<member name="M:NUnit.Engine.ILogger.Warning(System.String)">
......@@ -491,7 +501,7 @@
<summary>
Logs the specified message at the warning level.
</summary>
<param name="message">The message.</param>
<param name="format">The message.</param>
<param name="args">The arguments.</param>
</member>
<member name="M:NUnit.Engine.ILogger.Info(System.String)">
......@@ -504,7 +514,7 @@
<summary>
Logs the specified message at the info level.
</summary>
<param name="message">The message.</param>
<param name="format">The message.</param>
<param name="args">The arguments.</param>
</member>
<member name="M:NUnit.Engine.ILogger.Debug(System.String)">
......@@ -517,7 +527,7 @@
<summary>
Logs the specified message at the debug level.
</summary>
<param name="message">The message.</param>
<param name="format">The message.</param>
<param name="args">The arguments.</param>
</member>
<member name="T:NUnit.Engine.ILogging">
......@@ -676,6 +686,11 @@
the settings in the package and the assemblies themselves.
The package RuntimeFramework setting may be updated as a
result and the selected runtime is returned.
Note that if a package has subpackages, the subpackages may run on a different
framework to the top-level package. In future, this method should
probably not return a simple string, and instead require runners
to inspect the test package structure, to find all desired frameworks.
</summary>
<param name="package">A TestPackage</param>
<returns>The selected RuntimeFramework</returns>
......@@ -1047,7 +1062,17 @@
TestPackage holds information about a set of test files to
be loaded by a TestRunner. Each TestPackage represents
tests for one or more test files. TestPackages may be named
or anonymous, depending on how they are constructed.
or anonymous, depending on the constructor used.
Upon construction, a package is given an ID (string), which
remains unchanged for the lifetime of the TestPackage instance.
The package ID is passed to the test framework for use in generating
test IDs.
A runner that reloads test assemblies and wants the ids to remain stable
should avoid creating a new package but should instead use the original
package, changing settings as needed. This gives the best chance for the
tests in the reloaded assembly to match those originally loaded.
</summary>
</member>
<member name="M:NUnit.Engine.TestPackage.#ctor(System.String)">
......
......@@ -10,18 +10,20 @@
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!--
Since legacyUnhandledExceptionPolicy keeps the console from being killed even though an NUnit framework
test worker thread is killed, this is needed to prevent a hang. NUnit framework can only handle these
exceptions when this config element is present. (Or if future versions of NUnit framework drop support
for partial trust which would enable it to use [HandleProcessCorruptedStateExceptions].)
-->
<legacyCorruptedStateExceptionsPolicy enabled="true" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Enable reading source information from Portable and Embedded PDBs when running applications -->
<!-- built against previous .NET Framework versions on .NET Framework 4.7.2 -->
<AppContextSwitchOverrides value="Switch.System.Diagnostics.IgnorePortablePDBsInStackTraces=false" />
</runtime>
</configuration>
\ No newline at end of file
using System;
using System;
using System.Threading;
using System.Reflection;
......@@ -13,7 +13,7 @@ namespace NLua
private readonly Dictionary<Type, LuaClassType> _classCollection = new Dictionary<Type, LuaClassType>();
private readonly Dictionary<Type, Type> _delegateCollection = new Dictionary<Type, Type>();
#if !NETSTANDARD
#if !NETSTANDARD && !WINDOWS_UWP
private Dictionary<Type, Type> eventHandlerCollection = new Dictionary<Type, Type>();
private Type eventHandlerParent = typeof(LuaEventHandler);
private Type delegateParent = typeof(LuaDelegate);
......@@ -36,7 +36,7 @@ namespace NLua
#if NETCOREAPP
newAssembly = AssemblyBuilder.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
newModule = newAssembly.DefineDynamicModule("NLua_generatedcode");
#elif !NETSTANDARD
#elif !NETSTANDARD && !WINDOWS_UWP
newAssembly = Thread.GetDomain().DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
newModule = newAssembly.DefineDynamicModule("NLua_generatedcode");
#endif
......@@ -52,7 +52,7 @@ namespace NLua
*/
private Type GenerateEvent(Type eventHandlerType)
{
#if NETSTANDARD
#if NETSTANDARD || WINDOWS_UWP
throw new NotImplementedException(" Emit not available on .NET Standard ");
#else
string typeName;
......@@ -93,7 +93,7 @@ namespace NLua
*/
private Type GenerateDelegate(Type delegateType)
{
#if NETSTANDARD
#if NETSTANDARD || WINDOWS_UWP
throw new NotImplementedException("GenerateDelegate is not available on Windows Store, please register your LuaDelegate type with Lua.RegisterLuaDelegateType( yourDelegate, theLuaDelegateHandler) ");
#else
string typeName;
......@@ -298,7 +298,7 @@ namespace NLua
public void GenerateClass(Type klass, out Type newType, out Type[][] returnTypes)
{
#if NETSTANDARD
#if NETSTANDARD || WINDOWS_UWP
throw new NotImplementedException (" Emit not available on .NET Standard ");
#else
string typeName;
......@@ -410,7 +410,7 @@ namespace NLua
returnTypes = returnTypesList.ToArray();
}
#if !NETSTANDARD
#if !NETSTANDARD && !WINDOWS_UWP
/*
* Generates an overriden implementation of method inside myType that delegates
......@@ -659,7 +659,7 @@ namespace NLua
*/
public LuaEventHandler GetEvent(Type eventHandlerType, LuaFunction eventHandler)
{
#if NETSTANDARD
#if NETSTANDARD || WINDOWS_UWP
throw new NotImplementedException (" Emit not available on .NET Standard ");
#else
Type eventConsumerType;
......
using System.Reflection;
using System.Reflection;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
#if NETFRAMEWORK
[assembly: AssemblyTitle ("NLua (.NET Framework 4.5)")]
#elif WINDOWS_UWP
[assembly: AssemblyTitle ("NLua (Windows Universal)")]
#elif __ANDROID__
[assembly: AssemblyTitle ("NLua (Xamarin.Android)")]
#elif NETCOREAPP
......
......@@ -38,6 +38,9 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\KeraLua.1.0.27\lib\net45\KeraLua.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
......@@ -47,9 +50,6 @@
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="KeraLua">
<HintPath>..\..\..\packages\KeraLua.1.0.26\lib\net45\KeraLua.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\build\net45\NLua.csproj">
......@@ -68,6 +68,7 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\NUnit.3.12.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets'))" />
</Target>
<Import Project="..\..\..\packages\KeraLua.1.0.26\build\net45\KeraLua.targets" Condition="Exists('..\..\..\packages\KeraLua.1.0.26\build\net45\KeraLua.targets')" />
<Import Project="..\..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets" Condition="Exists('..\..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets')" />
</Project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment