麻雀System.OutOfMemoryException
Fody System.OutOfMemoryException
我有一个 Xamarin Forms 项目,我在其中使用 PropertyChanged.Fody。
我已经更新到 3.2.8 版本,当我尝试编译 PCL 项目时触发此错误。
我在 Visual Studio 16.6.0 Windows。
我该如何解决这个问题?
Severity Code Description Project File Line Suppression State
Error Fody: An unhandled exception occurred:
Exception:
Exception of type 'System.OutOfMemoryException' was thrown.
Type:
System.OutOfMemoryException
StackTrace:
at Mono.Cecil.PE.ByteBuffer.Grow(Int32 desired) in C:\Code\Fody\cecil\Mono.Cecil.PE\ByteBuffer.cs:line 328
at Mono.Cecil.PE.ByteBuffer.WriteBytes(Byte[] bytes) in C:\Code\Fody\cecil\Mono.Cecil.PE\ByteBuffer.cs:line 274
at Mono.Cecil.MetadataBuilder.AddResources() in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 1181
at Mono.Cecil.MetadataBuilder.BuildModule() in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 1031
at Mono.Cecil.MetadataBuilder.BuildMetadata() in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 1006
at Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 144
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read) in C:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:line 947
at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 143
at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 119
at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 78
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) in C:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:line 1136
at InnerWeaver.WriteModule() in C:\projects\fody\FodyIsolated\ModuleWriter.cs:line 19
at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 114
Source:
Mono.Cecil
TargetSite:
Void Grow(Int32)
SgatOffline 1
But how can I tell to Fody to ignore that database's file?
要从 Visual Studio 编译中排除文件,请尝试以下提示。
1.Set Build Action 到 None 要排除的文件。
2.Right 单击文件夹并选择 从项目中排除。
参考:How to exclude files from Visual Studio compile?
我有一个 Xamarin Forms 项目,我在其中使用 PropertyChanged.Fody。
我已经更新到 3.2.8 版本,当我尝试编译 PCL 项目时触发此错误。
我在 Visual Studio 16.6.0 Windows。
我该如何解决这个问题?
Severity Code Description Project File Line Suppression State
Error Fody: An unhandled exception occurred:
Exception:
Exception of type 'System.OutOfMemoryException' was thrown.
Type:
System.OutOfMemoryException
StackTrace:
at Mono.Cecil.PE.ByteBuffer.Grow(Int32 desired) in C:\Code\Fody\cecil\Mono.Cecil.PE\ByteBuffer.cs:line 328
at Mono.Cecil.PE.ByteBuffer.WriteBytes(Byte[] bytes) in C:\Code\Fody\cecil\Mono.Cecil.PE\ByteBuffer.cs:line 274
at Mono.Cecil.MetadataBuilder.AddResources() in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 1181
at Mono.Cecil.MetadataBuilder.BuildModule() in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 1031
at Mono.Cecil.MetadataBuilder.BuildMetadata() in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 1006
at Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 144
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read) in C:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:line 947
at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 143
at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 119
at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters) in C:\Code\Fody\cecil\Mono.Cecil\AssemblyWriter.cs:line 78
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) in C:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:line 1136
at InnerWeaver.WriteModule() in C:\projects\fody\FodyIsolated\ModuleWriter.cs:line 19
at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 114
Source:
Mono.Cecil
TargetSite:
Void Grow(Int32)
SgatOffline 1
But how can I tell to Fody to ignore that database's file?
要从 Visual Studio 编译中排除文件,请尝试以下提示。
1.Set Build Action 到 None 要排除的文件。
2.Right 单击文件夹并选择 从项目中排除。
参考:How to exclude files from Visual Studio compile?