testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Building testfx source code with VSCode / C# Dev Kit has issue with ExpandPriContent

Open fforjan opened this issue 2 years ago • 6 comments

When cloning the repository and trying to build within VSCode/C# DevKit, i'm getting this issue :

The "Microsoft.Build.Packaging.Pri.Tasks.ExpandPriContent" task could not be loaded from the assembly C:\Program Files\dotnet\sdk\8.0.100\Microsoft\VisualStudio\v17.0\AppxPackage\Microsoft.Build.Packaging.Pri.Tasks.dll. Could not load file or assembly 'C:\Program Files\dotnet\sdk\8.0.100\Microsoft\VisualStudio\v17.0\AppxPackage\Microsoft.Build.Packaging.Pri.Tasks.dll'. The system cannot find the path specified. 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. [C:\git\testfx\src\TestFramework\TestFramework.Extensions\TestFramework.Extensions.csproj::TargetFramework=net6.0-windows10.0.18362.0]

I found a workaround here : https://github.com/microsoft/WindowsAppSDK/issues/3548#issuecomment-1566057006

And if added to Directory.Build.Local.Props, I can build and compile within VScode...

I would be happy to contribute (and update the documentation to use VSCode for building) to this but not sure exactly if you already have a plan/fix for this on your side ?

fforjan avatar Dec 08 '23 20:12 fforjan

Hi @fforjan,

I am only using VSCode as some advanced notepad so I have to admit I have never tried to build or run tests from there. Happy to get some contribution if you are still willing to help.

Just want to confirm you only have some trouble from VSCode but CLI is working fine?!

Evangelink avatar Dec 11 '23 07:12 Evangelink

@Evangelink I have the same issue in command line, when using dotnet build

image

fforjan avatar Dec 17 '23 21:12 fforjan

Oh yeah I remember having seen this issue when I took over but I don't see it documented... Could you try to run the script https://github.com/microsoft/testfx/blob/main/eng/Install-WindowsSDK.ps1. If that's not working then it's a missing workload/feature but I would have to spend some time looking it up.

Evangelink avatar Dec 18 '23 08:12 Evangelink

Hi @fforjan,

Are you still interested in helping?

Evangelink avatar Jan 16 '24 16:01 Evangelink

@Evangelink I wanted to do this as part of a Christmas/Beginning of the year project but in the end, for personal reason, I could not free my time to do this. I'm afraid I need to remove my name from this :(

fforjan avatar Jan 21 '24 19:01 fforjan

@fforjan No worries! I hope everything is alright, take care!

Evangelink avatar Jan 22 '24 07:01 Evangelink