VS2012 RTM missing .net 4.5 and mvc project templates - asp.net-mvc-4

On Windows 8 RTM and just installed Vs2012 Ultimate RTM, I'm unable to create a .net 4.5 project nor a .net 4 or 4.5 ASP.NET MVC project. I've done a repair of VS2012, which did not fix it. Is there something obvious I'm doing wrong?

I also had the same problem..
Doing the following procedure solved it.
Copy the folder \packages\WPT from the visual studio 2012 installer CD to your desktop.
Uninstall the following in this order..
aspnetmvc4vs11tools.msi
aspnetmvc4.msi
aspnetmvc3vs11tools.msi
aspnetmvc3.msi
Then install these in this order.
aspnetmvc3.msi
aspnetmvc3vs11tools.msi
aspnetmvc4.msi
aspnetmvc4vs11tools.msi
Trying to repair didn't fix the problem. You have to remove and install these..
Hope this will help...

Your install is probably corrupted. VS 2012 needs .net 4.5 to run, so something has gone wrong if it's not available.
I would try uninstalling and reinstalling. It's brute force but it generally works.

You probably do not have the Windows 8.1 SDK installed. Visual Studio 2012, nor its updates, link the .NET Framwork 4.5 libraries for development.
Windows 8.1 SDK
You don't have to install the full SDK if you are just looking for the option to build web apps, just the .NET Framework 4.5.1 option in the installer. The full install is about 1.1GB, but just the .NET installer is only 72MB.
For those reading this that have not updated their copy of Visual Studio 2012, make sure you also have these installed:
Visual Studio 2012 Update 4
ASP.NET and Web Tools 2013.1 for Visual Studio 2012
Hope this helps!

Change .net framework version to 4.5

Related

Building a net40 project in VisualStudio 2022

A Windows update trashed my computer so I've had to reinstall from scratch.
We have some projects that multi-target net40
<TargetFrameworks>net40;net6.0</TargetFrameworks>
which were building just fine (and they build in the Azure pipeline) but now I can't get them to build locally.
My old machine was originally win10 with VisualStudio 2017, 2019, and 2022, but so far on the rebuilt machine I only have 2022.
The projects won't build, saying
error MSB3644: The reference assemblies for .NETFramework,Version=v4.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
I guess this means I have to install an SDK pack?
I've tried 4.6.2 and 4.6.1 which are available through the VisualStudio installer, and 4.5 (NDP452-KB2901951-x86-x64-DevPack.exe from https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net452-developer-pack-offline-installer) which is not, and Windows SDK for Windows 7 and .NET Framework 4 from https://developer.microsoft.com/en-gb/windows/downloads/sdk-archive/
but still no joy.
Any idea what I need to do to get it to build again?
The solution seems to be to install VisualStudio2017 with net40.

.Net5 sdk is installed but why can't choose to create project

I recently installed versions of .net core sdk 3.1 and 5. When using the .net5 version today, I found that I couldn't select the version when I created the project, only version 3.1. So I opened the terminal and entered the command: dotnet --list-sdks to query all my installed versions and found that only 3.1.405[C:\Program Files\dotnet\sdks] is displayed. What is the reason for this? I'm sure I have the sdk for .net5 installed. I got it from this site.
https://dotnet.microsoft.com/en-us/download/visual-studio-sdks
I recently installed versions of .net core sdk 3.1 and 5. When using
the .net5 version today, I found that I couldn't select the version
when I created the project, only version 3.1
The issue might relates the Visual Studio version. From the Asp.net core document and the SDK download page, we can see that to use Asp.net 5, it required Visual Studio 2019 16.8 or later version:
So, you can upgrade the VS 2019 version to Visual Studio 2019 16.11.9 version or Visual Studio 2022, and then in the Visual Studio Installer click the "Modify" button on the installed Visual Studio, in the popup window, go to the Individual components panel, checked the .NET 5.0 runtime option:
Then when create new applications using Visual Studio, you can choose the .Net 5.0 version.

How to update Visual Studio 2017 Template from ASP.NET Core 2.0 to 2.1

I have installed Visual Studio 2017 Community Version 15.7.5 2 days back and everything is up-to-date but the version of ASP.Net Core is 2.0 and I need it to be 2.1.
I am unable to find a way to update it to version 2.1. I have also searched the internet but there are ways to upgrade projects not to update this. So any ideas or help would be appreciated
It looks like the SDK for .NET Core 2.1 is not installed. I have recently faced the same issue after .NET Core 2.1 was released.
To solve it, download and install the SDK for .NET Core 2.1 following the steps below. Also, note that you need to run Visual Studio 2017 15.7 or newer version, as specified in the .NET Core 2.1 download page.
Close all running Visual Studio instances.
Download the .NET Core SDK from the Microsoft download page. At the time of writing this answer, you will find version 2.1 to be the latest available.
Run the installer and follow the installation steps.
Run Visual Studio: now you should be able to create .NET Core applications targeting version 2.1.

CMake: "cl.exe not able to compile a simple test program"

I want to build DCMTK in Visual Studio 2010.
I followed the advice here enter link description here, as the image shows.
And I still get the same error. Any ideas?
Run the following script before running cmake.
>vcvars32 (to set some system vars, C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat)
A similar problem has been reported here
The solution is:
First, check if you have .NET 4.5 on your system. If you do, that is very likely causing the problem. Try either upgrading to VS2010 SP1 or downgrade .NET to 4.0
CAUSES:
This error appear because you have installed Visual C++ 2012 after you have actually installed Visual C++ 2010 in your system; another cause is because .net Framework 4.5 replace .net Framework 4.0; .net Framework corrupted files;
HOW TO SOLVE:
Uninstall .NET Framework 4.5 from your system; then download .NET Framework 4.0 and install it; this should fix your problem;

Targeting .NET 4.0 in VS 2012 on Windows 8

I just installed VS 2012 Ultimate RTM on Windows 8 Pro RTM and tried to open a solution containing several projects (class libraries and WinForms) targeting .NET 4.0.
When the solution is loaded, VS prompts that .NET 4.0 isn't supported. It gives me the chance to update my projects to 4.5 (and promises that I could change the target later) or install a "Multi targeting pack" for 4.0 from this page.
I decided to update my projects to 4.5 because I had no luck installing the offered Multi targeting pack (errors see below).
Unfortunately, VS does not show 4.0 as a target by default (when changing the target for an updated project), but redirects me to the page where I can download the Multi targeting pack.
So far so good, but I wasn't able to install any of the offered downloads (neither runtime nor targeting pack) again.
The error message says in case of .NET Framework 4.0.3 Targeting Pack:
Setup has detected that this computer does not meet the requirements to install this software. The following blocking issues must be resolved before you can install KB2600213 software package.
Installation Requirements:
Microsoft .NET Framework 4 Multi-Targeting Pack was not found. Please repair your installation for Microsoft Visual Studio 2010 in order to get this update.
Strange enough since I have no VS2010 installed.
.NET Framework 4.0.3 Runtime Installation stops with the following error:
KB2600211 does not apply, or is blocked by another condition on your computer.
I've checked that .NET 4.0 is installed (using the .NET Installation verification tool), I've tried to repair VS2012 but nothing let me target .NET 4 and the Event log does not contain any related reports. Any suggestions or hints (besides going back to Win7/VS2010)?
I'm honestly not sure what's going on. I have VS 2012 Ultimate RTM and all versions of .NET are supported.
I'm almost positive I never installed any .NET frameworks manually, though I did install Visual Studio 2010 Express for Windows Phone from http://create.msdn.com.