This change modifies the ReadyToRun test so that it verifies assembly version resiliency.
public void TestMultipleLoads()
{
-#if V2
- string testVersion = "2";
-#else
- string testVersion = "1";
-#endif
- Assembly a = LoadFromAssemblyPath(Path.Combine(Directory.GetCurrentDirectory(), "NI", "testv" + testVersion + ".ni.dll"));
+ Assembly a = LoadFromAssemblyPath(Path.Combine(Directory.GetCurrentDirectory(), "NI", "test.ni.dll"));
Assert.AreEqual(AssemblyLoadContext.GetLoadContext(a), this);
}
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="testv1.csproj">
+ <ProjectReference Include="testv1\testv1.csproj">
<Project>{F74F55A1-DFCF-4C7C-B462-E96E1D0BB667}</Project>
</ProjectReference>
</ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
- <Reference Include="testv1">
- <HintPath>$(TargetDir)\testv1.dll</HintPath>
+ <Reference Include="test">
+ <HintPath>$(TargetDir)\testv1\test.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup>
<_CLRTestPreCommands><![CDATA[
$(_CLRTestPreCommands)
IF not exist NI mkdir NI
-%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\testv1.ni.dll testv1.dll
+COPY /Y testv1\test.dll test.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\test.ni.dll test.dll
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\mainv1.ni.exe mainv1.exe
- ]]></_CLRTestPreCommands>
+]]></_CLRTestPreCommands>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <DefineConstants>$(DefineConstants);STATIC;CORECLR;V2</DefineConstants>
+ <DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="testv2.csproj">
- <Project>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</Project>
+ <ProjectReference Include="testv1\testv1.csproj">
+ <Project>{F74F55A1-DFCF-4C7C-B462-E96E1D0BB667}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
- <Reference Include="testv2">
- <HintPath>$(TargetDir)\testv2.dll</HintPath>
+ <Reference Include="test">
+ <HintPath>$(TargetDir)\testv1\test.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup>
<_CLRTestPreCommands><![CDATA[
$(_CLRTestPreCommands)
IF not exist NI mkdir NI
-%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\testv2.ni.dll testv2.dll
+COPY /Y testv1\test.dll test.dll
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\mainv2.ni.exe mainv2.exe
+COPY /Y testv2\test.dll test.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\test.ni.dll test.dll
]]></_CLRTestPreCommands>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Collections" version="4.0.10-beta-22512" />
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.IO" version="4.0.10-beta-22412" />
+ <package id="System.IO.FileSystem" version="4.0.0-beta-22412" />
+ <package id="System.Reflection" version="4.0.10-beta-22512" />
+ <package id="System.Reflection.Extensions" version="4.0.0-beta-22412" />
+ <package id="System.Runtime" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Runtime.InteropServices" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Loader" version="4.0.0-beta-22512" />
+</packages>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <AssemblyName>testv1</AssemblyName>
+ <AssemblyName>test</AssemblyName>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F74F55A1-DFCF-4C7C-B462-E96E1D0BB667}</ProjectGuid>
<OutputType>library</OutputType>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <Compile Include="test.cs" />
+ <Compile Include="..\test.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Collections" version="4.0.10-beta-22512" />
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.IO" version="4.0.10-beta-22412" />
+ <package id="System.IO.FileSystem" version="4.0.0-beta-22412" />
+ <package id="System.Reflection" version="4.0.10-beta-22512" />
+ <package id="System.Reflection.Extensions" version="4.0.0-beta-22412" />
+ <package id="System.Runtime" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Runtime.InteropServices" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Loader" version="4.0.0-beta-22512" />
+</packages>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <AssemblyName>testv2</AssemblyName>
+ <AssemblyName>test</AssemblyName>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
<OutputType>library</OutputType>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC;CORECLR;V2</DefineConstants>
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <Compile Include="test.cs" />
+ <Compile Include="..\test.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />