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

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy committed Jul 5, 2016
1 parent a7807d3 commit 2690da8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,19 @@ public EmbeddedFileProvider(Assembly assembly, string baseNamespace)

_lastModified = DateTimeOffset.UtcNow;

#if NETSTANDARD1_5
if (_assembly.Location != null)
#if NETSTANDARD1_5 || NET451
if (!string.IsNullOrEmpty(_assembly.Location))
{
_lastModified = File.GetLastWriteTimeUtc(_assembly.Location);
try
{
_lastModified = File.GetLastWriteTimeUtc(_assembly.Location);
}
catch (PathTooLongException)
{
}
catch (UnauthorizedAccessException)
{
}
}
#endif
}
Expand Down
4 changes: 3 additions & 1 deletion src/Microsoft.Extensions.FileProviders.Embedded/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
"System.Runtime.Extensions": "4.1.0-*"
},
"frameworks": {
// need to keep netstandard1.0 until ASP.NET Core 2.0 because it is a breaking change if we remove it
"netstandard1.0": { },
"netstandard1.5": {
"dependencies": {
"System.IO.FileSystem": "4.0.1-*",
"System.Reflection": "4.1.0-*"
}
}
},
"net451": { }
}
}

0 comments on commit 2690da8

Please sign in to comment.