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(
146146 }
147147 catch ( Exception ex )
148148 {
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 ;
153151 }
154152 }
155153
Original file line number Diff line number Diff line change @@ -293,6 +293,15 @@ private void GenerateAssemblyLookup()
293293 {
294294 // grab native version from assembly attribute
295295 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+
296305 Version nativeVersion = new Version ( ( string ) nativeVersionAttribute . ConstructorArguments [ 0 ] . Value ) ;
297306
298307 var assemblyLookup = new AssemblyLookupTable ( )
You can’t perform that action at this time.
0 commit comments