|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk">
|
2 | 2 |
|
3 | 3 | <PropertyGroup>
|
4 |
| - <TargetFramework>netstandard2.0</TargetFramework> |
| 4 | + <TargetFrameworks>$(DefaultNetCoreTargetFramework);net46</TargetFrameworks> |
5 | 5 | <TargetName>Microsoft.AspNetCore.Blazor.Build.Tasks</TargetName>
|
6 | 6 | <AssemblyName>Microsoft.AspNetCore.Blazor.Build</AssemblyName>
|
7 | 7 | <Description>Build mechanism for ASP.NET Core Blazor applications.</Description>
|
8 | 8 | <IsShippingPackage>true</IsShippingPackage>
|
9 | 9 | <HasReferenceAssembly>false</HasReferenceAssembly>
|
10 |
| - <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> |
| 10 | + <GenerateDependencyFile>false</GenerateDependencyFile> |
11 | 11 | </PropertyGroup>
|
12 | 12 |
|
13 | 13 | <!-- Pack settings -->
|
|
27 | 27 | </ItemGroup>
|
28 | 28 |
|
29 | 29 | <ItemGroup>
|
30 |
| - <ProjectReference Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj" ReferenceOutputAssembly="false" /> |
31 |
| - <Reference Include="Microsoft.Build.Framework" PrivateAssets="All" /> |
32 |
| - <Reference Include="Microsoft.Build.Utilities.Core" PrivateAssets="All" /> |
33 |
| - <Reference Include="System.Reflection.Metadata" /> |
| 30 | + <ProjectReference Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" |
| 31 | + Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj" |
| 32 | + ReferenceOutputAssembly="false" |
| 33 | + SkipGetTargetFrameworkProperties="true" |
| 34 | + UndefineProperties="TargetFramework" /> |
| 35 | + <Reference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" /> |
| 36 | + <Reference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" /> |
| 37 | + <Reference Include="System.Reflection.Metadata" Condition="'$(TargetFramework)' == 'net46'" /> |
34 | 38 | </ItemGroup>
|
35 | 39 |
|
36 |
| - <Target Name="CopyBuildTask" BeforeTargets="Build" AfterTargets="PrepareForRun"> |
| 40 | + <Target Name="CopyBuildTask" BeforeTargets="Build" Condition="'$(IsInnerBuild)' != 'true'"> |
37 | 41 | <!--
|
38 | 42 | The task produced by this project is referenced within this solution. When building, Visual Studio will lock up the assembly.
|
39 | 43 | Any attempts to overwrite the binary with a newer version will fail. This is particularly grating if a developer "Rebuilds" the project
|
|
46 | 50 | -->
|
47 | 51 |
|
48 | 52 | <ItemGroup>
|
49 |
| - <_FilesToCopy Include="$(OutputPath)*.*" /> |
| 53 | + <_NetCoreFilesToCopy Include="$(OutputPath)$(DefaultNetCoreTargetFramework)\*" TargetPath="netcoreapp\" /> |
| 54 | + <_DesktopFilesToCopy Include="$(OutputPath)net46\*.*" TargetPath="netfx\" /> |
| 55 | + <_AllFilesToCopy Include="@(_NetCoreFilesToCopy);@(_DesktopFilesToCopy)" /> |
50 | 56 | </ItemGroup>
|
51 | 57 |
|
52 |
| - <Copy SourceFiles="@(_FilesToCopy)" DestinationFolder="$(OutputPath)tools" SkipUnchangedFiles="true" Retries="1" ContinueOnError="true"> |
| 58 | + <Error Text="No files found in $(OutputPath)$(DefaultNetCoreTargetFramework)" Condition="@(_NetCoreFilesToCopy->Count()) == 0" /> |
| 59 | + <Error Text="No files found in $(OutputPath)net46" Condition="@(_DesktopFilesToCopy->Count()) == 0" /> |
| 60 | + |
| 61 | + <Copy SourceFiles="@(_AllFilesToCopy)" DestinationFiles="@(_AllFilesToCopy->'$(OutputPath)tools\%(TargetPath)%(FileName)%(Extension)')" SkipUnchangedFiles="true" Retries="1" ContinueOnError="true"> |
53 | 62 | <Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
|
54 | 63 | </Copy>
|
55 | 64 | </Target>
|
|
0 commit comments