Change libraries from netcoreapp2.0 to netstandard2.0 where possible

This commit is contained in:
Steve Sanderson 2018-01-03 15:37:31 +00:00
parent 78d12da33e
commit d3092dd787
7 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes>

View File

@ -41,7 +41,7 @@ namespace Microsoft.Blazor.Build.Core.FileSystem
var referenceNames = binFiles
.Where(file => !string.Equals(file.Name, assemblyNameWithExtension))
.Select(file => file.Name);
var referencesAttribute = string.Join(',', referenceNames.ToArray());
var referencesAttribute = string.Join(",", referenceNames.ToArray());
return $"<script src=\"/_framework/blazor.js\"" +
$" main=\"{assemblyNameWithExtension}\"" +

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Exe</OutputType>
<OutDir>tools</OutDir>
</PropertyGroup>

View File

@ -44,12 +44,12 @@ namespace Microsoft.Blazor.Internal.Common.FileProviders
{
_file = file;
if (!file.PhysicalPath.StartsWith('/'))
if (!file.PhysicalPath.StartsWith("/"))
{
throw new ArgumentException($"For mounted files, {nameof(file.PhysicalPath)} must start with '/'. Value supplied: '{file.PhysicalPath}'.");
}
if (!mountPoint.StartsWith('/'))
if (!mountPoint.StartsWith("/"))
{
throw new ArgumentException("The path must start with '/'", nameof(mountPoint));
}
@ -60,7 +60,7 @@ namespace Microsoft.Blazor.Internal.Common.FileProviders
}
else
{
if (mountPoint.EndsWith('/'))
if (mountPoint.EndsWith("/"))
{
throw new ArgumentException("Non-root paths must not end with '/'", nameof(mountPoint));
}

View File

@ -18,7 +18,7 @@ namespace Microsoft.Blazor.Internal.Common.FileProviders
private readonly IDictionary<string, InMemoryDirectoryContents> _directoriesByFullPath;
// It's convenient to use forward slash, because it matches URL conventions
public const char DirectorySeparatorChar = '/';
public const string DirectorySeparatorChar = "/";
public InMemoryFileProvider(IEnumerable<(string, byte[])> contents) : this(
contents.Select(pair => InMemoryFileInfo

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -3,7 +3,7 @@
<Import Project="..\mono\mono.targets" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>