I have a 3rd party SDK which was installed via VSIX / NuGet package.
Let’s call it FoodFight/CoolKids for Windows.
I’m working on a VSIX that does a wizard implementation of this SDK as part of its functionality.
Here’s the weird part: When I attempt to create a project type included with the 3rd party SDK installation (CoolKids class, using the Project sdk) it loads fine. But when I try to use my custom project (NewKids project) with the <Project Sdk=FoodFight.CoolKids.sdk> it cannot find the sdk.
Initial research into the problem with ProcMon revealed the following:
It seems to have something to do with the way that Visual Studio searches for the sdk.
When initially creating the custom project or creating other CoolKids projects:
–It finds the SDK in “C:\Users\catAtGat\.nuget\packages\foodfight.coolkids.sdk\19.0\”
–or it will check the registry key: “HKLM\SOFTWARE\WOW6432Node\FoodFight.NET CoolKids\19.0\Product_Directory”
–––Where it finds: C:\Program Files (x86)\FoodFight CoolKids V19.0\CoolKids\
Between these two locations it’s able to work just fine.
But once within the actual NewKids project, it looks elsewhere:
”C:\Program Files\Common Files\Foodfight\MeFt\dotnet.exe”,
“C:\Program Files (x86)\Common Files\Foodfight\CoolKids\dotnet.exe”,
“C:\Program Files\dotnet\sdk\9.0.304\Sdks\FoodFight.CoolKids.Sdk\Sdk”, and
“C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Sdks\FoodFight.CoolKids.Sdk\Sdk”
None of these resolve to a location where the SDK is actually located, and so the project fails to load.
My Question to you fine answerers:
How can I get my custom project to look in the same places as the 3rd party projects are?
Or, why does it load from the correct location when using the 3rd party project types, but not my own?
Any documentation on this subject that I can read?