Bug 29521 - Mono.Cecil.ResolutionException: Failed to resolve System.Security.Permissions.FileIOPermissionAccess
Summary: Mono.Cecil.ResolutionException: Failed to resolve System.Security.Permissions...
Status: RESOLVED DUPLICATE of bug 28918
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime (show other bugs)
Version: XI 8.10
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-29 07:32 UTC by Rob Waggott
Modified: 2015-04-29 11:20 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Rob Waggott 2015-04-29 07:32:14 UTC
Repro steps: 
* Non-unified API iOS project
* On build or re-build I get the following error

Xamarin.iOS 8.10.0 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
Mono.Cecil.ResolutionException: Failed to resolve System.Security.Permissions.FileIOPermissionAccess
  at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum (Mono.Cecil.TypeReference enum_type) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArgument (Mono.Collections.Generic.Collection`1& fields, Mono.Collections.Generic.Collection`1& properties) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArguments (UInt16 count, Mono.Collections.Generic.Collection`1& fields, Mono.Collections.Generic.Collection`1& properties) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SignatureReader.ReadSecurityAttribute () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.MetadataReader.ReadSecurityDeclarationSignature (Mono.Cecil.SecurityDeclaration declaration) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SecurityDeclaration.<Resolve>m__1 (Mono.Cecil.SecurityDeclaration declaration, Mono.Cecil.MetadataReader reader) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.Read[SecurityDeclaration,SecurityDeclaration] (Mono.Cecil.SecurityDeclaration item, System.Func`3 read) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SecurityDeclaration.Resolve () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.SecurityDeclaration.get_SecurityAttributes () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ImmediateModuleReader.ReadSecurityDeclarations (ISecurityDeclarationProvider provider) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ImmediateModuleReader.ReadMethods (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ImmediateModuleReader.ReadType (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ImmediateModuleReader.ReadTypes (Mono.Collections.Generic.Collection`1 types) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ImmediateModuleReader.ReadModule (Mono.Cecil.ModuleDefinition module) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at MTouch.SaveAssembly (Mono.Cecil.AssemblyDefinition assembly, System.String destination) [0x00000] in <filename unknown>:0 
  at MonoTouch.Assembly.RemoveResources (Boolean remove_resources, System.String target_directory, System.String nores_directory) [0x00000] in <filename unknown>:0 
  at MonoTouch.Target.ProcessAssemblies () [0x00000] in <filename unknown>:0 
  at MonoTouch.Application.BuildApp () [0x00000] in <filename unknown>:0 
  at MonoTouch.Application.Build () [0x00000] in <filename unknown>:0 
  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-04-29 08:08:08 UTC
Can you attach your project so that we can reproduce this ourselves?
Comment 2 Sebastien Pouliot 2015-04-29 11:20:56 UTC
@Rob you can workaround this by commenting security declaration (CAS attribute-like) in your code.

*** This bug has been marked as a duplicate of bug 28918 ***

Note You need to log in before you can comment on or make changes to this bug.