Split .Components.Build into .Blazor.Build+.Components.Build (#6538)

* Move Components.Build to blazor/src/. No content changes yet.

* Rename Components.Build to Blazor.Build and update file paths

* Move Components.Build.Test files. No content changes yet.

* Update contents in Blazor.Test

* Fix names of props/targets files

* Add minimal Components.Build package that just imports Razor targets and analyzer

* Make Blazor.Build depend on Components.Build and get Razor compilation targets from there

* Fix version of reference from .Blazor.Build to .Components.Build

* Fix signing error on local builds

* Update artifacts.props
This commit is contained in:
Steve Sanderson 2019-01-10 11:23:36 +00:00 committed by GitHub
parent ad11f890ef
commit 8446b260d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 296 additions and 191 deletions

View File

@ -31,6 +31,7 @@ This can be done once #4246 is complete, and done in conjunction with converting
<PackageArtifact Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Category="ship" /> <PackageArtifact Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Category="ship" /> <PackageArtifact Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.Blazor" Category="ship" /> <PackageArtifact Include="Microsoft.AspNetCore.Blazor" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.Blazor.Build" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.Blazor.Cli" Category="ship" /> <PackageArtifact Include="Microsoft.AspNetCore.Blazor.Cli" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.Blazor.Templates" Category="ship" /> <PackageArtifact Include="Microsoft.AspNetCore.Blazor.Templates" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.Components.Analyzers" Category="ship" /> <PackageArtifact Include="Microsoft.AspNetCore.Components.Analyzers" Category="ship" />

View File

@ -54,9 +54,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Compon
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StandaloneApp", "blazor\samples\StandaloneApp\StandaloneApp.csproj", "{B241434A-1642-44CC-AE9A-2012B5C5BD02}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StandaloneApp", "blazor\samples\StandaloneApp\StandaloneApp.csproj", "{B241434A-1642-44CC-AE9A-2012B5C5BD02}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build.Test", "test\Microsoft.AspNetCore.Components.Build.Test\Microsoft.AspNetCore.Components.Build.Test.csproj", "{709C7EBE-EB93-4F6D-9491-D714B0D2E898}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Build.Test", "blazor\test\Microsoft.AspNetCore.Blazor.Build.Test\Microsoft.AspNetCore.Blazor.Build.Test.csproj", "{709C7EBE-EB93-4F6D-9491-D714B0D2E898}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build", "src\Microsoft.AspNetCore.Components.Build\Microsoft.AspNetCore.Components.Build.csproj", "{8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Build", "blazor\src\Microsoft.AspNetCore.Blazor.Build\Microsoft.AspNetCore.Blazor.Build.csproj", "{8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser.JS", "src\Microsoft.AspNetCore.Components.Browser.JS\Microsoft.AspNetCore.Components.Browser.JS.csproj", "{8A19B1CE-9B62-4440-93B3-152DDBB39D0A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser.JS", "src\Microsoft.AspNetCore.Components.Browser.JS\Microsoft.AspNetCore.Components.Browser.JS.csproj", "{8A19B1CE-9B62-4440-93B3-152DDBB39D0A}"
EndProject EndProject
@ -96,6 +96,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser", "src\Microsoft.AspNetCore.Components.Browser\Microsoft.AspNetCore.Components.Browser.csproj", "{E52F5005-26EA-4764-8ECF-41D324AAA6D9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser", "src\Microsoft.AspNetCore.Components.Browser\Microsoft.AspNetCore.Components.Browser.csproj", "{E52F5005-26EA-4764-8ECF-41D324AAA6D9}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build", "src\Microsoft.AspNetCore.Components.Build\Microsoft.AspNetCore.Components.Build.csproj", "{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -334,6 +336,14 @@ Global
{E52F5005-26EA-4764-8ECF-41D324AAA6D9}.Release|Any CPU.Build.0 = Release|Any CPU {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.Release|Any CPU.Build.0 = Release|Any CPU
{E52F5005-26EA-4764-8ECF-41D324AAA6D9}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{E52F5005-26EA-4764-8ECF-41D324AAA6D9}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Release|Any CPU.Build.0 = Release|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -357,8 +367,8 @@ Global
{F8996835-41F7-4663-91DF-3B5652ADC37D} = {4D367450-96E9-4C8C-8B56-EED8ADE3A20D} {F8996835-41F7-4663-91DF-3B5652ADC37D} = {4D367450-96E9-4C8C-8B56-EED8ADE3A20D}
{7FD8C650-74B3-4153-AEA1-00F4F6AF393D} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {7FD8C650-74B3-4153-AEA1-00F4F6AF393D} = {B867E038-B3CE-43E3-9292-61568C46CDEB}
{B241434A-1642-44CC-AE9A-2012B5C5BD02} = {C7B9207E-BF85-422D-9EBC-E243C399F619} {B241434A-1642-44CC-AE9A-2012B5C5BD02} = {C7B9207E-BF85-422D-9EBC-E243C399F619}
{709C7EBE-EB93-4F6D-9491-D714B0D2E898} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} {709C7EBE-EB93-4F6D-9491-D714B0D2E898} = {32B33872-B599-4913-9F90-EDB5F9E24B18}
{8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4}
{8A19B1CE-9B62-4440-93B3-152DDBB39D0A} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {8A19B1CE-9B62-4440-93B3-152DDBB39D0A} = {B867E038-B3CE-43E3-9292-61568C46CDEB}
{8FD8636E-AFA5-434D-8857-06D02686741A} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} {8FD8636E-AFA5-434D-8857-06D02686741A} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E}
{2838CB6F-D2C7-4C0A-A994-C72E56F16984} = {4AE0D35B-D97A-44D0-8392-C9240377DCCE} {2838CB6F-D2C7-4C0A-A994-C72E56F16984} = {4AE0D35B-D97A-44D0-8392-C9240377DCCE}
@ -378,6 +388,7 @@ Global
{A42AC30B-45E3-4907-99A9-9ABDA45973D7} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} {A42AC30B-45E3-4907-99A9-9ABDA45973D7} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4}
{85813607-297F-4D39-92F7-89379FD80D70} = {32B33872-B599-4913-9F90-EDB5F9E24B18} {85813607-297F-4D39-92F7-89379FD80D70} = {32B33872-B599-4913-9F90-EDB5F9E24B18}
{E52F5005-26EA-4764-8ECF-41D324AAA6D9} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {E52F5005-26EA-4764-8ECF-41D324AAA6D9} = {B867E038-B3CE-43E3-9292-61568C46CDEB}
{ABDBB486-6F40-4EA0-8ED1-BF995F534F13} = {B867E038-B3CE-43E3-9292-61568C46CDEB}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {504DA352-6788-4DC0-8705-82167E72A4D3} SolutionGuid = {504DA352-6788-4DC0-8705-82167E72A4D3}

View File

@ -8,7 +8,7 @@
<PackageTags>aspnetcore;components</PackageTags> <PackageTags>aspnetcore;components</PackageTags>
<!-- So we can use the tool from source within the repo without having to pack --> <!-- So we can use the tool from source within the repo without having to pack -->
<BlazorToolsDir>$(MSBuildThisFileDirectory)src\Microsoft.AspNetCore.Components.Build\bin\$(Configuration)\netcoreapp3.0\</BlazorToolsDir> <BlazorToolsDir>$(MSBuildThisFileDirectory)blazor\src\Microsoft.AspNetCore.Blazor.Build\bin\$(Configuration)\netcoreapp3.0\</BlazorToolsDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@ -4,7 +4,7 @@
"AdxVerificationCompositeRule" "AdxVerificationCompositeRule"
], ],
"packages": { "packages": {
"Microsoft.AspNetCore.Components.Build": { "Microsoft.AspNetCore.Blazor.Build": {
"Exclusions": { "Exclusions": {
"ASSEMBLY_COMPANY": { "ASSEMBLY_COMPANY": {
"tools/Mono.Cecil.dll": "External package", "tools/Mono.Cecil.dll": "External package",

View File

@ -145,7 +145,7 @@ You can browse https://dotnet.myget.org/gallery/blazor-dev to find the current v
```xml ```xml
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="0.3.0-preview1-10220" /> <PackageReference Include="Microsoft.AspNetCore.Blazor" Version="0.3.0-preview1-10220" />
<PackageReference Include="Microsoft.AspNetCore.Components.Build" Version="0.3.0-preview1-10220" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.3.0-preview1-10220" PrivateAssets="all" />
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.3.0-preview1-10220" /> <DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.3.0-preview1-10220" />
</ItemGroup> </ItemGroup>
``` ```

View File

@ -9,7 +9,7 @@
</ItemGroup> </ItemGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> --> <!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<!-- Allow the build to specify the version of the Razor SDK directly --> <!-- Allow the build to specify the version of the Razor SDK directly -->

View File

@ -10,7 +10,7 @@
</ItemGroup> </ItemGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> --> <!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<!-- Allow the build to specify the version of the Razor SDK directly --> <!-- Allow the build to specify the version of the Razor SDK directly -->

View File

@ -11,7 +11,7 @@
</PropertyGroup> </PropertyGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> --> <!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<!-- Allow the build to specify the version of the Razor SDK directly --> <!-- Allow the build to specify the version of the Razor SDK directly -->

View File

@ -9,7 +9,7 @@
</ItemGroup> </ItemGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> --> <!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<!-- Allow the build to specify the version of the Razor SDK directly --> <!-- Allow the build to specify the version of the Razor SDK directly -->

View File

@ -5,7 +5,7 @@ using System;
using System.IO; using System.IO;
using Microsoft.Extensions.CommandLineUtils; using Microsoft.Extensions.CommandLineUtils;
namespace Microsoft.AspNetCore.Components.Build.Cli.Commands namespace Microsoft.AspNetCore.Blazor.Build.Cli.Commands
{ {
class ResolveRuntimeDependenciesCommand class ResolveRuntimeDependenciesCommand
{ {

View File

@ -5,7 +5,7 @@ using Microsoft.Extensions.CommandLineUtils;
using System; using System;
using System.IO; using System.IO;
namespace Microsoft.AspNetCore.Components.Build.Cli.Commands namespace Microsoft.AspNetCore.Blazor.Build.Cli.Commands
{ {
internal class WriteBootJsonCommand internal class WriteBootJsonCommand
{ {

View File

@ -1,10 +1,10 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Components.Build.Cli.Commands; using Microsoft.AspNetCore.Blazor.Build.Cli.Commands;
using Microsoft.Extensions.CommandLineUtils; using Microsoft.Extensions.CommandLineUtils;
namespace Microsoft.AspNetCore.Components.Build namespace Microsoft.AspNetCore.Blazor.Build
{ {
static class Program static class Program
{ {
@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Components.Build
{ {
var app = new CommandLineApplication var app = new CommandLineApplication
{ {
Name = "Microsoft.AspNetCore.Components.Build" Name = "Microsoft.AspNetCore.Blazor.Build"
}; };
app.HelpOption("-?|-h|--help"); app.HelpOption("-?|-h|--help");

View File

@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
namespace Microsoft.AspNetCore.Components.Build namespace Microsoft.AspNetCore.Blazor.Build
{ {
internal class BootJsonWriter internal class BootJsonWriter
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Components.Build namespace Microsoft.AspNetCore.Blazor.Build
{ {
internal class EmbeddedResourceInfo internal class EmbeddedResourceInfo
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Components.Build namespace Microsoft.AspNetCore.Blazor.Build
{ {
internal enum EmbeddedResourceKind internal enum EmbeddedResourceKind
{ {

View File

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
namespace Microsoft.AspNetCore.Components.Build namespace Microsoft.AspNetCore.Blazor.Build
{ {
internal class EmbeddedResourcesProcessor internal class EmbeddedResourcesProcessor
{ {

View File

@ -8,7 +8,7 @@ using System.IO;
using System.Linq; using System.Linq;
using Mono.Cecil; using Mono.Cecil;
namespace Microsoft.AspNetCore.Components.Build namespace Microsoft.AspNetCore.Blazor.Build
{ {
internal class RuntimeDependenciesResolver internal class RuntimeDependenciesResolver
{ {

View File

@ -0,0 +1,78 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Description>Build mechanism for ASP.NET Core Blazor applications.</Description>
<OutputType>Exe</OutputType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IsProductPackage>true</IsProductPackage>
</PropertyGroup>
<!-- Pack settings -->
<PropertyGroup>
<NoPackageAnalysis>true</NoPackageAnalysis>
<NuspecFile>Microsoft.AspNetCore.Blazor.Build.nuspec</NuspecFile>
<IntermediatePackDir>obj\publish\</IntermediatePackDir>
<PublishDir>$(IntermediatePackDir)$(TargetFramework)/</PublishDir>
</PropertyGroup>
<ItemGroup>
<!-- Assemblies built by this project -->
<SignedPackageFile Include="$(TargetFileName)" Certificate="$(AssemblySigningCertName)" />
<SignedPackageFile Include="Microsoft.AspNetCore.Components.Browser.JS.dll" Certificate="$(AssemblySigningCertName)" />
<SignedPackageFile Include="Microsoft.AspNetCore.Blazor.Build.exe" Certificate="$(AssemblySigningCertName)" />
<!-- 3rd party assemblies we redistribute. -->
<SignedPackageFile Include="AngleSharp.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.Mdb.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.Pdb.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.Rocks.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<!-- Assemblies which should be signed by other build. -->
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.CommandLineUtils.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Abstractions.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Composite.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Embedded.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Physical.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileSystemGlobbing.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.Primitives.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.JSInterop.dll" />
<ExcludePackageFileFromSigning Include="System.CodeDom.dll" />
<ExcludePackageFileFromSigning Include="System.Runtime.CompilerServices.Unsafe.dll" />
<ExcludePackageFileFromSigning Include="System.Text.Encoding.CodePages.dll" />
<!-- JS files -->
<ExcludePackageFileFromSigning Include="blazor.server.js" />
<ExcludePackageFileFromSigning Include="blazor.webassembly.js" />
</ItemGroup>
<!-- Executes /t:Publish for all target frameworks before packing-->
<Target Name="PublishAll" BeforeTargets="_IntermediatePack">
<PropertyGroup>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<NuspecProperties>
version=$(PackageVersion);
publishDir=$([MSBuild]::NormalizeDirectory($(IntermediatePackDir)));
componentsversion=$(ComponentsPackageVersion);
razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion);
blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion);
repositorycommit=$(RepositoryCommit);</NuspecProperties>
</PropertyGroup>
<ItemGroup>
<_TargetFramework Include="$(TargetFramework)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Publish" Properties="TargetFramework=%(_TargetFramework.Identity)" />
</Target>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.Components.Browser.JS\Microsoft.AspNetCore.Components.Browser.JS.csproj" />
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="$(AspNetCorePackageVersion)" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="$(AspNetCorePackageVersion)" />
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta7" />
<PackageReference Include="System.CodeDom" Version="4.4.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Microsoft.AspNetCore.Blazor.Build</id>
<version>$version$</version>
<authors>Microsoft</authors>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<description>Build mechanism for ASP.NET Core Components.</description>
<tags>aspnet components</tags>
<iconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
<licenseUrl>https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt</licenseUrl>
<projectUrl>https://asp.net/</projectUrl>
<repository type="git" url="https://github.com/aspnet/aspnetcore" commit="$repositorycommit$" />
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<dependencies>
<dependency id="Microsoft.AspNetCore.Components.Build" version="$componentsversion$" include="all" />
<dependency id="Microsoft.AspNetCore.Blazor.Mono" version="$blazormonoversion$" include="all" />
</dependencies>
</metadata>
<files>
<file src="..\..\..\THIRD-PARTY-NOTICES.txt" />
<file src="build\**" target="build" />
<file src="targets\**" target="targets" />
<file src="$publishdir$netcoreapp3.0\**\*" target="tools/" />
<file src="..\..\..\src\Microsoft.AspNetCore.Components.Browser.JS\dist\blazor.*.js" target="tools/blazor" />
</files>
</package>

View File

@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View File

@ -0,0 +1,59 @@
<Project>
<!--
Importing this file is equivalent to having:
<PackageDependency Include="Microsoft.AspNetCore.Blazor.Build" />
... except it's much more convenient when working in this repo, because it consumes the
Blazor.Build targets/exe directly without needing this project to be packed into a .nupkg.
This is only intended for use by other projects in this repo.
-->
<Import Project="$(MSBuildThisFileDirectory)../../../src/Microsoft.AspNetCore.Components.Build/ReferenceFromSource.props" />
<PropertyGroup>
<BlazorBuildReferenceFromSource>true</BlazorBuildReferenceFromSource>
<BlazorJsPath>$(MSBuildThisFileDirectory)../../../src/Microsoft.AspNetCore.Components.Browser.JS/dist/blazor.*.js</BlazorJsPath>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)targets/All.props" />
<Import Project="$(MSBuildThisFileDirectory)targets/All.targets" />
<!--
Debugging support using dotnet-blazor serve.
A few things to note here:
- We have to use dotnet exec to avoid launching another process and confusing the debugger.
- Since we're doing dotnet exec, it won't automatically rebuild the CLI project.
- $(AdditionalRunArguments) needs to be defined before importing this file.
-->
<PropertyGroup>
<RunCommand>dotnet</RunCommand>
<_BlazorCliLocation>$(MSBuildThisFileDirectory)../Microsoft.AspNetCore.Blazor.Cli/bin/$(Configuration)/netcoreapp3.0/dotnet-blazor.dll</_BlazorCliLocation>
<RunArguments>exec &quot;$(_BlazorCliLocation)&quot; serve $(AdditionalRunArguments)</RunArguments>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor.Mono" Version="$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
</ItemGroup>
<!-- This is used as a P2P when building the repo. Normal Blazor projects will get this as a reference through the Blazor.Build package -->
<ItemGroup>
<!-- Ensures these projects are built before the consuming project, but without
adding a runtime dependency on the .dll (to be equivalent to a <PackageDependency>
given that the packed version of this project wouldn't add a .dll reference) -->
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<!-- Optimization. Do not require framework compatibility between these projects. -->
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<UndefineProperties>TargetFramework</UndefineProperties>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<!-- When referencing from source, we need to disable VS's fast up-to-date check,
because otherwise changing the underlying Blazor library code isn't enough
to make it rebuild the affected library apps. -->
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\targets\All.props" />
</Project>

View File

@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\targets\All.targets" />
</Project>

View File

@ -0,0 +1,16 @@
<Project>
<Import Project="Blazor.MonoRuntime.props" />
<PropertyGroup>
<DefaultWebContentItemExcludes>$(DefaultWebContentItemExcludes);wwwroot\**</DefaultWebContentItemExcludes>
<!-- By default, enable auto rebuilds for debug builds. Note that the server will not enable it in production environments regardless. -->
<BlazorRebuildOnFileChange Condition="'$(Configuration)' == 'Debug' AND '$(BlazorRebuildOnFileChange)' == ''">true</BlazorRebuildOnFileChange>
<!-- By default, enable debugging for debug builds. -->
<BlazorEnableDebugging Condition="'$(Configuration)' == 'Debug' AND '$(BlazorEnableDebugging)' == ''">true</BlazorEnableDebugging>
<!-- When using IISExpress with a standalone app, there's no point restarting IISExpress after build. It slows things unnecessarily and breaks in-flight HTTP requests. -->
<NoRestartServerOnBuild>true</NoRestartServerOnBuild>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,32 @@
<Project>
<!-- Require rebuild if the targets change -->
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup>
<BlazorToolsDir Condition="'$(BlazorToolsDir)' == ''">$(MSBuildThisFileDirectory)../tools/</BlazorToolsDir>
<BlazorBuildExe>dotnet &quot;$(BlazorToolsDir)Microsoft.AspNetCore.Blazor.Build.dll&quot;</BlazorBuildExe>
<!-- The Blazor build code can only find your referenced assemblies if they are in the output directory -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<Import Project="Blazor.MonoRuntime.targets" />
<Import Project="Publish.targets" />
<Target Name="GenerateBlazorMetadataFile" BeforeTargets="GetCopyToOutputDirectoryItems">
<PropertyGroup>
<BlazorMetadataFileName>$(AssemblyName).blazor.config</BlazorMetadataFileName>
<BlazorMetadataFilePath>$(TargetDir)$(BlazorMetadataFileName)</BlazorMetadataFilePath>
</PropertyGroup>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Lines="$(MSBuildProjectFullPath)" Overwrite="true" Encoding="Unicode"/>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Lines="$(OutDir)$(AssemblyName).dll" Overwrite="false" Encoding="Unicode"/>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Condition="'$(BlazorRebuildOnFileChange)'=='true'" Lines="autorebuild:true" Overwrite="false" Encoding="Unicode"/>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Condition="'$(BlazorEnableDebugging)'=='true'" Lines="debug:true" Overwrite="false" Encoding="Unicode"/>
<ItemGroup>
<ContentWithTargetPath Include="$(BlazorMetadataFilePath)" TargetPath="$(BlazorMetadataFileName)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>
</Project>

View File

@ -2,11 +2,12 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class BindRazorIntegrationTest : RazorIntegrationTestBase public class BindRazorIntegrationTest : RazorIntegrationTestBase
{ {

View File

@ -7,7 +7,7 @@ using System;
using System.Linq; using System.Linq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class BootJsonWriterTest public class BootJsonWriterTest
{ {

View File

@ -1,13 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class ChildContentRazorIntegrationTest : RazorIntegrationTestBase public class ChildContentRazorIntegrationTest : RazorIntegrationTestBase
{ {

View File

@ -3,12 +3,13 @@
using System; using System;
using System.Linq; using System.Linq;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class ComponentRenderingRazorIntegrationTest : RazorIntegrationTestBase public class ComponentRenderingRazorIntegrationTest : RazorIntegrationTestBase
{ {

View File

@ -4,12 +4,13 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Layouts; using Microsoft.AspNetCore.Components.Layouts;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
// Integration tests for Blazor's directives // Integration tests for Blazor's directives
public class DirectiveRazorIntegrationTest : RazorIntegrationTestBase public class DirectiveRazorIntegrationTest : RazorIntegrationTestBase

View File

@ -4,13 +4,14 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class GenericComponentRazorIntegrationTest : RazorIntegrationTestBase public class GenericComponentRazorIntegrationTest : RazorIntegrationTestBase
{ {

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
@ -34,11 +34,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\blazor\samples\StandaloneApp\StandaloneApp.csproj" /> <ProjectReference Include="..\..\samples\StandaloneApp\StandaloneApp.csproj" />
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Components.Build\Microsoft.AspNetCore.Components.Build.csproj" /> <ProjectReference Include="..\..\src\Microsoft.AspNetCore.Blazor.Build\Microsoft.AspNetCore.Blazor.Build.csproj" />
<!-- Shared sources --> <!-- Shared sources -->
<Compile Include="..\shared\**\*.cs" Link="Helpers\%(Filename)%(Extension)" /> <Compile Include="..\..\..\test\shared\**\*.cs" Link="Helpers\%(Filename)%(Extension)" />
</ItemGroup> </ItemGroup>
<!-- A bit of msbuild magic to support reference resolver tests --> <!-- A bit of msbuild magic to support reference resolver tests -->

View File

@ -10,6 +10,7 @@ using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
@ -22,7 +23,7 @@ using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
using Xunit.Sdk; using Xunit.Sdk;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class RazorIntegrationTestBase public class RazorIntegrationTestBase
{ {

View File

@ -3,12 +3,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.AspNetCore.Components.Test.Helpers;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
// Integration tests for the end-to-end of successful Razor compilation of component definitions // Integration tests for the end-to-end of successful Razor compilation of component definitions
// Includes running the component code to verify the output. // Includes running the component code to verify the output.

View File

@ -6,7 +6,7 @@ using System.IO;
using System.Linq; using System.Linq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Components.Build.Test namespace Microsoft.AspNetCore.Blazor.Build.Test
{ {
public class RuntimeDependenciesResolverTest public class RuntimeDependenciesResolverTest
{ {

View File

@ -1,5 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<ComponentsPackageVersion>$(PackageVersion)</ComponentsPackageVersion>
<!-- When editing any version prefix here, remember also to update <!-- When editing any version prefix here, remember also to update
tooling\Microsoft.VisualStudio.BlazorExtension\Properties\AssemblyInfo.cs tooling\Microsoft.VisualStudio.BlazorExtension\Properties\AssemblyInfo.cs
to include the new version in its upper bounds --> to include the new version in its upper bounds -->

View File

@ -10,8 +10,8 @@
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" /> <ProjectReference Include="..\..\src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" />
</ItemGroup> </ItemGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Components.Build" /> --> <!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
<Import Project="..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\blazor\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<!-- Allow the build to specify the version of the Razor SDK directly --> <!-- Allow the build to specify the version of the Razor SDK directly -->

View File

@ -28,7 +28,7 @@ function loadResourceFromElement(element: HTMLElement) {
}); });
} }
// Keep in sync with BootJsonData in Microsoft.AspNetCore.Components.Build // Keep in sync with BootJsonData in Microsoft.AspNetCore.Blazor.Build
interface BootJsonData { interface BootJsonData {
main: string; main: string;
entryPoint: string; entryPoint: string;

View File

@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<Description>Build mechanism for ASP.NET Core Components.</Description> <Description>Build mechanism for ASP.NET Core components.</Description>
<OutputType>Exe</OutputType> <OutputType>Library</OutputType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IsProductPackage>true</IsProductPackage> <IsProductPackage>true</IsProductPackage>
</PropertyGroup> </PropertyGroup>
@ -12,62 +11,15 @@
<PropertyGroup> <PropertyGroup>
<NoPackageAnalysis>true</NoPackageAnalysis> <NoPackageAnalysis>true</NoPackageAnalysis>
<NuspecFile>Microsoft.AspNetCore.Components.Build.nuspec</NuspecFile> <NuspecFile>Microsoft.AspNetCore.Components.Build.nuspec</NuspecFile>
<IntermediatePackDir>obj\publish\</IntermediatePackDir>
<PublishDir>$(IntermediatePackDir)$(TargetFramework)/</PublishDir>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <Target Name="PrepareNuspecProperties" BeforeTargets="_IntermediatePack">
<!-- Assemblies built by this project -->
<SignedPackageFile Include="$(TargetFileName)" Certificate="$(AssemblySigningCertName)" />
<SignedPackageFile Include="Microsoft.AspNetCore.Components.Browser.JS.dll" Certificate="$(AssemblySigningCertName)" />
<SignedPackageFile Include="Microsoft.AspNetCore.Components.Build.exe" Certificate="$(AssemblySigningCertName)" />
<!-- 3rd party assemblies we redistribute. -->
<SignedPackageFile Include="AngleSharp.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.Mdb.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.Pdb.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<SignedPackageFile Include="Mono.Cecil.Rocks.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
<!-- Assemblies which should be signed by other build. -->
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.CommandLineUtils.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Abstractions.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Composite.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Embedded.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileProviders.Physical.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.FileSystemGlobbing.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.Extensions.Primitives.dll" />
<ExcludePackageFileFromSigning Include="Microsoft.JSInterop.dll" />
<ExcludePackageFileFromSigning Include="System.CodeDom.dll" />
<ExcludePackageFileFromSigning Include="System.Runtime.CompilerServices.Unsafe.dll" />
<ExcludePackageFileFromSigning Include="System.Text.Encoding.CodePages.dll" />
</ItemGroup>
<!-- Executes /t:Publish for all target frameworks before packing-->
<Target Name="PublishAll" BeforeTargets="_IntermediatePack">
<PropertyGroup> <PropertyGroup>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<NuspecProperties> <NuspecProperties>
version=$(PackageVersion); version=$(PackageVersion);
publishDir=$([MSBuild]::NormalizeDirectory($(IntermediatePackDir))); repositorycommit=$(RepositoryCommit);
razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion); </NuspecProperties>
blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion);
repositorycommit=$(RepositoryCommit);</NuspecProperties>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<_TargetFramework Include="$(TargetFramework)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Publish" Properties="TargetFramework=%(_TargetFramework.Identity)" />
</Target> </Target>
<ItemGroup>
<ProjectReference Include="..\Microsoft.AspNetCore.Components.Browser.JS\Microsoft.AspNetCore.Components.Browser.JS.csproj" />
<ProjectReference Include="..\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="$(AspNetCorePackageVersion)" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="$(AspNetCorePackageVersion)" />
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta7" />
<PackageReference Include="System.CodeDom" Version="4.4.0" />
</ItemGroup>
</Project> </Project>

View File

@ -14,14 +14,11 @@
<requireLicenseAcceptance>true</requireLicenseAcceptance> <requireLicenseAcceptance>true</requireLicenseAcceptance>
<dependencies> <dependencies>
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$version$" include="all" /> <dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$version$" include="all" />
<dependency id="Microsoft.AspNetCore.Blazor.Mono" version="$blazormonoversion$" include="all" />
</dependencies> </dependencies>
</metadata> </metadata>
<files> <files>
<file src="..\..\THIRD-PARTY-NOTICES.txt" /> <file src="..\..\THIRD-PARTY-NOTICES.txt" />
<file src="build\**" target="build" /> <file src="build\**" target="build" />
<file src="targets\**" target="targets" /> <file src="targets\**" target="targets" />
<file src="$publishdir$netcoreapp3.0\**\*" target="tools/" />
<file src="..\Microsoft.AspNetCore.Components.Browser.JS\dist\blazor.*.js" target="tools\blazor" />
</files> </files>
</package> </package>

View File

@ -1,3 +0,0 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Build.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View File

@ -4,54 +4,13 @@
Importing this file is equivalent to having: Importing this file is equivalent to having:
<PackageDependency Include="Microsoft.AspNetCore.Components.Build" /> <PackageDependency Include="Microsoft.AspNetCore.Components.Build" />
... except it's much more convenient when working in this repo, because it consumes the ... except it's much more convenient when working in this repo, because it consumes the
Blazor.Build targets/exe directly without needing this project to be packed into a .nupkg. Components.Build targets directly without needing this project to be packed into a .nupkg.
This is only intended for use by other projects in this repo. This is only intended for use by other projects in this repo.
--> -->
<PropertyGroup>
<BlazorBuildReferenceFromSource>true</BlazorBuildReferenceFromSource>
<BlazorJsPath>$(MSBuildThisFileDirectory)../Microsoft.AspNetCore.Components.Browser.JS/dist/blazor.*.js</BlazorJsPath>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)targets/All.props" /> <Import Project="$(MSBuildThisFileDirectory)targets/All.props" />
<Import Project="$(MSBuildThisFileDirectory)targets/All.targets" /> <Import Project="$(MSBuildThisFileDirectory)targets/All.targets" />
<!--
Debugging support using dotnet-blazor serve.
A few things to note here:
- We have to use dotnet exec to avoid launching another process and confusing the debugger.
- Since we're doing dotnet exec, it won't automatically rebuild the CLI project.
- $(AdditionalRunArguments) needs to be defined before importing this file.
-->
<PropertyGroup>
<RunCommand>dotnet</RunCommand>
<_BlazorCliLocation>$(MSBuildThisFileDirectory)../../blazor/src/Microsoft.AspNetCore.Blazor.Cli/bin/$(Configuration)/netcoreapp3.0/dotnet-blazor.dll </_BlazorCliLocation>
<RunArguments>exec $(_BlazorCliLocation) serve $(AdditionalRunArguments)</RunArguments>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor.Mono" Version="$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
</ItemGroup>
<!-- This is used as a P2P when building the repo. Normal Blazor projects will get this as a reference through the Blazor.Build package -->
<ItemGroup>
<!-- Ensures these projects are built before the consuming project, but without
adding a runtime dependency on the .dll (to be equivalent to a <PackageDependency>
given that the packed version of this project wouldn't add a .dll reference) -->
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Components.Build.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<!-- Optimization. Do not require framework compatibility between these projects. -->
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<UndefineProperties>TargetFramework</UndefineProperties>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<!-- When referencing from source, we need to disable VS's fast up-to-date check,
because otherwise changing the underlying Blazor library code isn't enough
to make it rebuild the affected library apps. -->
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
</Project> </Project>

View File

@ -1,16 +1,2 @@
<Project> <Project>
<Import Project="Blazor.MonoRuntime.props" />
<PropertyGroup>
<DefaultWebContentItemExcludes>$(DefaultWebContentItemExcludes);wwwroot\**</DefaultWebContentItemExcludes>
<!-- By default, enable auto rebuilds for debug builds. Note that the server will not enable it in production environments regardless. -->
<BlazorRebuildOnFileChange Condition="'$(Configuration)' == 'Debug' AND '$(BlazorRebuildOnFileChange)' == ''">true</BlazorRebuildOnFileChange>
<!-- By default, enable debugging for debug builds. -->
<BlazorEnableDebugging Condition="'$(Configuration)' == 'Debug' AND '$(BlazorEnableDebugging)' == ''">true</BlazorEnableDebugging>
<!-- When using IISExpress with a standalone app, there's no point restarting IISExpress after build. It slows things unnecessarily and breaks in-flight HTTP requests. -->
<NoRestartServerOnBuild>true</NoRestartServerOnBuild>
</PropertyGroup>
</Project> </Project>

View File

@ -1,33 +1,5 @@
<Project> <Project>
<!-- Require rebuild if the targets change -->
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup>
<BlazorToolsDir Condition="'$(BlazorToolsDir)' == ''">$(MSBuildThisFileDirectory)../tools/</BlazorToolsDir>
<BlazorBuildExe>dotnet &quot;$(BlazorToolsDir)Microsoft.AspNetCore.Components.Build.dll&quot;</BlazorBuildExe>
<!-- The Blazor build code can only find your referenced assemblies if they are in the output directory -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<Import Project="RazorCompilation.targets" /> <Import Project="RazorCompilation.targets" />
<Import Project="Blazor.MonoRuntime.targets" />
<Import Project="Publish.targets" />
<Target Name="GenerateBlazorMetadataFile" BeforeTargets="GetCopyToOutputDirectoryItems">
<PropertyGroup>
<BlazorMetadataFileName>$(AssemblyName).blazor.config</BlazorMetadataFileName>
<BlazorMetadataFilePath>$(TargetDir)$(BlazorMetadataFileName)</BlazorMetadataFilePath>
</PropertyGroup>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Lines="$(MSBuildProjectFullPath)" Overwrite="true" Encoding="Unicode"/>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Lines="$(OutDir)$(AssemblyName).dll" Overwrite="false" Encoding="Unicode"/>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Condition="'$(BlazorRebuildOnFileChange)'=='true'" Lines="autorebuild:true" Overwrite="false" Encoding="Unicode"/>
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Condition="'$(BlazorEnableDebugging)'=='true'" Lines="debug:true" Overwrite="false" Encoding="Unicode"/>
<ItemGroup>
<ContentWithTargetPath Include="$(BlazorMetadataFilePath)" TargetPath="$(BlazorMetadataFileName)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>
</Project> </Project>

View File

@ -1,7 +1,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Browser.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Browser.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Build.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Server.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Server.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View File

@ -7,8 +7,8 @@
<AdditionalRunArguments>--pathbase /subdir</AdditionalRunArguments> <AdditionalRunArguments>--pathbase /subdir</AdditionalRunArguments>
</PropertyGroup> </PropertyGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Components.Build" /> --> <!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\..\blazor\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\blazor\src\Microsoft.AspNetCore.Blazor\Microsoft.AspNetCore.Blazor.csproj" /> <ProjectReference Include="..\..\..\blazor\src\Microsoft.AspNetCore.Blazor\Microsoft.AspNetCore.Blazor.csproj" />
<ProjectReference Include="..\TestContentPackage\TestContentPackage.csproj" /> <ProjectReference Include="..\TestContentPackage\TestContentPackage.csproj" />

View File

@ -21,8 +21,8 @@
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" /> <ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" />
</ItemGroup> </ItemGroup>
<!-- In real content packages, use a <PackageReference> to Microsoft.AspNetCore.Components.Build instead. --> <!-- In real content packages, use a <PackageReference> to Microsoft.AspNetCore.Blazor.Build instead. -->
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" /> <Import Project="..\..\..\blazor\src\Microsoft.AspNetCore.Blazor.Build\ReferenceFromSource.props" />
<ItemGroup> <ItemGroup>
<!-- Allow the build to specify the version of the Razor SDK directly --> <!-- Allow the build to specify the version of the Razor SDK directly -->