Trying to execute a program in VS Code, but i keep getting an error - .net-4.0

[Running] dotnet run --project "c:\Users\Bloxxel64\CodeProjects\AssetStudio\AssetStudioGUI\AssetStudioGUI.csproj"
C:\Program Files\dotnet\sdk\5.0.403\Microsoft.Common.CurrentVersion.targets(1217,5): 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
The build failed. Fix the build errors and run again.
[Done] exited with code=1 in 3.872 seconds
I've Already installed the latest .NET Framework and SDK but i can't get it to run.
I cannot figure out how to fix this. any advice?

There are helpful links in the microsoft forum Link and StackOverflow Link that have the question on your type Target frameworks are differents.

Related

msbuild GenerateDepsFile fails

All my projects are not failing to build on my Azure DevOps MacOS build host. It's a self-hosted build host. Suddenly, my projects are throwing this error when trying to build:
error MSB4018: The "GenerateDepsFile" task failed unexpectedly.
error MSB4018: System.MissingMethodException: Method not found: System.Collections.Generic.IList`1<NuGet.Packaging.Core.PackageDependency> NuGet.ProjectModel.LockFileTargetLibrary.get_Dependencies()
I found this GitHub issue which seemed similar, but the posted solution didn't help me:
https://github.com/mono/mono/issues/13537
As mentioned in xamarin/xamarin-android#3155 this is caused by a version mismatch in nuget between msbuild and dotnet core. The solution is to update your dotnet core install to the latest stable version
I've installed the most recent .NET Core, and updated Visual Studio for Mac, but alas, the problem remains.
Another information:
When I build the same Xamarin.iOS project from my Windows machine coupled with the same MacOS build host, the app builds just fine. But I am guessing the process is probably different.
Updating both Visual Studio for Mac and .NET Core SDK again today seems to have fixed the problem.

HTTP Error 502.5 - Process Failure in .Net core 1.1

It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found.
Check application dependencies and target a framework version installed at:
Alternatively, install the framework version '1.1.2'.
I installed Windows (Server Hosting) installer and Runtime Installer 64-bit but still facing this issue
I tired all possible solutions but nothing is working for me
please help me!
Thank You
Try running your website from the command line with command below:
dotnet YourWebApp.dll
This way you'll be able to see any errors which may be preventing your website from starting. You can then follow the erros shown and look for their specific fixes.

DNX SDK version "dnx-clr-win-x86.1.0.0-preview2-003131" failed to install

I am not understanding why am I getting above mentioned error while loading some new pulled project from tfs. Even though I have Microsoft DNX folder in my explorer it asks me to install DNX SDK and when I install it fails.
I tried updating visual studio also but it didn't work.
Can anyone help me with this?
Since I use VS 2015, above mentioned issue resolved for me by downloading specific .Net Core version from https://go.microsoft.com/fwlink/?LinkID=827546 . It gives you DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe
You can get other related .Net Core SDKs from https://www.microsoft.com/net/download/core
If you have VS 2017, you don't need to install .Net Core SDK explicitly. You get it by default in VS 17.
Cheers!

LC.exe" was not found?

currently i have changed the OS to windows 8 from Windows 7. While automation running 2005 project which refers LC.exe, wont compile successfully. But manually if i compile those project, get compiled.
please find the error i got while run those project from command prompt and also automating.
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1679,9): error MSB3091: Task failed because "LC.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "LC.exe" in the "bin" subdirectory beneath the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK v2.0. 2.) Manually set the above registry key to the correct location. 3.) Pass the correct location into the "ToolPath" parameter of the task.
Can anyone please help me ?
Re installing the .net framework 2.0 SDK would resolve this issue.
Framework SDK 2.0 refused to re-install on my machine but I was able to fix this by mucking about in the registry.

MSBuild error - Solution is of version 12.00 which is not currently supported

I have a Build server which has TFS 2010 Build Service installed. I have 2 Build Agents and 1 Controllers configured. One of our projects have been converted to Visual Studio 2012.
I found out that .NET framework 4.5 comes with new version of MSBuild which is version 4.5.
I installed .NET framework 4.5 on the Build Server because prior to installing it every time the project was built I kept getting the following error:
"Solution is of version '12.00' which is not currently supported".
After installing .NET 4.5, I still run into the same issue.
How could I go about resolving this?
Do I have to configure the Build Agent to use the new MSBuild 4.5 in order to build this particular project or do I set something in the projects solution file itself? If so how?
I would really appreciate if somebody could assist me with this please?
Try install vs2012 on the build server, while i don't believe it's strictly needed it's the easiest way to get all the requirements installed.
We have installed VS2012 on the build agent. Interestingly when I RDC to the build agent and then run msbuild from the command line everything works fine. So the issue looks like it happens before we even get to MSBuild.