Modify precompilation to always generate instrumentation

This commit is contained in:
Pranav K 2014-10-14 16:08:30 -07:00
parent 5fa8a91111
commit 2d67f2fc27
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,8 @@ namespace Microsoft.AspNet.Mvc.Razor
Length = info.Length; Length = info.Length;
LastModified = info.LastModified; LastModified = info.LastModified;
Hash = info.Hash; Hash = info.Hash;
// Precompiled views are always instrumented.
IsInstrumented = true;
} }
/// <summary> /// <summary>

View File

@ -32,6 +32,7 @@ namespace Microsoft.AspNet.Mvc.Razor
{ {
_serviceProvider = designTimeServiceProvider; _serviceProvider = designTimeServiceProvider;
_host = host; _host = host;
_host.EnableInstrumentation = true;
var appEnv = _serviceProvider.GetService<IApplicationEnvironment>(); var appEnv = _serviceProvider.GetService<IApplicationEnvironment>();
_fileSystem = optionsAccessor.Options.FileSystem; _fileSystem = optionsAccessor.Options.FileSystem;