Visual Studio 2019 Doesn't seem to see that I have .NET Core 3.1 Installed (with SDK) - asp.net

I just installed Visual Studio a few days ago and for some reason I can't create anything but a class.
When I go to create a new User Control the pop up window lets me do everything except for click the "Add" Button to close the window and create the control.
If I double-click the User Control selector to create automatically, it pops up an alert box that says I need to go to the installer to get the .NET Framework target libraries. But when I go to the project's properties I see that I am already targeting .NET Core 3.1 and the only other option I have to target is .NET Core 3.0.... I assume this is because I'm in a .NET Core WPF application but I have no idea why it won't let me create a new control. It won't let me create anything except for a new class.
What is going on here? How can I work around this bug?

I've faced your problem recently. most of the templates were not installed after installation.
something you have to do is Modify your installation.
open Visual Studio Installer and click on Modify then choose the features(.Net core,Asp.net, Desktop Application and etc) in order to re-install them.
keep it in mind that, if installer encounters any problem or missing dll. installation instantly will be completed that should not happen.
keep your eyes close to your installer process and make sure all packages are installed.
a successful installation MUST not have any warning otherwise there are packages not installed.
it's better to install packages one by one NOT totally. I mean if you want the Asp.Net Core feature then try to install it at first. then try to install another feature.
Actually, I was not able to install whole features in a single installation and I don't know why. in short, don't heavy your installation.
If the problem still exists then:
1. Close all open solutions
2. Run InstallCleanup.exe
C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe
3. Remove all existing Visual Studio programs from Control Panel -> program features
4. Restart pc and re-install Visual Studio
5. Make sure you have connected to the network
6. Choose only one feature(Don't select all) to install + Visual Studio Editor
vs bug
Extensions don't work properly in VS 2019 and make it hang. it's may happen because the Extensions have to be updated to be compatible with vs 2019 or it's vs bug.

Related

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.

ASP.net Core Web Application Template is missing

I am trying to follow this tutorial: https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start
However, when I get to the Create a Razor Web App section, there is no template in my install of VS2017.
I have both the .net core and asp.net and web dev workloads installed. Where have I gone wrong?
Open Visual Studio (assuming its 2017) and go to: Tools > Extensions and Updates
Click "ASP.Net and web development", then select the appropriate Individual Components in the right hand pane. You'll find components such as ".Net Core 2.0 Development tools" and ASP.Net web development tools"
Have you got the latest update for your Visual Studio installation?
Head to Add or Remove Programs
find Visual Studio
Click Modify
Allow the installer to update
Install any updates that are missing
On top of that, do you have the latest version of the .NET Core SDK?
It seems I had an OS issue that caused updates to fail. Have rebuilt the PC and all working as expected now. Very much a sledgehammer approach, but this was something fundamentally wrong with the installation.

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.

msbuild with no Visual Studio (Yes Windows SDK installed & Copy Local=true)

A project gets built fine from Visual Studio without a problem from developers work station. Now we need to more it to DEV and UAT server. I've been struggling all day trying to get my ASP.NET project built with msbuild on a server with no Visual Studio installed (dev tools not permitted on servers) -
The type or namespace name 'Optimization' does not exist in the namespace 'System.Web'
The type or namespace name 'DotNetOpenAuth' could not be found
Couple attempts were made:
1. Install Windows SDK (http://msdn.microsoft.com/en-US/windows/hardware/hh852363) - appears there has been a lot of discussions from another Stackoverflow post (Related but not exactly - Build ASP.NET 4.5 without Visual Studio on Build Server). You'd also need to add to environment variables PATH
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
(This did NOT help)
2: gacutil to install the dll's?
(no vs command prompt - as said, no dev tool/Visual Studio permitted on server)
3: copy the dlls' to (i.e. same folder as MSBuild.exe):
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\
(This did NOT help)
4: Copy local = true
(This did NOT help - the dll's apparent msbuild can't find already in bin folder of the ASP.NET application)
It appears to be a bug with msbuild - http://social.msdn.microsoft.com/Forums/vstudio/en-US/434abf1a-30db-4b13-8062-13755898dd71/msbuild-is-unable-to-link-to-a-webapplication-project?forum=msbuild
Anyone has experience with this?
Thank you for your feedback. This is an intentional change made in VS 2012. Projects excluded from a build configuration do not get built when you are building that configuration.
Yes, I've had experience with that. I discovered that excluding the project was handy in the IDE, I think I remember so that stable libraries don't get rebuilt so often; but the user could right-click on that project and build directly just once or when really needed.
But, it broke the MSBuild.exe command-line build, because those projects were not available at all.
One thing is to add conditional logic to the build file so it knows to set things differently for an interactive user or a pure build environment:
Condition="'$(BuildingInsideVisualStudio)' == 'true'"
I ended up eventually improving the build solution in my case, so I can't recall a specific example of the Excluded thing.

upgrading to framework 4.0

I have a solution which contains 18 projects and targets framework 3.5. It also includes web installer project. When i am trying to upgrade the solution to framework 4.0, it gives me lots of errors and doesnt convert web projects and web installer projects.
Is there a way to convert projects manually rather than relying on visual studio wizard?
.wdproj files are not getting converted.
Error Log:
Project file opened successfully
No Conversion Required
Get root element Project successfully
No Conversion Required
ToolsVersion in String:
3.5
ToolsVersion in DWORD:
3.5
Require Upgrade
Ready to exit
Require Upgrade
I understand that you want to change your framework for all the solutions from 3.5 t0 4.0
I think you can set that in visual studio 2010.
Open your entire solution in VS2010.
right click on the project (do this for all the projects you have)
then select properties.
Click on compile tab on the left side .
click on advanced compile options
change the target framework to 4.0
I'm not sure but I thought of sharing this idea.
Let me know if this works.
I always have kind of a hard time finding the setting in visual studio for changing the version of .NET. And even then sometimes it has been greyed out (unchangable) through VS GUI. The way I typically change .NET is by opening your .sln file in notepad. In a Visual Studio 2010 .sln file there should be a line in there something like:
TargetFrameworkMoniker = ".NETFramework,Version%3Dv3.5"
Just change it to:
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Save, and you should be good to go.
If you really want to change your framework through the GUI in Visual Studio 2010 for an asp.net project you can right click on your website (one tier under "Solution" in "Solution Explorer"). Select "Property Pages", then in the new window "Build" which has a field called "Target Framework" where you can change your .NET Framework.

Resources