From 2d924fd9a16e2cd29a1450b268e1eef0b8a0ea70 Mon Sep 17 00:00:00 2001 From: bicijinlian Date: Wed, 18 Jul 2018 17:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TupleStudyTest/Readme.txt | 11 +++++++++ TupleStudyTest/TupleStudyTest.csproj | 35 ++++++++++++++++----------- TupleStudyTest/ValueTupleStudyTest.cs | 2 +- TupleStudyTest/packages.config | 11 +++++---- 4 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 TupleStudyTest/Readme.txt diff --git a/TupleStudyTest/Readme.txt b/TupleStudyTest/Readme.txt new file mode 100644 index 0000000..a5751f6 --- /dev/null +++ b/TupleStudyTest/Readme.txt @@ -0,0 +1,11 @@ +本项目使用.net framework 4.6.1, 因为项目引用的TupleStudy为 .net standard 2.0项目, +而 .net standard 2.0 引用要求的最小.net framework版本为 4.6.1 + +有一个问题: +当xUnit.net 为 2.3及以上新版本时,出现测试异常: +System.MissingMethodException : 找不到方法:“System.ValueTuple TupleStudy.ValueTupleStudy.CreateValueTuple()” + +xUnit.net 为 2.2及以下版本时,不出现异常,目前使用2.2 + +原因是:xUnit.net的版本问题还是 ValueTuple的版本问题,或是.net standard 2.0 的问题,待有时间,慢慢验证。 + diff --git a/TupleStudyTest/TupleStudyTest.csproj b/TupleStudyTest/TupleStudyTest.csproj index efbd295..3b704f3 100644 --- a/TupleStudyTest/TupleStudyTest.csproj +++ b/TupleStudyTest/TupleStudyTest.csproj @@ -1,7 +1,7 @@  + - Debug @@ -11,7 +11,7 @@ Properties TupleStudyTest TupleStudyTest - v4.7 + v4.6.1 512 @@ -37,6 +37,9 @@ + + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll + @@ -45,15 +48,16 @@ ..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll + True - - ..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll + + ..\packages\xunit.assert.2.3.0\lib\netstandard1.1\xunit.assert.dll - - ..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll + + ..\packages\xunit.extensibility.core.2.3.0\lib\netstandard1.1\xunit.core.dll - - ..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll + + ..\packages\xunit.extensibility.execution.2.3.0\lib\net452\xunit.execution.desktop.dll @@ -64,9 +68,6 @@ - - - {3bf11d95-1a17-444f-97a8-5536fcc8c015} @@ -76,14 +77,20 @@ + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - + + - + \ No newline at end of file diff --git a/TupleStudyTest/ValueTupleStudyTest.cs b/TupleStudyTest/ValueTupleStudyTest.cs index f419b80..d75e903 100644 --- a/TupleStudyTest/ValueTupleStudyTest.cs +++ b/TupleStudyTest/ValueTupleStudyTest.cs @@ -104,7 +104,7 @@ namespace TupleStudyTest [Fact] public void GetValueTuple_Test() { - + Assert.Equal(1, 1); } } } diff --git a/TupleStudyTest/packages.config b/TupleStudyTest/packages.config index 1548b5e..881327b 100644 --- a/TupleStudyTest/packages.config +++ b/TupleStudyTest/packages.config @@ -1,11 +1,12 @@  - + + - - - - + + + + \ No newline at end of file