Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Target .NET Standard 2.0 #276

Merged
merged 1 commit into from
Jun 8, 2017
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
5 changes: 3 additions & 2 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework' AND '$(OutputType)'=='library'">
<PackageReference Include="NETStandard.Library" Version="$(BundledNETStandardPackageVersion)" />
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'">
<PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" PrivateAssets="All" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions build/dependencies.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project>
<PropertyGroup>
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
<CoreFxVersion>4.3.0</CoreFxVersion>
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
<NETStandardLibraryNETFrameworkVersion>2.0.0-*</NETStandardLibraryNETFrameworkVersion>
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion>
<TestSdkVersion>15.3.0-*</TestSdkVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Commonly used types:
Microsoft.Extensions.FileProviders.IDirectoryContents
Microsoft.Extensions.FileProviders.IFileInfo
Microsoft.Extensions.FileProviders.IFileProvider</Description>
<TargetFramework>netstandard1.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>files;filesystem</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<Description>Composite file and directory providers for Microsoft.Extensions.FileProviders.</Description>
<TargetFramework>netstandard1.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>files;filesystem</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public EmbeddedFileProvider(Assembly assembly, string baseNamespace)

_lastModified = DateTimeOffset.UtcNow;

// need to keep netstandard1.0 until ASP.NET Core 2.0 because it is a breaking change if we remove it
#if NETSTANDARD1_5 || NET46
if (!string.IsNullOrEmpty(_assembly.Location))
{
try
Expand All @@ -68,10 +66,6 @@ public EmbeddedFileProvider(Assembly assembly, string baseNamespace)
{
}
}
#elif NETSTANDARD1_0
#else
#error Target frameworks need to be updated.
#endif
}

/// <summary>
Expand Down Expand Up @@ -190,4 +184,4 @@ private static bool HasInvalidPathChars(string path)
return path.IndexOfAny(_invalidFileNameChars) != -1;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<Description>File provider for files in embedded resources for Microsoft.Extensions.FileProviders.</Description>
<TargetFrameworks>netstandard1.0;netstandard1.5;net46</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>files;filesystem</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<Description>File provider for physical files for Microsoft.Extensions.FileProviders.</Description>
<TargetFramework>netstandard1.3</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>files;filesystem</PackageTags>
Expand All @@ -14,7 +14,6 @@
<Compile Include="..\..\shared\**\*.cs" />
<ProjectReference Include="..\Microsoft.Extensions.FileProviders.Abstractions\Microsoft.Extensions.FileProviders.Abstractions.csproj" />
<ProjectReference Include="..\Microsoft.Extensions.FileSystemGlobbing\Microsoft.Extensions.FileSystemGlobbing.csproj" />
<PackageReference Include="System.IO.FileSystem.Watcher" Version="$(CoreFxVersion)" />
</ItemGroup>

</Project>
Loading