Skip to content

Commit f717438

Browse files
committed
[ExtensionsMetadataGenerator] changing Bad IL errors to messages rather than warnings
1 parent df947d0 commit f717438

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tools/ExtensionsMetadataGenerator/src/ExtensionsMetadataGenerator.Console/ExtensionsMetadataGenerator.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ public static void Generate(string sourcePath, string outputPath, ConsoleLogger
5252
logger.LogMessage($"Found extension: {foundRef.TypeName}");
5353
}
5454
}
55-
catch (FileNotFoundException ex)
55+
catch (Exception ex) when (ex is FileNotFoundException || ex is BadImageFormatException)
5656
{
57-
// Don't log this as an error. This will almost always happen due to some publishing artifacts (i.e. Razor) existing
58-
// in the functions bin folder without all of their dependencies present. These will almost never have Functions extensions,
59-
// so we don't want to write out errors every time there is a build. This message can be seen with detailed logging enabled.
57+
// Don't log this as an error. This will almost always happen due to some publishing artifacts (i.e. Razor) existing in the
58+
// functions bin folder without all of their dependencies present, or native package artifacts being copied to the bin folder
59+
// These will almost never have Functions extensions, so we don't want to write out errors every time there is a build.
60+
// This message can be seen with detailed logging enabled.
6061
logger.LogMessage($"Could not evaluate '{Path.GetFileName(path)}' for extension metadata. If this assembly contains a Functions extension, ensure that all dependent assemblies exist in '{sourcePath}'. If this assembly does not contain any Functions extensions, this message can be ignored. Exception message: {ex.Message}");
6162
}
6263
catch (Exception ex)

tools/ExtensionsMetadataGenerator/src/ExtensionsMetadataGenerator/ExtensionsMetadataGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\build\metadatagenerator.props" />
33
<PropertyGroup>
4-
<VersionPrefix>1.1.4</VersionPrefix>
4+
<VersionPrefix>1.1.8</VersionPrefix>
55
<OutputType>Library</OutputType>
66
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
77
<AssemblyName>Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator</AssemblyName>

0 commit comments

Comments
 (0)