Upgrade CLI version and buildtools, and make build file changes.
authorDavis Goodin <dagood@microsoft.com>
Tue, 23 Feb 2016 20:37:36 +0000 (14:37 -0600)
committerDavis Goodin <dagood@microsoft.com>
Wed, 2 Mar 2016 18:32:03 +0000 (12:32 -0600)
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.

DotnetCLIVersion.txt
build.proj
dir.props
init-tools.cmd
init-tools.sh
src/NuGet.Config
tests/build.proj
tests/dir.props
tests/runtest.proj
tests/src/JIT/config/benchmark+serialize/project.json
tests/src/NuGet.Config

index 8e793ae..c916191 100644 (file)
@@ -1 +1 @@
-1.0.0.000973
\ No newline at end of file
+1.0.0.001504
\ No newline at end of file
index 7202143..d37eaff 100644 (file)
@@ -17,7 +17,7 @@
   </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
index d9aeee8..018adc4 100644 (file)
--- a/dir.props
+++ b/dir.props
     <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=) &amp;</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 -->
index 0d41e3b..af77c7b 100644 (file)
@@ -47,7 +47,7 @@ echo Installing dotnet cli...
 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%
index 8a3d1a8..f57991e 100755 (executable)
@@ -73,7 +73,7 @@ if [ "$__DistroName" == "rhel" ]; then
     __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
index e821d14..0054b49 100644 (file)
@@ -4,9 +4,8 @@
     <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)" />
index 0130c5e..ca3896d 100644 (file)
   </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 -->
index 2697ba1..d0f3e35 100644 (file)
    <!-- 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=) &amp;</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.
index 33507ae..f882a46 100644 (file)
@@ -84,7 +84,6 @@ $(_XunitEpilog)
     <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>
@@ -132,7 +131,9 @@ $(_XunitEpilog)
     "xunit.runner.msbuild": "2.1.0"
   },
   "frameworks": {
-    "net45": {}
+    "net45": {
+      "imports": "portable-net45+win8"
+    }
   }
 }
       ]]>
@@ -160,9 +161,11 @@ $(_XunitEpilog)
       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">
@@ -299,6 +302,16 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
 
   <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) &quot;$(XunitWrapperGeneratedCSDirBase.TrimEnd('\\'))&quot;"
+          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">
@@ -312,7 +325,8 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
 
   <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. 
index c5a44f3..1a42750 100644 (file)
@@ -6,6 +6,7 @@
     "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",
index 20e6284..081afc6 100644 (file)
@@ -5,8 +5,8 @@
   </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>