Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5-k opened this issue Jul 28, 2020 · 3 comments
Open

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

5-k opened this issue Jul 28, 2020 · 3 comments

Comments

@5-k
Copy link

5-k commented Jul 28, 2020

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

@5-k 5-k changed the title The Advice is not invoked in .Net Core 3.1 The Advice is not invoked in .Net Core 3.1 & .Net Core 2.1. Jul 28, 2020
@5-k
Copy link
Author

5-k commented Jul 28, 2020

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
Copy link
Author

5-k commented Jul 28, 2020

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
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants