System.InvalidCastException
JohnRedGater
Posts: 17
When I build my application, I get the following message:
Warning 7 Failed: System.InvalidCastException: Specified cast is not valid.
at „..(IEnumerable`1 )
at „..( methodBody, & blockData, IDictionary`2 instructionIndexToIlOffsetMap)
at „..( , Dictionary`2 )
at ..()
at ..()
at ..( , FileInfo , IAssemblyWriterOptions )
at ..()
at SmartAssembly.ConsoleApp.OnProcessingFeedback(Object , )
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at ..[](EventHandler`1 , )
at ..(ProjectProcessingStep , Exception )
at ..()
at SmartAssembly.ConsoleApp.PerformBuild(String , , Dictionary`2 )
at SmartAssembly.ConsoleApp.PerformProjectAction(String , , Todo , Dictionary`2 )
at SmartAssembly.ConsoleApp.CommandLineAction(String , Todo , Dictionary`2 )
at SmartAssembly.ConsoleApp.Run(String[] )
This is then followed by:
Error 6 SmartAssembly build failed:
Failed: System.InvalidCastException: Specified cast is not valid.
at „..(IEnumerable`1 )
at „..( methodBody, & blockData, IDictionary`2 instructionIndexToIlOffsetMap)
at „..( , Dictionary`2 )
at ..()
at ..()
at ..( , FileInfo , IAssemblyWriterOptions )
at ..()
Both exceptions show up in column 5, line 144 of project.csproj
Warning 7 Failed: System.InvalidCastException: Specified cast is not valid.
at „..(IEnumerable`1 )
at „..( methodBody, & blockData, IDictionary`2 instructionIndexToIlOffsetMap)
at „..( , Dictionary`2 )
at ..()
at ..()
at ..( , FileInfo , IAssemblyWriterOptions )
at ..()
at SmartAssembly.ConsoleApp.OnProcessingFeedback(Object , )
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at ..[](EventHandler`1 , )
at ..(ProjectProcessingStep , Exception )
at ..()
at SmartAssembly.ConsoleApp.PerformBuild(String , , Dictionary`2 )
at SmartAssembly.ConsoleApp.PerformProjectAction(String , , Todo , Dictionary`2 )
at SmartAssembly.ConsoleApp.CommandLineAction(String , Todo , Dictionary`2 )
at SmartAssembly.ConsoleApp.Run(String[] )
This is then followed by:
Error 6 SmartAssembly build failed:
Failed: System.InvalidCastException: Specified cast is not valid.
at „..(IEnumerable`1 )
at „..( methodBody, & blockData, IDictionary`2 instructionIndexToIlOffsetMap)
at „..( , Dictionary`2 )
at ..()
at ..()
at ..( , FileInfo , IAssemblyWriterOptions )
at ..()
Both exceptions show up in column 5, line 144 of project.csproj
Comments
Please click on “Check For Updates†(under “Tools†on the left hand side) and upgrade SmartAssembly. (to v6.5.2.21)
Please let us know if the problem is fixed (or not)
James Davies
Technical Support Engineer
Red Gate Software