On build, emit <clientproject>.blazor.config to the output dir - transitively into host projects too
This commit is contained in:
parent
c4fea86603
commit
d0096ec78e
|
|
@ -4,6 +4,8 @@
|
|||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- In real apps, the following items would come from the Microsoft.Blazor package -->
|
||||
<Import Project="..\..\src\Microsoft.Blazor.BuildTools\BlazorBuild.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Blazor\Microsoft.Blazor.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -4,4 +4,7 @@
|
|||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- In real apps, the following items would come from the Microsoft.Blazor package -->
|
||||
<Import Project="..\..\src\Microsoft.Blazor.BuildTools\BlazorBuild.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,15 @@
|
|||
-->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Blazor.DevHost\Microsoft.Blazor.DevHost.csproj" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Blazor\Microsoft.Blazor.csproj" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<RunArguments>run --project ..\..\src\Microsoft.Blazor.DevHost --no-build serve</RunArguments>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- In real apps, the following items would come from the Microsoft.Blazor package -->
|
||||
<Import Project="..\..\src\Microsoft.Blazor.BuildTools\BlazorBuild.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Blazor\Microsoft.Blazor.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
<Project>
|
||||
<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"/>
|
||||
<ItemGroup>
|
||||
<ContentWithTargetPath Include="$(BlazorMetadataFilePath)" TargetPath="$(BlazorMetadataFileName)" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue