Puresharper / Puresharp

Puresharp is a Framework that provides the essential APIs (AOP, IOC, etc...) to productively build high quality (.NET 4.5.2+ & .NET Core 2.1+) applications through reliability, scalability and performance without no compromise
MIT License
143 stars 17 forks source link

The Advice is not invoked in .Net Core 3.1 & .Net Core 2.1. #15

Open 5-k opened 4 years ago

5-k commented 4 years ago

Puresharp advice is not working on .Net Core 3.1 They work fine on .Net Framework

5-k commented 4 years ago

I Checked out previous open issues for not targeting .net core, i even tried fixed updating the IPuresharp.targets with

<Target Name="IPuresharp">
    <Exec Command="&quot;$(SolutionDir)packages\IPuresharp.4.2.5\build\IPuresharp.exe&quot; &quot;$(ProjectPath)&quot; &quot;$(Configuration)&quot;" Condition="Exists('$(SolutionDir)packages\IPuresharp.4.2.5\build\IPuresharp.exe')" />
    <Exec Command="&quot;C:\Users\pramishr\.nuget\packages\ipuresharp\4.2.5\build\IPuresharp.exe&quot; &quot;$(ProjectPath)&quot; &quot;$(Configuration)&quot;" Condition="!Exists('$(SolutionDir)packages\IPuresharp.4.2.5\build\IPuresharp.exe')" />
  </Target>

Still Get the error! And if I run again it runs fine without invoking AOP

1>------ Build started: Project: AOPTestNetCorePureSharp, Configuration: Debug Any CPU ------
1>AOPTestNetCorePureSharp -> C:\R\AOP\AopUsingRosyln\AOPTestNetCorePureSharp\bin\Debug\netcoreapp2.1\AOPTestNetCorePureSharp.dll
1>
1>Unhandled Exception: System.InvalidOperationException: Sequence contains no elements
1>   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
1>   at IPuresharp.Program.Main(String[] arguments)
1>C:\Users\pramishr\.nuget\packages\ipuresharp\4.2.5\build\IPuresharp.targets(11,5): error MSB3073: The command ""C:\Users\pramishr\.nuget\packages\ipuresharp\4.2.5\build\IPuresharp.exe" "C:\R\AOP\AopUsingRosyln\AOPTestNetCorePureSharp\AOPTestNetCorePureSharp.csproj" "Debug"" exited with code -532462766.
1>Done building project "AOPTestNetCorePureSharp.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
5-k commented 4 years ago
1>------ Build started: Project: AOPTestNetCorePureSharp, Configuration: Debug Any CPU ------
1>AOPTestNetCorePureSharp -> C:\R\AOP\AopUsingRosyln\AOPTestNetCorePureSharp\bin\Debug\netcoreapp2.1\AOPTestNetCorePureSharp.dll
1>
1>Unhandled Exception: System.ArgumentNullException: Value cannot be null.
1>Parameter name: method
1>   at Mono.Cecil.Mixin.CheckMethod(Object method)
1>   at Mono.Cecil.ModuleDefinition.ImportReference(MethodReference method, IGenericParameterProvider context)
1>   at IPuresharp.Importation.get_Item(MethodReference method)
1>   at IPuresharp.Authentic.Copy(MethodDefinition source, MethodDefinition destination, Importation importation, Instruction instruction, Dictionary`2 dictionary)
1>   at IPuresharp.Authentic.Manage(MethodDefinition method)
1>   at IPuresharp.Authentic..ctor(TypeDefinition type)
1>   at IPuresharp.Authority..ctor(TypeDefinition type)
1>   at IPuresharp.Program.Manage(TypeDefinition type)
1>   at IPuresharp.Program.Manage(String assembly)
1>   at IPuresharp.Program.Main(String[] arguments)
1>C:\Users\pramishr\.nuget\packages\ipuresharp\5.0.5\build\netcoreapp2.1\IPuresharp.targets(10,5): error MSB3073: The command ""C:\R\AOP\AopUsingRosyln\packages\IPuresharp.5.0.5\build\net452\IPuresharp.exe" "C:\R\AOP\AopUsingRosyln\AOPTestNetCorePureSharp\bin\Debug\netcoreapp2.1\AOPTestNetCorePureSharp.dll"" exited with code -532462766.
1>Done building project "AOPTestNetCorePureSharp.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Imperatorn commented 2 years ago

Any update on this?