Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>@typeof(BlazorMultipleApps.FirstClient.Program)</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<StaticWebAssetBasePath>FirstApp</StaticWebAssetBasePath>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\BlazorMultipleApps.Shared\BlazorMultipleApps.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0"/>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

<!-- Enabling compression increases build time. We want to avoid this for tests so we
disable it here. This doesn't affect any test assertions. -->
<PropertyGroup>
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;

namespace BlazorMultipleApps.FirstClient
{
public class Program
{
public static void Main(string[] args)
{
GC.KeepAlive(typeof(Newtonsoft.Json.JsonConvert));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* First app.css */
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>

<head>
<title>BlazorMultipleApps</title>
<base href="/FirstApp/" />
<link href="css/app.css" rel="stylesheet" />
</head>

<body>
<script src="_framework/blazor.webassembly.js"></script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>@typeof(BlazorMultipleApps.SecondClient.Program)</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<StaticWebAssetBasePath>SecondApp</StaticWebAssetBasePath>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\BlazorMultipleApps.Shared\BlazorMultipleApps.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0"/>
</ItemGroup>

<!-- Enabling compression increases build time. We want to avoid this for tests so we
disable it here. This doesn't affect any test assertions. -->
<PropertyGroup>
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;

namespace BlazorMultipleApps.SecondClient
{
public class Program
{
public static void Main(string[] args)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Second app.css */
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>

<head>
<title>SecondBlazorApp</title>
<base href="/SecondApp/" />
<link href="css/app.css" rel="stylesheet" />
</head>

<body>
<script src="_framework/blazor.webassembly.js"></script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\BlazorMultipleApps.SecondClient\BlazorMultipleApps.SecondClient.csproj" />
<ProjectReference Include="..\BlazorMultipleApps.FirstClient\BlazorMultipleApps.FirstClient.csproj" />
<ProjectReference Include="..\BlazorMultipleApps.Shared\BlazorMultipleApps.Shared.csproj" />
</ItemGroup>

<!-- Enabling compression increases build time. We want to avoid this for tests so we
disable it here. This doesn't affect any test assertions. -->
<PropertyGroup>
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace BlazorMultipleApps.Server
{
public class Program
{
public static void Main(string[] args)
{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace BlazorMultipleApps.Shared
{
public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public string Summary { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
}
4 changes: 4 additions & 0 deletions src/BlazorWasmSdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Copyright (c) .NET Foundation. All rights reserved.
<_BlazorWebAssemblyTargetsFile Condition="'$(_BlazorWebAssemblyTargetsFile)' == ''">$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets</_BlazorWebAssemblyTargetsFile>
</PropertyGroup>

<ItemGroup>
<ProjectCapability Include="WebAssembly" />
</ItemGroup>

<Import Project="$(_BlazorWebAssemblyTargetsFile)" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<ItemGroup>
<_BlazorPublishBootResource
Include="@(ResolvedFileToPublish)"
Condition="$([System.String]::Copy('%(RelativePath)').Replace('\','/').StartsWith('wwwroot/_framework')) AND '%(Extension)' != '.a'" />
Condition="$([System.String]::Copy('%(RelativePath)').Replace('\','/').StartsWith($(_BlazorFrameworkPublishPath.Replace('\', '/')))) AND '%(Extension)' != '.a'" />
</ItemGroup>

<GetFileHash Files="@(_BlazorPublishBootResource)" Algorithm="SHA256" HashEncoding="base64">
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" Condition="'$(_RazorSdkImportsMicrosoftNetSdk)' == 'true'" />

<PropertyGroup Condition="'$(RazorSdkCurrentVersionTargets)' == ''">
<RazorSdkCurrentVersionTargets Condition="'$(IsCrossTargetingBuild)' != 'true'">$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
<RazorSdkCurrentVersionTargets>$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
</PropertyGroup>

<Import Project="$(RazorSdkCurrentVersionTargets)" />
Expand Down
3 changes: 3 additions & 0 deletions src/RazorSdk/Tasks/Microsoft.NET.Sdk.Razor.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@

<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\Tool\CommandLine\ArgumentEscaper.cs">
<Link>Shared\CommandLine\%(FileName)</Link>
</Compile>
<Compile Include="..\Tool\ServerProtocol\*.cs">
<Link>Shared\ServerProtocol\%(FileName)</Link>
</Compile>
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Tool/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public Application(

private string GetInformationalVersion()
{
var assembly = typeof(Application).GetTypeInfo().Assembly;
var assembly = typeof(Application).Assembly;
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
return attribute.InformationalVersion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using System.Text;

namespace Microsoft.NET.Sdk.Razor.Tool
namespace Microsoft.NET.Sdk.Razor.Tool.CommandLineUtils
{
/// <summary>
/// A utility for escaping arguments for new processes.
Expand Down
4 changes: 2 additions & 2 deletions src/RazorSdk/Tool/ServerProtocol/ServerConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.NET.Sdk.Razor.Tool.CommandLineUtils;

namespace Microsoft.NET.Sdk.Razor.Tool
{
Expand Down Expand Up @@ -296,8 +297,7 @@ internal static bool TryCreateServerCore(string clientDir, string pipeName, out
"-p",
pipeName
};
// var processArguments = ArgumentEscaper.EscapeAndConcatenate(argumentList);
var processArguments = argumentList.ToString();
var processArguments = ArgumentEscaper.EscapeAndConcatenate(argumentList);

if (!File.Exists(expectedCompilerPath))
{
Expand Down
Loading