Puresharp
Puresharp copied to clipboard
Puresharp fails on build with error code -532462766
When I try to build and start my Asp.Net Web API, I get the error:
Unhandled Exception: System.ArgumentException: Value does not fall within the expected range.
1> at Mono.Cecil.Pdb.ISymUnmanagedWriter2.DefineLocalVariable2(String name, Int32 attributes, Int32 sigToken, Int32 addrKind, Int32 addr1, Int32 addr2, Int32 addr3, Int32 startOffset, Int32 endOffset)
1> at Mono.Cecil.Pdb.NativePdbWriter.DefineScope(ScopeDebugInformation scope, MethodDebugInformation info, MetadataToken& import_parent)
1> at Mono.Cecil.Pdb.NativePdbWriter.DefineScope(ScopeDebugInformation scope, MethodDebugInformation info, MetadataToken& import_parent)
1> at Mono.Cecil.Pdb.NativePdbWriter.Write(MethodDebugInformation info)
1> at Mono.Cecil.Cil.CodeWriter.WriteResolvedMethodBody(MethodDefinition method)
1> at Mono.Cecil.Cil.CodeWriter.WriteMethodBody(MethodDefinition method)
1> at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
1> at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
1> at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
1> at Mono.Cecil.MetadataBuilder.AddTypes()
1> at Mono.Cecil.MetadataBuilder.BuildTypes()
1> at Mono.Cecil.MetadataBuilder.BuildModule()
1> at Mono.Cecil.MetadataBuilder.BuildMetadata()
1> at Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _)
1> at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
1> at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
1> at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
1> at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
1> at IPuresharp.Program.Manage(String assembly)
1> at IPuresharp.Program.Main(String[] arguments
1>C:\Users\myuser\source\repos\RedisTest\packages\IPuresharp.5.0.5\build\net452\IPuresharp.targets(10,5): error MSB3073: The command ""C:\Users\myuser\source\repos\RedisTest\packages\IPuresharp.5.0.5\build\net452\IPuresharp.exe" "C:\Users\myuser\source\repos\RedisTest\RedisTest\bin\RedisTest.dll"" exited with code -532462766.)
The error is not very descriptive.
I'm using Puresharp 5.0.5 with Visual Studio 2019.
Same problem, VS2017 and VS2019 both throws this error on build attempt
Any updates on this?
Also experiencing this issue... :-/
Me too. Puresharp works fine in a clean WinForms application, but in a "real" project with multiple classes and packages, it fails with error code -532462766
Here is a hobby example project which doesn't have much code, I went back to a very early commit to find out what the problem is, but couldn't find it. Please have a look. TMCWorkbench.zip
I got this issue, basically it was not able to find the path to puresharp.exe tried creating a userprofile variable, but that also did not work Deleted the nuget and ran it again it ran fine
I got this issue, basically it was not able to find the path to puresharp.exe tried creating a userprofile variable, but that also did not work Deleted the nuget and ran it again it ran fine
This issue is intermittent, Still don't know the reason for this. It keeps on happening! Any fix ??
I have been able to reproduce this in multiple projects with 100% accuracy. For me this happens when doing resource scoping via "using" statement. Here's an example:
[TestMethod]
public void TestMethod1()
{
using (var timer = new System.Threading.Timer((i) => { return; }))
{
Console.WriteLine("TestMethod 1");
}
}
Hope this helps as it would be great to be able to use these kinds of statements.