diff options
author | Matt Ward <matt.ward@microsoft.com> | 2019-05-23 18:55:20 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2019-05-24 11:53:17 +0300 |
commit | 3dcff63ff654f66f96d6302ba3e322874cc999bd (patch) | |
tree | 77e924a80dc8ee76355ef08f54d39a37909f2a24 /main/tests/test-projects | |
parent | e51df35c159e30a8bbf18ab6f77b0d21019e34d0 (diff) |
[Core] Build all frameworks in multi-target project
When running MSBuild targets the TargetFramework property was explicitly
set so that multi-target framework projects work for targets such as
ResolveAssemblyReferences. However setting this property prevents
MSBuild from building all frameworks for a project using the
cross-target MSBuild targets. To fix this when the Build or Clean
MSBuild targets are run the TargetFramework is not set. This allows
all frameworks to be built by MSBuild.
Fixes VSTS #572330 - Support building multi-targeted projects
Diffstat (limited to 'main/tests/test-projects')
-rwxr-xr-x | main/tests/test-projects/multi-target/MyClass.cs | 5 | ||||
-rw-r--r-- | main/tests/test-projects/multi-target/multi-target2.csproj | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/main/tests/test-projects/multi-target/MyClass.cs b/main/tests/test-projects/multi-target/MyClass.cs new file mode 100755 index 0000000000..2e091cdafd --- /dev/null +++ b/main/tests/test-projects/multi-target/MyClass.cs @@ -0,0 +1,5 @@ +using System;
+
+class MyClass
+{
+}
\ No newline at end of file diff --git a/main/tests/test-projects/multi-target/multi-target2.csproj b/main/tests/test-projects/multi-target/multi-target2.csproj new file mode 100644 index 0000000000..b9fe5f4c78 --- /dev/null +++ b/main/tests/test-projects/multi-target/multi-target2.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>netcoreapp1.1;netstandard1.0</TargetFrameworks> + </PropertyGroup> + + <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' "> + <PackageReference Include="Newtonsoft.Json" Version="10.0.1" /> + </ItemGroup> +</Project> |