Unset CORE_ROOT in environment on Windows before doing restore so that dotnet CLI doesn't try to run using binaries from the test CORE_ROOT.
Restore the xunit wrapper projects in a batch rather than individually to save a lot of time.
Work around xunit.runner.msbuild not having compatible package layout by ignoring errors and adding import so that a future fix will work.
Hard-code C# language for generated wrapper projects: the $(Language) property wasn't set.
Also Change www.myget.org to dotnet.myget.org, as we switched to enterprise myget.
Add System.ObjectModel to tests\src\JIT\config\benchmark+serialize\project.json to manually upgrade it to a version that doesn't require lifting for runtime. This fixes System.ObjectModel.dll being missing from CORE_ROOT and causing the test to fail.
Switch to v3 nuget feeds and sync NuGet.Configs.
-1.0.0.000973
\ No newline at end of file
+1.0.0.001504
\ No newline at end of file
</Target>
<Target Name="RestoreNETCorePlatforms" AfterTargets="Build">
- <Exec Command="$(DnuRestoreCommand) $(SourceDir).nuget/init/project.json --source https://www.myget.org/F/dotnet-core/" />
+ <Exec Command="$(DnuRestoreCommand) $(SourceDir).nuget/init/project.json --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
</Target>
</Project>
\ No newline at end of file
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
- <DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
+ <!-- If CORE_ROOT is set on Windows, the dotnet CLI tool tries to use it. This results in DLL resolution errors. Unset CORE_ROOT during restore. -->
+ <DnuRestoreCommand Condition="'$(OsEnvironment)'!='Unix'">(set CORE_ROOT=) &</DnuRestoreCommand>
+
+ <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
- <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
</PropertyGroup>
<!-- Setup Nuget properties -->
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt
set DOTNET_ZIP_NAME=dotnet-win-x64.%DOTNET_VERSION%.zip
-set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
+set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> %INIT_TOOLS_LOG%
powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> %INIT_TOOLS_LOG%
__DOTNET_PKG=dotnet-centos-x64
fi
-__CLIDownloadURL=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz
+__CLIDownloadURL=https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz
echo ".NET CLI will be downloaded from $__CLIDownloadURL"
if [ ! -e $__PROJECT_JSON_FILE ]; then
<add key="enabled" value="True" />
</packageRestore>
<packageSources>
- <add key="myget.org dotnet-buildtools" value="https://www.myget.org/F/dotnet-buildtools/" />
+ <add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
- <add key="myget.org dotnet-core" value="https://www.myget.org/F/dotnet-core/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</PropertyGroup>
<Target Name="BatchRestorePackages">
- <Message Importance="High" Text="Restoring all packages..." />
- <!-- restore all project.jsons in one pass for perf & to avoid concurrency problems with dnu -->
- <Exec Command="$(DnuRestoreCommand) $(DnuRestoreDirs)" StandardOutputImportance="Low" CustomErrorRegularExpression="^Unable to locate .*" />
+ <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." />
+
+ <!-- restore all project.jsons in one pass for perf & to avoid concurrency problems -->
+ <Exec Command="$(DnuRestoreCommand) $(DnuRestoreDirs)"
+ StandardOutputImportance="Low"
+ CustomErrorRegularExpression="^Unable to locate .*"
+ ContinueOnError="WarnAndContinue" />
+
+ <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." />
</Target>
<!-- Override RestorePackages from dir.traversal.targets and do a batch restore -->
<!-- list of nuget package sources passed to dnu -->
<ItemGroup>
<!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
- <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-core/" />
- <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-corefxtestdata/" />
- <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-buildtools/" />
- <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/" />
- <DnuSourceList Include="https:%2F%2Fwww.nuget.org/api/v2/" />
+ <DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
+ <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/api/v3/index.json" />
+ <DnuSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
</ItemGroup>
<DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource>
<DnuRestoreDirs>@(DnuRestoreDir -> '%(Identity)', ' ')</DnuRestoreDirs>
- <DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
+ <!-- If CORE_ROOT is set on Windows, the dotnet CLI tool tries to use it. This results in DLL resolution errors. Unset CORE_ROOT during restore. -->
+ <DnuRestoreCommand Condition="'$(OsEnvironment)'!='Unix'">(set CORE_ROOT=) &</DnuRestoreCommand>
+
+ <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand>
- <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
-
</PropertyGroup>
<!-- Which tests shall we build? Default: Priority 0 tests.
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="%24(SolutionDir) == '' Or %24(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>true</IsTestProject>
"xunit.runner.msbuild": "2.1.0"
},
"frameworks": {
- "net45": {}
+ "net45": {
+ "imports": "portable-net45+win8"
+ }
}
}
]]>
File="$(XunitWrapperSrcDir)\project.json"
Lines="$(XunitWrapperGenPackConfig)"
Overwrite="true" />
-
- <MSBuild Projects="$(XunitWrapperSrcDir)\$(XunitWrapper).csproj" />
-
+ </Target>
+
+ <Target Name="BuildXunitWrapper">
+ <MSBuild Projects="$(XunitWrapperSrcDir)\$(XunitWrapper).csproj"
+ Properties="RestorePackages=false"/>
</Target>
<Target Name="CreateXunitFacts">
<Target Name="CreateAllWrappers" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CreateXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity)" />
+
+ <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." />
+ <!-- Restore all wrapper projects' project.jsons in one pass for perf & to avoid concurrency problems -->
+ <Exec Command="$(DnuRestoreCommand) "$(XunitWrapperGeneratedCSDirBase.TrimEnd('\\'))""
+ StandardOutputImportance="Low"
+ CustomErrorRegularExpression="^Unable to locate .*"
+ ContinueOnError="WarnAndContinue" />
+ <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." />
+
+ <MSBuild Projects="$(MSBuildProjectFile)" Targets="BuildXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity)" />
</Target>
<Target Name="GetListOfTestCmds">
<Target Name="CreateTestOverlay">
<MSBuild Projects="$(MSBuildProjectFile)"
- Targets="CopyDependecyToCoreRoot"/>
+ Targets="CopyDependecyToCoreRoot"
+ Properties="Language=C#" />
</Target>
<!-- All the test projects need to add dependency to currently built runtime as they require that to run.
"System.Runtime": "4.0.20-beta-*",
"System.Console": "4.0.0-beta-*",
"System.IO": "4.0.10",
+ "System.ObjectModel": "4.0.10",
"System.Runtime.Serialization.Json": "4.0.0",
"System.Runtime.Serialization.Primitives": "4.0.10",
"System.Runtime.Serialization.Xml": "4.0.10",
</packageRestore>
<packageSources>
<clear/>
- <add key="myget.org dotnet-corefx" value="https://www.myget.org/F/dotnet-core/" />
- <add key="myget.org dotnet-buildtools" value="https://www.myget.org/F/dotnet-buildtools/" />
+ <add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
+ <add key="myget.org nugetbuild" value="https://www.myget.org/F/nugetbuild/api/v3/index.json" />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>