- Update platform define symbol.
- Update NuGets.
- Update call to AuthenticateAsClient with new SslProtocols enum.
- Update appveyor to install nF build components without VS extension.
This commit is contained in:
José Simões 2019-06-18 19:40:30 +01:00 коммит произвёл Xin Chen
Родитель 16b7d231ab
Коммит ae67bf3766
12 изменённых файлов: 72 добавлений и 54 удалений

Просмотреть файл

@ -28,18 +28,18 @@
<ProjectReference Include="..\..\..\nanoFramework\Amqp.nanoFramework.nfproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=1.1.0.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.1.0\lib\mscorlib.dll</HintPath>
<Reference Include="mscorlib, Version=1.2.5.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\..\..\packages\nanoFramework.CoreLibrary.1.2.5-preview.1\lib\mscorlib.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Events.1.0.2\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.8.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\..\..\packages\nanoFramework.Runtime.Events.1.0.8-preview.5\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.Net, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Net.1.0.2\lib\System.Net.dll</HintPath>
<Reference Include="System.Net, Version=1.1.1.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\..\..\packages\nanoFramework.System.Net.1.1.1-preview.9\lib\System.Net.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>

Просмотреть файл

@ -63,16 +63,34 @@ before_build:
}
Else
{
$vsixPath = "$($env:USERPROFILE)\nanoFramework.Tools.VS2017.Extension.vsix"
(New-Object Net.WebClient).DownloadFile('https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vs-publisher-1470366/vsextensions/nanoFrameworkVS2017Extension/0/vspackage', $vsixPath)
"`"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VSIXInstaller.exe`" /q /a $vsixPath" | out-file ".\install-vsix.cmd" -Encoding ASCII
'Installing nanoFramework VS extension ...' | Write-Host -ForegroundColor White -NoNewline
&.\install-vsix.cmd --quiet --no-verbose > $null
[System.Net.WebClient]$webClient = New-Object System.Net.WebClient
$webClient.UseDefaultCredentials = $true
# get extension information from MyGet VSIX feed
$vsixFeedXml = Join-Path $($env:USERPROFILE) "vs-extension-feed.xml"
$webClient.DownloadFile("https://www.myget.org/F/nanoframework-dev/vsix", $vsixFeedXml)
[xml]$feedDetails = Get-Content $vsixFeedXml
# assuming this is building on VS2017 only
$extensionUrl = $feedDetails.feed.entry[0].content.src
$vsixPath = Join-Path $($env:USERPROFILE) "nanoFramework.Tools.VS2017.Extension.zip"
# download VS extension
Write-Debug "Download VSIX file from $extensionUrl to $vsixPath"
$webClient.DownloadFile($extensionUrl,$vsixPath)
$outputPath = "$($env:USERPROFILE)\nf-extension"
# unzip extension
Write-Debug "Unzip extension content"
Expand-Archive $vsixPath -DestinationPath $outputPath
# copy build files to msbuild location
Write-Debug "Copy build files to msbuild location"
$msbuildPath = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild"
Copy-Item -Path "$($env:USERPROFILE)\nf-extension\`$MSBuild\nanoFramework" -Destination $msbuildPath -Recurse
'OK' | Write-Host -ForegroundColor Green

Просмотреть файл

@ -104,28 +104,28 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=1.1.0.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.1.0\lib\mscorlib.dll</HintPath>
<Reference Include="mscorlib, Version=1.2.5.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.2.5-preview.1\lib\mscorlib.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Events.1.0.2\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.8.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Events.1.0.8-preview.5\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="nanoFramework.Runtime.Native, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Native.1.0.2\lib\nanoFramework.Runtime.Native.dll</HintPath>
<Reference Include="nanoFramework.Runtime.Native, Version=1.0.7.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Native.1.0.7-preview.5\lib\nanoFramework.Runtime.Native.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.Math, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Math.1.0.2\lib\System.Math.dll</HintPath>
<Reference Include="System.Math, Version=1.0.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Math.1.0.6-preview.6\lib\System.Math.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.Net, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Net.1.0.2\lib\System.Net.dll</HintPath>
<Reference Include="System.Net, Version=1.1.1.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Net.1.1.1-preview.9\lib\System.Net.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>

Просмотреть файл

@ -294,28 +294,28 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=1.1.0.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.1.0\lib\mscorlib.dll</HintPath>
<Reference Include="mscorlib, Version=1.2.5.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.2.5-preview.1\lib\mscorlib.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Events.1.0.2\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.8.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Events.1.0.8-preview.5\lib\nanoFramework.Runtime.Events.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="nanoFramework.Runtime.Native, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Native.1.0.2\lib\nanoFramework.Runtime.Native.dll</HintPath>
<Reference Include="nanoFramework.Runtime.Native, Version=1.0.7.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.Runtime.Native.1.0.7-preview.5\lib\nanoFramework.Runtime.Native.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.Math, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Math.1.0.2\lib\System.Math.dll</HintPath>
<Reference Include="System.Math, Version=1.0.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Math.1.0.6-preview.6\lib\System.Math.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.Net, Version=1.0.2.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Net.1.0.2\lib\System.Net.dll</HintPath>
<Reference Include="System.Net, Version=1.1.1.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.System.Net.1.1.1-preview.9\lib\System.Net.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>

Просмотреть файл

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nanoFramework.CoreLibrary" version="1.1.0" targetFramework="netnanoframework10" />
<package id="nanoFramework.Runtime.Events" version="1.0.2" targetFramework="netnanoframework10" />
<package id="nanoFramework.Runtime.Native" version="1.0.2" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Math" version="1.0.2" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Net" version="1.0.2" targetFramework="netnanoframework10" />
<package id="nanoFramework.CoreLibrary" version="1.2.5-preview.1" targetFramework="netnanoframework10" />
<package id="nanoFramework.Runtime.Events" version="1.0.8-preview.5" targetFramework="netnanoframework10" />
<package id="nanoFramework.Runtime.Native" version="1.0.7-preview.5" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Math" version="1.0.6-preview.6" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Net" version="1.1.1-preview.9" targetFramework="netnanoframework10" />
</packages>

Просмотреть файл

@ -23,7 +23,7 @@ namespace Amqp
using System.Threading;
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
using Microsoft.SPOT;
#elif (NANOFRAMEWORK_V1_0)
#elif (NANOFRAMEWORK_1_0)
using nanoFramework.Runtime.Native;
#endif

Просмотреть файл

@ -19,7 +19,7 @@ namespace Amqp
{
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
using Microsoft.SPOT.Net.Security;
#elif (NANOFRAMEWORK_V1_0)
#elif (NANOFRAMEWORK_1_0)
using System.Net.Security;
#endif
using System;
@ -77,14 +77,14 @@ namespace Amqp
null,
noVerification ? SslVerification.NoVerification : SslVerification.VerifyPeer,
SslProtocols.Default);
#elif (NANOFRAMEWORK_V1_0)
#elif (NANOFRAMEWORK_1_0)
sslSocket.SslVerification = noVerification ? SslVerification.NoVerification : SslVerification.VerifyPeer;
sslSocket.AuthenticateAsClient(
address.Host,
null,
SslProtocols.TLSv11);
SslProtocols.Tls11);
#endif
this.socketTransport = sslSocket;

Просмотреть файл

@ -25,7 +25,7 @@ namespace Amqp
using Amqp.Types;
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
using Microsoft.SPOT.Net.Security;
#elif (NANOFRAMEWORK_V1_0)
#elif (NANOFRAMEWORK_1_0)
using System.Net.Security;
#endif
@ -776,8 +776,8 @@ namespace Amqp
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
sslStream.AuthenticateAsClient(host, null, SslVerification.VerifyPeer, SslProtocols.TLSv1);
#elif (NANOFRAMEWORK_V1_0)
sslStream.AuthenticateAsClient(host, null, SslProtocols.TLSv11);
#elif (NANOFRAMEWORK_1_0)
sslStream.AuthenticateAsClient(host, null, SslProtocols.Tls11);
#endif
stream = sslStream;

Просмотреть файл

@ -21,7 +21,7 @@ namespace Amqp
using System.Diagnostics;
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
using Microsoft.SPOT;
#elif (NANOFRAMEWORK_V1_0)
#elif (NANOFRAMEWORK_1_0)
using nanoFramework.Runtime.Native;
#endif
@ -99,7 +99,7 @@ namespace Amqp
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
Microsoft.SPOT.Debug.Print(sb.ToString());
#elif (NANOFRAMEWORK_V1_0)
#elif (NANOFRAMEWORK_1_0)
Console.WriteLine(sb.ToString());
#endif

Просмотреть файл

@ -15,9 +15,9 @@
// limitations under the License.
// ------------------------------------------------------------------------------------
using Amqp;
#if NETMF && !NANOFRAMEWORK_V1_0
#if NETMF && !NANOFRAMEWORK_1_0
using Microsoft.SPOT;
#elif NANOFRAMEWORK_V1_0
#elif NANOFRAMEWORK_1_0
using System;
#endif
#if COMPACT_FRAMEWORK
@ -41,9 +41,9 @@ namespace Test.Amqp
static void WriteTrace(TraceLevel level, string format, params object[] args)
{
string message = args == null ? format : Fx.Format(format, args);
#if NETMF && !NANOFRAMEWORK_V1_0
#if NETMF && !NANOFRAMEWORK_1_0
Debug.Print(message);
#elif NANOFRAMEWORK_V1_0
#elif NANOFRAMEWORK_1_0
Console.WriteLine(message);
#elif COMPACT_FRAMEWORK
Debug.WriteLine(message);

Просмотреть файл

@ -362,7 +362,7 @@ namespace Amqp.Types
/// <returns></returns>
public static long DateTimeToTimestamp(DateTime dateTime)
{
#if (NANOFRAMEWORK_V1_0)
#if (NANOFRAMEWORK_1_0)
return (long)((dateTime.Ticks - epochTicks) / TicksPerMillisecond);
#else
return (long)((dateTime.ToUniversalTime().Ticks - epochTicks) / TicksPerMillisecond);

Просмотреть файл

@ -1,6 +1,6 @@
using System;
using System.Threading;
#if NETMF && !NANOFRAMEWORK_V1_0
#if NETMF && !NANOFRAMEWORK_1_0
using Microsoft.SPOT;
#endif