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

Unable to build solution with Rider #328

Open
Onebitl0st opened this issue Jan 26, 2023 · 6 comments
Open

Unable to build solution with Rider #328

Onebitl0st opened this issue Jan 26, 2023 · 6 comments

Comments

@Onebitl0st
Copy link

OS: Windows 10
IDE: Rider version 2022.3.1
Package verision: 2.9.4-preview.2

Hello!
I'm switching from deprecated Tinkoff package Nunit.Allure to your package Allure.Nunit version 2.9.4-preview.2.
Upgrading to this package caused an error in my Rider, and I'm unable to build solution with it.

Because it uses AspectInjector inside - build fails with Aspect Injector processing has failed. See other errors
During a little dig into - found that there is no AspectInjector.exe inside build folder - .nuget\packages\aspectinjector\2.8.1\build\_bin\win-x64 .

Tried to download .exe from nuget, added to build folder.

Then build fails with

aspectinjector\2.8.1\buildTransitive\netstandard2.0\AspectInjector.targets(102,5): error MSB4062: The "Microsoft.Build.Tasks.GetFrameworkSdkPath" task could not be loaded from the assembly Microsoft.Build.Tasks.Co
re, Version=[15.1.0.0](http://15.1.0.0/), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft
.Build.Framework.ITask. [D:\Git\unite-services-tests\src\APITests\APITests.csproj] 

Tried to add Microsoft.Build.Tasks.Core according version - but there are no results, and error stays same.

Did you faced same issue? If you need any additional information, feel free to contact me

@undron
Copy link
Contributor

undron commented Jan 27, 2023

Just successfully built new project with Rider 2022.3.1.
Which dotnet version do you use? Try to clean up project and nuget cache folder.

@Onebitl0st
Copy link
Author

Onebitl0st commented Jan 27, 2023

Hello @undron
I'm using .net6 6.0.403

Steps i've done:

  1. Deleted all from .nuget/packages - this resolved Aspect Injector processing has failed. See other errors problem.
  2. After this - The "Microsoft.Build.Tasks.GetFrameworkSdkPath" task could not be loaded from the assembly Microsoft.Build.Tasks.Co re, Version=[15.1.0.0](http://15.1.0.0/), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft .Build.Framework.ITask. [D:\Git\unite-services-tests\src\APITests\APITests.csproj] still were on same place.
  3. But also I've noticed that Rider may build solution using built-in MSBuild.exe. Tried to switch to - this led to Successfull building of solution locally, but - still nothing on basic dotnet build after switching back and rebuilding solution. Because I'm using dotnet build on build agents - this is primary build system, and I should stick with.
  4. Trying to figure out problem added
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
    <Message Text="SDKPATH: $(FrameworkSdkPath)" Importance="high" />
  </Target>

to solution build - and it's empty. Maybe this might be related.
5. Trying to compare MSBuilded version and Dotnet build version - leads to a lot of differences between, and also a lot inside of folders in build folder. One of obvious - src\APITests\bin\Debug\net6.0 contains folders and some empty log files for MSBuild - but there is a lot of dll's and other things from solution.

@neparij
Copy link
Contributor

neparij commented Jan 31, 2023

@Onebitl0st Hello!
I'll try to reproduce your issue in the same environment as you have.

@Onebitl0st
Copy link
Author

@neparij Hello! Thank you very much. Feel free to contact me, if you need any help

@Onebitl0st
Copy link
Author

Hello @neparij !
Did you got a chance to take a look?

@neparij
Copy link
Contributor

neparij commented Mar 21, 2023

I've tried several times to reproduce, but no chance.
We are also using dotnet to build frameworks on build agents.
Could you build an empty project with AspectInjector dependency only using dotnet toolset?

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

3 participants