Visual Studio 2017 Installation of "ASP.NET and web development" - asp.net

I've downloaded Visual Studio with --layout option, and installed it.
Installation was successful with warning, as below,
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26208.0)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26208.0)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.0.26208.0)
Mobile development with JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.0.26208.0)
Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.0.26208.0)
Incomplete components
.NET Core 1.0 - 1.1 development tools (Microsoft.NetCore.ComponentGroup.Web,version=15.0.26208.0)
.NET Core 1.0.1 development tools (Microsoft.Net.Core.Component.SDK,version=15.0.26208.0)
Container development tools (Microsoft.VisualStudio.Component.DockerTools,version=15.0.26208.0)
Git for Windows (Microsoft.VisualStudio.Component.Git,version=15.0.26208.0)
Visual Studio Emulator for Android (Component.Android.Emulator,version=15.0.26208.0)
There errors were listed in log file.
Every time I modify the Installer and try to install web components, doesn't work.
I've tried to restart computer, restart the installer.
Nothing works.

After some digging,
I found a solution.
Try to install Visual Studio with setting temp and %temp% folder to short path, like d:\temp.
Step 1 : open cmd with administrator privileges (to ignore administrative privileges error).
Step 2 : execute command - set tmp="d:\temp"
Step 3 : execute command - set temp="d:\temp"
Step 4 : execute vs_community.exe with whatever --layout option you want.

Related

Building MSI in azure devops

