File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
MetadataProcessor.Console Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -146,10 +146,8 @@ public void GenerateSkeleton(
146
146
}
147
147
catch ( Exception ex )
148
148
{
149
- System . Console . Error . WriteLine (
150
- "Unable to generate skeleton files" ) ;
151
-
152
- Environment . Exit ( 1 ) ;
149
+ System . Console . Error . WriteLine ( "Unable to generate skeleton files." ) ;
150
+ throw ;
153
151
}
154
152
}
155
153
Original file line number Diff line number Diff line change @@ -293,6 +293,15 @@ private void GenerateAssemblyLookup()
293
293
{
294
294
// grab native version from assembly attribute
295
295
var nativeVersionAttribute = _tablesContext . AssemblyDefinition . CustomAttributes . FirstOrDefault ( a => a ? . AttributeType ? . Name == "AssemblyNativeVersionAttribute" ) ;
296
+
297
+ // check for existing AssemblyNativeVersionAttribute
298
+ if ( nativeVersionAttribute == null )
299
+ {
300
+ throw new ArgumentException ( "Missing AssemblyNativeVersionAttribute." + Environment . NewLine +
301
+ "Make sure that AssemblyNativeVersionAttribute is defined in AssemblyInfo.cs, like this:" + Environment . NewLine +
302
+ "[assembly: AssemblyNativeVersion(\" 1.0.0.0\" )]" ) ;
303
+ }
304
+
296
305
Version nativeVersion = new Version ( ( string ) nativeVersionAttribute . ConstructorArguments [ 0 ] . Value ) ;
297
306
298
307
var assemblyLookup = new AssemblyLookupTable ( )
You can’t perform that action at this time.
0 commit comments