Visual Studio 2019 where to find WebAssembly template for .net core 3.1 - visual-studio

I'm using very latest (16.4.2, dated 8th Jan 2020) Visual Studio 2019.
When I tried to create a Blazor WebAssembly solution, although the description for 'blazor app' included the words 'server or webassembly', when I got to the create page, only Server option was available and it successfully creates Core 3.1 application.
I assumed latest version would be there, so I went to the Visual Studio marketplace website and there were no Blazor extensions to be found, so looking on the internet I found running this command:
dotnet new -i
Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview2.19528.8
(found via Missing visual studio 2019 blazor webassembly app template)
And it worked, I got web assembly option. However, when I look at my project created using WebAssembly it is using .net Core 2.0 and the options only go as far as 2.1. I presumed by the '3.1.0' section in the name it would be the latest.
Any idea how I get the latest template rather than random searching and use .net core 3.1?
If there is a better way, can anyone let me know how to uninstall templates as I failed to find out how.

Run the following in a CLI or in Tools -> Nuget package Manager -> Package Manager Console:
dotnet new --install Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3
The NuGet package for above is here.
Get started with ASP.NET Core Blazor here.

Update
The latest release is now an RC and can be installed with the following:
dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-rc1.20223.4
The latest preview release as of April 30th can now be installed with the following:
dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview5.20216.8
This requires the latest dotnet core SDK 3.1.201.
To check for the latest preview you can check the ASP.NET blog.

Related

.Net 6 Not show in Visual studio TFM,

It's weird.
If I create a new project and choose DotNet 6 framework by Visual Studio 2022. I will get the NETSDK1045 error code.
But create a new project from the console, everything is Ok.
Run dotnet --list-sdks and see if the expected .NET6 version is installed.
My guess is that you might have x86 issue. If you have installed x64 version, install x86 version and vice versa and test if the issue is gone.
You can also try to repair your VS 2022 instance and/or upgrade to latest official version.
There is also a small probability that you select a project type that does not supports .NET 6 (for example .NET Framework Web App project type).
Also you may check your path contains the dotnet folders in the correct order for your architecture.
References:
https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1045
VS2017 : Target framework drop down does not show .NET Core 2.1 option

What is the best way to install .Net Core SDK 2.2 for development

I am going through a tutorial to create a Razor page App in Visual Studio 2019:
https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-2.2&tabs=visual-studio
On this page it lists the prerequisites:
1) Visual Studio 2019 with the ASP.NET and web development workload
2) .NET Core SDK 2.2 or later
I downloaded the Visual Studio 2019 install so I have that ready to go.
But when I click on the ".NET Core SDK 2.2 or later" link it takes me here:
https://dotnet.microsoft.com/download/archives
And when I click on that link it takes me here:
https://dotnet.microsoft.com/download/dotnet-core/2.2
And when I click on ".Net Core Downloads" it takes me here:
https://dotnet.microsoft.com/download/dotnet-core
And finally when I click on .Net Core 2.2 (Current) it takes me here:
https://dotnet.microsoft.com/download/dotnet-core/2.2
Ah finally I am on the v2.2.6 page but now the installs are split in 2.
1) Build apps - SDK 2.2.401
2) Run apps - Runtime 2.2.6
I have never seen this before, having to install two pieces.
Question number 1: If I just install Visual Studio 2019 will I have everything I need for development? Or do I need to install .Net Core 2.2.n also.
Question number 2: If I need to install .Net Core 2.2.6 (current) do I need to install both SDK and Runtime separately? And if so is there a single file to install both at the same time anywhere?
Or do I need to install both (for windows):
SDK 2.2.401 - NET Core Installer: x64
Runtime 2.2.6 - ASP.NET Core Installer: x64
I guess I will start experimenting.
Just confusing. I guess list-sdks would then show 2.2.401 and not 2.2.6. And then there must be separate list commands for runtime and release?
Yep confusing.
I know preview 3 is out.
They have a note here at the top it is coming out:
.NET Conf 2019
.NET Core 3.0 launches at .NET Conf 2019 September 23-25, a free, virtual developer event. -
https://dotnet.microsoft.com/download/dotnet-core/2.2
If I just install Visual Studio 2019 will I have everything I need
for development? Or do I need to install .Net Core 2.2.n also.
When you install VS, you can configure your specific development environment by choosing corresponding workloads and components according to your needs. If you want to develop .net desktop projects like winform and wpf, you should choose .Net desktop development workload, and if you only want to develop Razor Page app, you just need to install VS2019 with ASP.NET and web development workload.
Normal if we choose this workload, vs installer will install .net framework(4.0 to 4.6) and asp.net core 2.1 for you by default. However, there's no single component for .net core SDK 2.2 when installing. So apart from VS with ASP.NET and web development workload, we need to manually install the .net core 2.2 SDK.
If I need to install .Net Core 2.2.6 (current) do I need to install
both SDK and Runtime separately? And if so is there a single file to
install both at the same time anywhere? Or do I need to install both
(for windows)
As for question2, I never install the sdk in that way. I use another way to download and install the sdk. Here is the download link I use.I think you only need to install this SDK:
The SDK includes everything you need to build and run .net core applications while the runtime includes everything you need to run .net core applications.The runtime is included in the SDK. (So you don't need to install the runtime separately)
In summary, to develop razor pages, you need to install VS with ASP.NET and web development workload and the SDK mentioned in the picture above. Just do as the document suggests. Hope it helps:)
I too was confused by this. When I finished installing ONLY the SDK .NET Core Installer: x64 (file dotnet-sdk-3.0.100-win-x64.exe) the installer showed this message:
The following were installed at: 'C:\Program Files\dotnet'
• .NET Core SDK 3.0.100
• .NET Core Runtime 3.0.0
• ASP.NET Core Runtime 3.0.0
• .NET Core Windows Desktop Runtime 3.0.0
As you can see, only running the SDK installer also installs the runtime, the ASP.NET runtime, and the Desktop runtime. So it's not necessary to install these separately.
TL;DR If you are developer just download the SDK Installer and run that

