Closed stiezinger closed 3 years ago
The namespaces all changed. VS also has a bug where it will not give you light bulb fixes to add using directives for types declared by source generators, so it's temporarily a painstaking process to find and type in all the right using directives. The quickest way I know of to deal with this is to click on the type that can't be found, press Ctrl+T to open "Go To All" with that type name prefilled, press enter to navigate to the .g.cs file that should be the top entry found, then observe the namespace (and nested namespace) surrounding the type name.
Once you have a block of using statements, you can go file to file pasting in that block and then pressing Ctrl+R, Ctrl+G to remove and sort usings.
Use
using Windows.Win32;
instead of
using Microsoft.Windows.Sdk;
This thoroughly confused me for about half an hour.
I note that the Readme.md still references the old namespaces though.
Is anyone interested in contributing a readme fix to update Microsoft.Windows.Sdk
to the new namespace?
Fixed in cc0ac97207d36937ba793bcf8d47b5775fcbad9b.
Hello,
I was using version 0.1.422 without issues, updated to 0.1.506 and the Source Generator will not work anymore.
I receive the error: The type or namespace name 'Windows' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?).
Rolling back to 0.1.422 fixes everything.
I am using Visual Studio Version 16.10.3 with Windows 10 Version 1909.