提交 8bfd5b25 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #16058 from jaredpar/fix-copy

Fix ability to run portable tests with TDD, F5, etc ... 
......@@ -21,6 +21,10 @@
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.TraceSource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
......
......@@ -21,10 +21,22 @@
</PropertyGroup>
</When>
<When Condition="'$(RoslynProjectType)' == 'UnitTestPortable' or '$(RoslynProjectType)' == 'UnitTestDesktop'">
<!-- Portable DLLs don't have a supported mechanism for deploying their dependencies
as a part of a normal build. This breaks developer workflows like F5, TDD, and
standard unit testing.
For developer convenience we use an unsupported way of deploying dependencies. This
includes NuGet and standard references. This is not done on official builds because
it's not a supported mechanism hence we don't rely on it for official validation.
This bug tracks getting an official solution out of MSBuild.
https://github.com/Microsoft/msbuild/issues/1499 -->
<PropertyGroup>
<_CopyReferences>false</_CopyReferences>
<_CopyProjectReferences>false</_CopyProjectReferences>
<_CopyReferences>$(DeveloperBuild></_CopyReferences>
<_CopyProjectReferences>$(DeveloperBuild></_CopyProjectReferences>
<_IsAnyUnitTest>true</_IsAnyUnitTest>
<_IsAnyPortableUnitTest>true</_IsAnyPortableUnitTest>
<CopyNuGetImplementations>false</CopyNuGetImplementations>
<OutDir>$(OutDir)Dlls\$(MSBuildProjectName)\</OutDir>
</PropertyGroup>
......@@ -347,6 +359,7 @@
==================================================================================== -->
<PropertyGroup>
<PrepareResourcesDependsOn>DeployPortableOnDeveloperBuild;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn>
<TargetFrameworkMonikerAssemblyAttributesPath>$(IntermediateOutputPath)$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)</TargetFrameworkMonikerAssemblyAttributesPath>
<PostCompileBinaryModificationSentinelFile>$(IntermediateOutputPath)$(TargetFileName).pcbm</PostCompileBinaryModificationSentinelFile>
<OptimizationDataFolderPath>$(NuGetPackageRoot)\RoslynDependencies.OptimizationData\2.0.0-rc-61101-16\content\OptimizationData</OptimizationDataFolderPath>
......@@ -417,6 +430,27 @@
</Target>
<!-- This is part of our developer convenience work to allow easy testing of our portable
unit test projects. It's a similar mechanism to CopyNuGetImplementations but is
both unsupported and somewhat special cased to our build setup.
This bug tracks getting an official solution out of MSBuild.
https://github.com/Microsoft/msbuild/issues/1499 -->
<Target Name="DeployPortableOnDeveloperBuild"
Condition="'$(_IsAnyPortableUnitTest)' == 'true' and '$(DeveloperBuild)' == 'true' and '$(OS)' == 'Windows_NT'">
<ResolveNuGetPackageAssets
IncludeFrameworkReferences="true"
NuGetPackagesDirectory="$(NuGetPackageRoot)"
RuntimeIdentifier="win7"
ProjectLanguage="$(ProjectLanguage)"
ProjectLockFile="$(MSBuildThisFileDirectory)..\..\src\Test\DeployDesktopTestRuntime\project.lock.json"
TargetMonikers=".NETFramework,Version=v4.6">
<Output TaskParameter="ResolvedCopyLocalItems" ItemName="ReferenceCopyLocalPaths" />
</ResolveNuGetPackageAssets>
</Target>
<!-- Returns the current build version. Used in .vsixmanifests to substitute our build version into them -->
<Target Name="GetBuildVersion" Outputs="$(VsixVersion)" />
</Project>
......@@ -3,6 +3,11 @@
<Import Project="Versions.props"/>
<PropertyGroup>
<JenkinsBuild>false</JenkinsBuild>
<JenkinsBuild Condition="'$(JENKINS_HOME)' != ''">true</JenkinsBuild>
<DeveloperBuild>false</DeveloperBuild>
<DeveloperBuild Condition="'$(OfficialBuild)' != 'true' and '$(JenkinsBuild)' != 'true'">true</DeveloperBuild>
<ProjectDir>$(MSBuildThisFileDirectory)..\..\</ProjectDir>
<NuGetToolPath>$(ProjectDir)nuget.exe</NuGetToolPath>
<ToolsetPackagesDir>$(ProjectDir)build\ToolsetPackages\</ToolsetPackagesDir>
......
......@@ -45,16 +45,20 @@
<PlatformTarget>ARM</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Any CPU' ">
<PlatformTarget></PlatformTarget>
<PlatformTarget>
</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Any CPU' ">
<PlatformTarget></PlatformTarget>
<PlatformTarget>
</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget></PlatformTarget>
<PlatformTarget>
</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget></PlatformTarget>
<PlatformTarget>
</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<InternalsVisibleToTest Include="Roslyn.Test.Utilities.Desktop" />
......@@ -114,6 +118,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>TestResource.resx</DependentUpon>
</Compile>
<Compile Include="ThrowingTraceListener.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TestResource.resx">
......@@ -124,4 +129,4 @@
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
<ProjectExtensions />
</Project>
</Project>
\ No newline at end of file
......@@ -12,7 +12,7 @@ namespace Microsoft.CodeAnalysis
// <trace>
// <listeners>
// <remove name="Default" />
// <add name="ThrowingTraceListener" type="Microsoft.CodeAnalysis.ThrowingTraceListener, Roslyn.Test.Utilities.Desktop" />
// <add name="ThrowingTraceListener" type="Microsoft.CodeAnalysis.ThrowingTraceListener, Roslyn.Test.Utilities" />
// </listeners>
// </trace>
// </system.diagnostics>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册