WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Setting WindowsPackageType to None makes Visual Studio think it is missing SDK references

Open Balkoth opened this issue 1 year ago • 7 comments

Describe the bug

Setting WindowsPackageType to None makes Visual Studio think it is missing SDK references. I could not find any information on how to resolve this, the project builds and runs fine. Is there something wrong with my installation or is this common behaviour?

What needs to be done to get rid of those exclamation marks?

Steps to reproduce the bug

  1. Create a new WinUI3 project
  2. Add <WindowsPackageType>None</WindowsPackageType>
  3. An SDK node gets added under Dependencies with exclamation marks showing something is wrong image

Expected behavior

No response

Screenshots

No response

NuGet package version

1.1.4

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Windows 10 version 21H2 (19044, November 2021 Update)

IDE

Visual Studio 2022

Additional context

No response

Balkoth avatar Aug 18 '22 07:08 Balkoth

Just curious. I also ran into the, somewhat same issue with <WindowsPackageType>None</WindowsPackageType> are you getting any errors when building?

This is what I got when I set the WindowsPackageType property to none.

https://github.com/microsoft/WindowsAppSDK/issues/2671

dhoehna avatar Aug 29 '22 19:08 dhoehna

In a C# project I do not see any build errors.

Balkoth avatar Aug 29 '22 19:08 Balkoth

I was able to repro the issue.

All locations referenced via VS are on my computer. I verified all of them.

@btueffers do you know of any VS folks who could chime in and tell us what the issue is?

Dotnet restore does not work. Says everything is up to date. @DrusTheAxe do you know if WASDK behind-the-scenes magic adds SDK depdencies?

dhoehna avatar Aug 29 '22 19:08 dhoehna

Dotnet restore does not work. Says everything is up to date. @DrusTheAxe do you know if WASDK behind-the-scenes magic adds SDK depdencies?

If you're making a packaged app then yes, I think VCLibs may be automagically added to your manifest. Not sure that's going on here or any other 'magic' VS props/targets may be doing. But I know who to ask ;-)

@Scottj1s @evelynwu-msft ?

DrusTheAxe avatar Aug 30 '22 21:08 DrusTheAxe

This issue is fixed in the next release of Windows App SDK, 1.2 Preview 1.

Internal: https://dev.azure.com/microsoft/WinUI/_git/microsoft-ui-xaml-lift/pullrequest/7348995?_a=files

Scottj1s avatar Aug 30 '22 21:08 Scottj1s

This issue is fixed in the next release of Windows App SDK, 1.2 Preview 1.

Tight. Can this be closed then?

dhoehna avatar Aug 30 '22 21:08 dhoehna

It's generally best to leave closing to the opener, after verifying.

Scottj1s avatar Aug 30 '22 22:08 Scottj1s

With WASDK 1.2 and Visual Studio 17.4.1 no more SDK node is being shown, so i guess this is fixed.

Balkoth avatar Nov 17 '22 06:11 Balkoth