unable to find package Microsoft.NETCore.App.Runtime.browser-wasm - visual-studio

I am getting an "unable to find package Microsoft.NETCore.App.Runtime.browser-wasm" error when trying to Build an AspNetCore 5.0.0 Blazor Wasm app using VS Community 2019 v16.8.3. I haven't tried to Build this app since early December, but it worked then. I get the same error when I try to Build older backup copies of the app too.
I have in recent days created a new AspNetCore 3.2.1 Blazor Wasm app using the same VS. It Builds and runs successfully.
A search for this error indicates this package is not meant for direct consumption and I can't find anything else that's helpful.
Any idea how to get out of this?

The solution #rdmptn wrote as a comment worked for me. After upgrading VS I needed to add nuget.org to my list of Package Sources in the NuGet Package Manager options then rebuild the solution.

Related

Nuget packages does not get install properly in freshly installed VS

I have freshly install and update VS Community version 16.10.0 in a freshly installed Windows 10.
Now I have created a small console app and added a unit test project both in .Net Core 3.1 LTS. After that nothing else is done. What I see is that nuget packages for test project is not properly installed although when you check in the nuget package manager, all the package are installed, all of those are installed.
Then I open an old application but the issue is same. Unit test packages are showing with error and same for EF core.
I tried to tweak/build etc. but non fixed the issue.
The issue was due to missing nuget source link in Package Source under NuGet Package Manager.
As soon as I added the package source everything stated to work.
https://api.nuget.org/v3/index.json
The above source link suppose to already be added by default in Package Source but for some unknown reason it was missing. So whatever packages needed such as EFCore and MS Test framework etc. could not be downloaded, hence the problem was.

How to create new core 2.0 project?

I've just reinstalled VS 2017 15.6.2 using web installer and tried to create new
empty Asp.net core 2.0 project.
But when i open it i got error:
Project file is incomplete. Expected imports are missing.
My version of SDK is 2.1.101, which was installed with visual studio.
I selected web and .net core development features during install, what am i missing?
I tried to create empty core console app and everything works fine.
UPDATE
this error is related to folder structure
C:\Novatek.Monitoring.WebUI // no errors
C:\Svn\Monitoring\trunk\Novatek.Monitoring.WebUI // Project file is incomplete. Expected imports are missing.
Try follow this tutorial:
https://www.asp.net/get-started
Remember to check your dotnet-core version with 'dotnet --version'
You can follow this simple and basic steps :) This link will help get started in creating your first dynamic ASP.NET Core MVC Web App connected to MS SQL Server.
https://deanilvincent.github.io/2018/01/12/steps-in-creating-simple-but-dynamic-powerful-web-app-using-asp-net-core-mvc-connected-to-a-database/

Azure Service Fabric in Visual Studio - hresult : 0x80131500

I'm currently trying to work on Azure Service Fabric in Visual Studio 2015 but I have a general exception (hresult : 0x80131500) when i create a new service fabric project.
For example, I got this error when i create a stateless service project, or anything else coming from service fabric... Can't post screenshots of the process for now... Thing is that when I installed service fabric packages, there were errors (already installed package but not, couldn't access the package)...
Spent hours trying to resolve this problem, I tried to uninstall everything, to change from a version to another, I searched a lot for an answer but not found.
Maybe I didn't understand what is happening there, and maybe someone could help me !
Service Fabric Tools: 1.4
Visual Studio: 14.0.25431.01 Update 3
.NET framework: 4.6.1
UPDATE
Thank you everyone, Microsoft updated their packages, it seems that it was coming from them, i tried to reinstall packages again and it works now !
I don't know how this post can be marked as resolved, if someone could do it, it would be great !
I was able to repro this when the 3.5 .NET Framework was missing. Specifically project creation is looking for targets files under the C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder triggering the exception. Need to investigate why the tooling has a dependency on the older .NEt framework.
For now to try to fix the issue, can you enable the .NET Framework 3.5 (includes .NET 2.0 and 3.0) feature in "Control-Panel->Programs and Features-> Turn Windows features on or off" and see if it also resolves the issue for you.
Microsoft updated their packages, it seems that it was coming from them, i tried to reinstall packages again and it works now !
Launch Web Platform Installer (type it in Windows run menu).
Select Microsoft Service Fabric package.
Install it, or update it.
Should work.

NuGet doesn't show items in feed, but can list via console

I recently upgraded to TeamCity 9, at first everything was okay. Then, for some unknown reason, I was unable to get a full list of available packages via the NuGet GUI. At first it appeared that all the portable class libraries where missing, then all of them went missing.
What I've tried:
I've removed all old artifacts from TeamCity,
I've deleted and reset TeamCity's cache
I've restarted TeamCity and its NuGet v1 service
I've rebuilt some basic class libries (PCL) with no dependencies.
I've cleared NuGet cache in my Visual Studio options.
I've ran VS as admin.
When I click on my TeamCity Feed in the package manager, it immediately returns no results with a very brief flash of "retrieving result".
Okay so the very odd thing is I can manually list (and install) my packages via the console:
PM> Get-Package -ListAvailable
Id Version Description/Release Notes
-- ------- -------------------------
RobGeoLtd.Core 1.0.2 Core Framework Portable Class Library
RobGeoLtd.Measurement 0.1.36 Defines units of measurement and conversion methods between them
PM> Install-Package RobGeoLtd.Core
Installing 'RobGeoLtd.Core 1.0.2'.
Successfully installed 'RobGeoLtd.Core 1.0.2'.
Adding 'RobGeoLtd.Core 1.0.2' to Logger.
Successfully added 'RobGeoLtd.Core 1.0.2' to Logger.
PM>
So yeah, I'm at a loss. NuGet bug? I'm all up-to-date as far as I can tell. :/
For anyone experiencing a similar issue:
I also tried all of the above. It turned out that my built packages were targeting .NET 4.5.2 and my project was targeting .NET 4.5.
It would appear to be a TeamCity issue. I reverted to a back up of the CI server running 8.1.4 and the old feed items have returned. I will attempt the upgrade again.
Update: Yup, its defiantly the upgrade from 8.1.4 to 9.0.3 that caused it. Will file a bug. https://youtrack.jetbrains.com/issue/TW-40589

TeamCity Pre-release Nuget of Application Insights Fails

I added the pre-release version of Application Insights to my build. The build works fine in VisualStudio after installing all of the Nuget packages, not quite the "2 clicks" advertised by Microsoft, but not bad in VS2013.
I am now trying to build the website in TeamCity and getting failures indicating Nuget cannot find the package during a pre-compile Nuget Update pass. The error is: Unable to find version '0.8.0-build10578' of package 'Microsoft.ApplicationInsights
I have pre-release selected in the TeamCity configuration and have added the microsoft feed URL to the build's configuration just to be sure (https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/)
Any ideas where the problem might lie?

Resources