Hi, i was trying new 3.0 alpha WinUi after installing WinUI.ProjectTemplates.vsix
package and updating VS 19 Preview to latest version i created new WinUi project (project startup took a lot of the time ) and after initialization i see all namespaces in RED with errors like Symbol not found
and Type or namespace not found
.
VS version : 16.6.0 Prev 2
Windows Build : 18363.720
Please check the attached snaps.
Can someone please hep me ? :(
@RaoHammas I believe these are intellisense errors. Are you able to build and run the app ?
@RaoHammas I believe these are intellisense errors. Are you able to build and run the app ?
I guess yes Re-sharper was making this issue. but it still doesn't build. It try to download some packages like runtime.win10-x64.Microsoft.Net.UWPCoreRuntimeSdk
runtime.win10-arm64.Microsoft.Net.Native.Compiler.2.2.1
and runtime.win10-x64.Microsoft.Net.Native.SharedLibrary.2.2.1
and like this ..but always fail ! I have tried a lot of the times.
can you share the build errors from the error list (just build errors, without the intellisense errors, there should be drop down in the error list where you can filter the errors) ?
can you share the build errors from the error list (just build errors, without the intellisense errors, there should be drop down in the error list where you can filter the errors) ?
Yes ! as soon i start rebuild. In status bar i see it starts restoring/Downloading some Packages but eventually fails (always). And i don't have data connection issue.
Looks like you are having issues restoring nuget packages. Can you find out why ? There are some instructions here. Is this just after creating a blank WinUI3 app after installing the vsix or do you have other changes ?
It's happening with new project. I didn't change anything. Also have tried with 3 projects every time same issue. (Normal UWP projects are fine only happening with this WinUi3).
Am is missing any SDK ? etc ?
also getting this error when tried to add SERVICE REFERENCE
although i've installed core 5.0 prev versions .
I just upgraded to Version 16.6.0 Preview 2.0, installed the vsix and tried out a blank app, and it seems to work fine. @danzil any ideas what might be happening on @RaoHammas 's machine ? If this is something related to the VS install, you can try repairing or re-installing VS.
I am trying this from last 3 days literally. but every-time same problem. But ill try it now again with fresh VS.. let's see ! Thanks @Ranjeshj for the help so far.
I agree with Ranjesh, the errors I saw above are consistent with NuGet restore failing. Could you try using the developer command prompt, going into the directory your solution is under and doing a manual restore "nuget restore solutionname.sln"? Do you get a clean restore? Perhaps look at your NuGet sources and see if Nuget.or is among them. The second error you sent the screenshot for relates to .Net Core. WinUI is not supported in .Net Core projects yet. If you're still having trouble, could you send us detailed steps to reproduce the original problem, including what king of project you created, how you invoke the build, and whether the same problem happens when you manually run restore then a build in the developer tools. Also, does the issue go away if you restart VS?
So i tried again with a new instance of VS. Process i followed
-Vs installed Latest 16.6.0 Prev 2
-Installed VSIX for this.
-Created new WinUI Project using Visual Studio
-Started Build --- (and as shown above same errors nuget restore failed)
Now as @danzil suggested i used CMD to directly restore nuget and got this result.
Now again i build solution and got same errors where it says napespaces abcd not found
(but this time it didn't try to download those packages).
![image](https://user-images.githubusercontent.com/16499626/78012166-04a0f980-735e-
.
I have tried restarting, re-Instaling Vs many times (cuz i really want t make it work).
Also the second error i get like this.
Got it working ! after doing above steps and creating new projects now it has all the required stuff and it's running fine !
Thank you so much guys for your help :)
@RaoHammas Great to hear that you have got it working now. Can you share what you did to get it working ? Thanks!
So i tried again with a new instance of VS. Process i followed
-Vs installed Latest 16.6.0 Prev 2
-Installed VSIX for this.
-Created new WinUI Project using Visual Studio
-Started Build --- (and as shown above same errors nuget restore failed)Now as @danzil suggested i used CMD to directly restore nuget and got this result.
as can be noticed everything went smoothly except one exceptionNow again i build solution and got same errors where it says napespaces abcd not found
(but this time it didn't try to download those packages).
![image](https://user-images.githubusercontent.com/16499626/78012166-04a0f980-735e-
.I have tried restarting, re-Instaling Vs many times (cuz i really want t make it work).
I did all this as suggested by @danzil. After this a restart and new Project creation and finally got everything working.
for me i guess problem was nuget restore
which in Visual Studio was failing every time but doing it manually worked.
Most helpful comment
I did all this as suggested by @danzil. After this a restart and new Project creation and finally got everything working.
for me i guess problem was
nuget restore
which in Visual Studio was failing every time but doing it manually worked.