I just started to use 200.8
I have VS 17.8
Started a project with the template and just compile it (no changes)
I get the error:
Severity Code Description Project File Line Suppression State
Error MC1000 Unknown build error, 'Could not find type 'WinRT.WinRTRuntimeClassNameAttribute' in assembly 'C:\Users\mody\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.31\lib\net6.0\WinRT.Runtime.dll'. Line 14 Position 23.' WpfMapApp1 C:\Projects\WpfMapApp1\WpfMapApp1\MainWindow.xaml 14
As far as I understand I have everything installed.
Any idea?
Hi,
As I understand it, your project template is WPF application. Requirements for WPF application are:
Development environments
.NET SDKs and frameworks
From error message I see that your .NET SDK is 6.0. What .NET version did you choose when create new project from template? Do you have the same .NET SDK (8.x or 9.x) installed? Run "dotnet sdk check" from Developer Powershell to see.
Thanks for the quick response.
See my screen shot, it looks like I have all the versions.
I do not see anywhere an option to select .NET version when I create a new project. I select the template from the list and get my project. When I edit the project file I see the line:
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
Thanks again
After creating project, you can find .NET version in project properties:
You can select .NET version in next step after choosing project template, selecting location for project:
Another one thing is Visual Studio version. I have found: Visual Studio 2022 v17.12 with .NET 9
Hi
Upgrade to VS2022 17.14 solved the problem.
The docs say 17.8 is supported (that is what I had before upgrade).
Many thanks