We have for a while been building various web projects with AzureDevops and self hosted build agents.
Today I had to add a new build, consisting of a windows service written in .net core 3.1. This service has to be installed by our customers, so we have to provide it in a friendly installable way. As some of our developers were already used to handle MSI/*.vdproj projects, they added a vdproj into the *.sln to manage that. On a developper machine, this is not a problem even with VS2019: you just have to use the relevant VS studio extension...
But when it comes to building that in a CI/CD context, this becomes a real challenge. I quickly understood that we can't use MSBuild at all for that and found some alternative using directly Visual Studio (devenv)... Inspired by this thread (still opened), I came up with the following command line:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv" [...]\MySolution.sln /build "Release" /Project MyInstallationProject
This worked fine both on my developer machine and even on the build agent machine. But when I add it into a build pipeline as a command line task, it seems to hang, and after a while I get the following result for the job:
##[error]The job running on agent <MyAgent> ran longer than the maximum time of 60 minutes. For more information, see https://go.microsoft.com/fwlink/?linkid=2077134
What can I do to make it work?
What are the best practices for generating a self installable in a CI/CD context? (Is MSI still relevant? )
As a workaround, you can try to install the extension Build VS Installer and use the task DutchWorkz - Build VS Installer(s) to build Visual Studio Installer Project in Azure Pipelines.
Here are some tickets(ticket1, ticket2) with similar issue you can refer to.

Clone & run existing project from github

I installed Visual Studio 2017.
I wanted to clone a repository and try in my local system.
Suppose i want to clone this. repo (Not mine.) Is it possible in one step?
Or else do i need to write step by step actions and necessary codes to run the project?
By checking NuGut package manager to auto download packages on build time will
work? I am new in ASP.Net. Is there any way to run the project in local system by just cloning.
EDIT:- Tried to restore packages
PM> dotnet restore
Welcome to .NET Core!
---------------------
Learn more about .NET Core: https://aka.ms/dotnet-docs
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't in
clude command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telem
etry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other
platforms refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
C:\Users\win7.system3\Documents\Visual Studio 2013\Projects\localhost_54920\localhost_54920.sln : Solution file error MS
B4249: Unable to build website project "SAMP". The ASP.NET compiler is only available on the .NET Framework version of MS
Build.
First of all, you'll need .NET Framework 4.6.1 installed in your machine.
Short answer
Having that installed, you should be able to open the project/solution with Visual Studio, build it* and run it from there.
Long answer
If that was a .NET Core project, without Visual Studio it would be as easy as:
git clone https://github.com/sarn1/example-aspnet-mvc
cd example-aspnet-mvc\ComicBookGallery
dotnet run
dotnet run will restore (dotnet restore) the dependencies, build (dotnet build) the project and run it.
However, that's not the case, so you can only:
Restore the nuget packages using Visual Studio or nuget.exe cli.
Compile it* using or msbuild (use Developer Command Prompt for Visual Studio to be able to easily access it).
Run it... from Visual Studio, which makes the rest of the process kind of worthless.
git clone https://github.com/sarn1/example-aspnet-mvc
cd example-aspnet-mvc
nuget.exe restore
msbuild /t:build
* You may need to apply these changes to make the project compile.

Visual Studio 2017 15.7.2 - ASP.NET Core Application is missing

I installed the Visual Studio 2017 Enterprise and updated it to the last version. I choosed the necessary web components in the Visual Studio Installer, tried to execute the devenv /InstallVSTemplates, tried to repair Visual Studio and installed .NET Core SDK (x86 and x64).
Nothing of this helped me, I still can't find the ASP.NET Core Application under .NET Core in Visual Studio. How can I solve this problem?
Solution that I found myself: Everything described above was indeed caused by a mistake in the third screen.
I did not find how to solve this problem automatically, I just installed all these .msi packages manually. The installer loads them, but for some unknown reason can not install it themselves. To install them manually, you need to go to the directory where Visual Studio is installed, there just look for these packages by name and install them. Then you need to run the installer again and if it shows another error with another package, you need to repeat the procedure with a manual installation. I had to repeat it three times with three different packages. After that, I started the installer once more and it installed the rest.

Installating .NET Core SDK failes silently - how can I install it?

I want to install the .NET Core SDK 1.1 which I downloaded from the site .NET Core Downloads.
When I try to run the downloaded file dotnet-1.1.1-sdk-win-x64.exe nothing happens at all - no windows, no message.
The Windows task manager shows shortly the dotnet-1.1.1-sdk-win-x64.exe process which disappears in a second or two.
The same happens when I try with .NET Core Runtime dotnet-win-x64.1.1.1.exe.
What does go wrong?
you can check this page for instructions on how to install via command line and confirm if it's working
https://www.microsoft.com/net/core#windowscmd
Personally, I prefer installing Visual Studio and letting Visual Studio configure .net core for me as shown in this page
https://www.microsoft.com/net/core#windowsvs2017
First verify 'IIS'and all other windows features(like ASP.NET) are enabled in your machine.
Then try to install dotnet SDK and Visual Studio 2017.
It will work for sure.

Error while Publishing Web App in Visual Studio Professional 2013

I am trying to publish my Web App in Visual Studio Professional 2013 but getting the following error
I got the same question asked over here but no useful answer.
Can anyone please help
You probably will be using older version, that was having an issue. refer detail [here]
Install the newer web deployment tool, should work.
which .net version are you using.
check web deploy version. if vs has 2 web deploy version, the vs get confuse to take which version. If it has 2 version, just uninstall vs and then instal it along with web deploy. if the Vs has one 1 web deploy version, you uninstall and install the web deploy. It will rectify your problem i hope.
You can refer This link
Check if version 9.0.0.0 of the assembly is installed in GAC. (from the VS2013 developer command prompt) gacutil /l Microsoft.Web.Deployment. Issues like this have occurred in the past where things worked, then after installing an update (or trying to install one) then reports of missing dlls, like nuget, occur.
The usual course of action is to repair the Visual Studio installation.
There is a problem with your publish profile. Delete the pubxml file located bellow Properties folder in your project and then create a new publish profile.
I got the same problem when older project runs into the new .NET Framework, for that you have to do the following.
Right Click on your project name->select Property Pages -> Click Build from the menu-> then select Target Framework .Net framework 4.5 or your current using framework..
"Could not load file or assembly" means the required file (of that mentioned version) is not available in the assembly (nor in the registry). All you gotta to do is to ensure this same is installed properly that would allow you to proceed further. The other things to ensure is the latest framework installed on your system.
Think you have some errors happen when to install or update Visual 2013, so you can reinstall again and this error will be fixed.

Resources