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"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes> <DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes>

View File

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

View File

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

View File

@ -44,12 +44,12 @@ namespace Microsoft.Blazor.Internal.Common.FileProviders
{ {
_file = file; _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}'."); 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)); throw new ArgumentException("The path must start with '/'", nameof(mountPoint));
} }
@ -60,7 +60,7 @@ namespace Microsoft.Blazor.Internal.Common.FileProviders
} }
else else
{ {
if (mountPoint.EndsWith('/')) if (mountPoint.EndsWith("/"))
{ {
throw new ArgumentException("Non-root paths must not end with '/'", nameof(mountPoint)); 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; private readonly IDictionary<string, InMemoryDirectoryContents> _directoriesByFullPath;
// It's convenient to use forward slash, because it matches URL conventions // 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( public InMemoryFileProvider(IEnumerable<(string, byte[])> contents) : this(
contents.Select(pair => InMemoryFileInfo contents.Select(pair => InMemoryFileInfo

View File

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

View File

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