NuGet Can't Install Packages

I created a new .NET core Web App and I am trying to add packages Microsoft.EntityframeworkCore and Microsoft.AspNetCore and I am getting the error:
package restore failed rolling back packages
I have tried clearing the NuGet Caches reinstalling VS 2017 and the problem persists, note the project is brand new.
Please make sure your VS 2017 already upgraded to 15.3.5, you can re-run the VS 2017 installer as administrator and if there has the ‘Update’ button, click it to update. Then check you also installed the latest .NET Core 2.0 SDK and then create a new ASP.NET core web application, choose ‘ASP.NET Core 2.0’ as below to create:
Then you can successfully install those 2 packages through Manage Nuget Packages like the following:

What is the purpose of taco.json in Apache Cordova Visual Studio 2015 project?

I am playing with the new Apache Cordova blank template in Visual Studio 2015 RC. I noticed the taco.json file in the project.
Besides defining the version of Apache Cordova you are using does it serves any other purpose?
Is it something like bower to define other frameworks like angular or bootstrap in there?
Geert,
taco.json file is currently used by Visual Studio to define Cordova CLI version used to build the project with. If you open up config.xml designer, under the platforms tab you will see the Cordova CLI version specified.
When you build/run your app for iOS, the remote agent uses the CLI version defined in your taco.json file to ensure that the remote machine uses the correct version of Cordova to build your app.
Currently, taco.json file is only used by Visual Studio and Visual Studio CLI (like vs-mda-remote) and does not define bower packages.
A bit of extra information... "taco" is an acronym for "Tools for Apache Cordova". In the RC release of Visual Studio, taco.json only includes a single key-value pair declaring the version of Cordova used in the project. For example:
{
"cordova-cli": "4.3.0"
}
If you want to use a different version of Cordova (greater than 4.3), just change the value on the right side of the colon.
Geert,
I have not used this feature, but based on the existing documentation, taco.json is used for continuous integration servers.
Documentation with details can be found here:
https://github.com/Microsoft/cordova-docs/blob/master/tutorial-gulp/gulp-ci.md
https://github.com/Microsoft/cordova-docs/blob/master/tutorial-team-build/README.md
To add to an older question:
Since TACO v1.0.0 was officially release on Thursday (1 October 2015), Here's the new official site: taco.tools.
I found this site to be a great place to get started and extra info on TACO.

Deploying VS2010 SP1 using .NET 4 bootstrapper

I recently updated Visual Studio 2010 to SP1 and noticed the .NET 4 framework changed from version "4.0.30319.1" to "4.0.30319.225". I was not able to locate an updated .NET 4 framework installer for "4.0.30319.225". I could only find an update exe which is used to update a particular machine. When I deploy my application now, it still uses the older pre-SP1 version of the framework.
Is there a new bootstrapper that I should be using? Are there any issues with deploying an application that is developed/tested on "4.0.30319.225" to a target machine which only has "4.0.30319.1" ?
According to a comment on Announcing Visual Studio 2010 Service Pack 1 (check page two of the comments) from Jason Zander:
There have been questions about
updates to the .NET Framework. There
is no full service pack for .NET
Framework 4. However there is an
update which you can download from
here: go.microsoft.com/fwlink. The
outline of fixes (linked from the
download page) is here:
support.microsoft.com/.../2468871.
This update is titled "Microsoft .NET
Framework 4 KB2468871". You can read
more about what is in the update on
the download page.
As I mentioned in a previous comment,
VS2010 SP1 requires this update and
will automatically install it as part
of setup.
When you build a project using VS2010
SP1, it does not force a dependency on
the update. Whether you need to
deploy the update with your client or
server application depends on your
need for the fixes in the update. You
will need to look through what it
contains to make that call.
I've personally seen no issue publishing to a server before running the update manually.
I can't speak to the bootstrapper question.

Resources