Razor Runtime Compilation - asp.net

ive been having trouble trying to install razor runtime compilation and i continue to get a fault. i updated the vs2019 community edition and was able to click on the checkbox to add the "runtime compilation". when the project is loading, it doesnt install the "razor runtime compliation" package. it doesnt allow me to search for it via NuGet anymore either.
I tried my best to search around and some made it seem very simple to just install it from the pack manager or NuGet. Im using asp.net core 3.1 and vs2019 16.6.1 community edition.
EDIT: HOW CAN I INSTALL ...razor.runtimecompilation.i have not been able to figure out a solution to the error.

"Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
This package is from nuget.org in my visual studio. While from your screenshot, it retrive from http://packagesource. Maybe you should configure your package source:

Related

Net Core 2.1 install Entity Framework Core does not work?

I create a new project using VS2017, select new Console App (Core) version 2.1; etc. When I use NuGet to install the Entity Framewwork Core, version 2.1.1, it is not installing to the Assemblies directory but instead appears under the NuGet directory. When I try to add a migration using the package manager I get a 'The term 'add-migration' is not recognized' error. I have reviewed the other SO answers to this problem, and searched google, but none of those helped.
I have another project, it's an older one from several months ago, where the Entity Framework Core was installed under the Assemblies directory and for that project everything seems to work.
From the above it appears that where NuGet places the Entity Framework Core dll is the only difference and it is causing the package manager to fail to find it.
The get-module command for the older project shows the Entity Framework Core and the correct version, but get-module for the new project does not.
Any thoughts on why this is happening and how I can fix it?
From this post :
The solution that worked for me after trying a whole raft of other solutions posted, was to right click on my project => select 'Manage Nuget Packages' => select the browse tab, but thick 'Include prerelease' check box, and install the 'Microsoft.EntityFrameworkCore.Tools'. N.b that aspnetcore project in visual studio 2017 do not seem to have the 'project.json' file.

Visual Studio 2017 not installing packages for new projects

Recently installed Visual Studio 2017.
Usually, when you create a new project, you immediately fire it up and run the scaffolded code.
Unfortunately for me, the new project doesn't have the required packages making the build fail.
Also, objects in the code are marked as not recognized. This is also correct for javascript dependencies.
4 new projects of different types, same result. Didn't even change the code yet I can't build.
The light bulb icon doesn't even show the dependency. Visual Studio doesn't recognize it.
How come scaffolded code has missing references??
Please help.
Well, this was annoying...
Package restore was disabled.
Enabled it in Visual Studio's options and ran the project.
Packages appeared magically.
Tools > Nuget Package Manager > Package Manager Settings

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.

How to get ASP.NET MVC Music Store up and running with Visual Studio 2013/2015?

I want to get MVC Music Store tutorial application up and running with Visual Studio 2013/2015. Here are the steps that I've taken:
downloaded the latest version from Downloads page
unpacked it
opened it with Visual Studio 2013/2015 - got a migration report without errors but with some warnings
tried to build the solution, but it won't build - got a plenty of errors about missing type/namespace like that:
The type or namespace name could not be found (are you missing a using
directive or an assembly reference?)
How do I build and run locally the MVC Music Store project with Visual Studio 2013/2015?
There are two ways:
1) Download and install ASP.NET MVC 3 Tools from the official ASP.NET MVC 3 page or from Microsoft Download Center. It will install the required DLLS into the GAC.
2) Install the corresponding ASP.NET MVC 3 NuGet package into MvcMusicStore project using following command in the Package Manager Console:
Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1
or
Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1
After using either of the described ways you will be able to successfully build and run the MVC Music Store tutorial application.
Note that these ways are not conflicting with each other, so you may safely install ASP.NET MVC 3 Tools into your OS and install ASP.NET MVC 3 NuGet package into the project.
Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1
Worked for me instead of Version 3.0.50813.1
I was running into the same problem as other mentioned here, tried installing the nuget package and was still getting an error.
My solution after following other advice here by installing the nuget package, the key to my solution was to make sure the project targeted "Microsoft Framework 4.0". I.E. Right mouse on the project node in the solution explorer, select properties, and within the "Application" page for the project select ".Net Framework 4.0".
All is working fine for me after this, seems VS was defaulting to 4.5.1.
HTH.
dan d:)

VS2013 Scaffolding Error when constructing view

I'm getting a curious error when attempting to generate a view via the 'Add View' dialog. Simply leaving the dialog as is (ie creating view 'View') and hitting 'Add' yields the following error dialog:
Error: There was an error running the selected code generator: 'The Templates/PackageVersions5.0.1xml file is missing from the installed template folder.'
Which I'm afraid means little to me. I've googled the xml file to no avail.
Not really sure where to go now - I'm unable to add views to my project via scaffolding (though I can of course just by 'adding a new item' and building it myself).
How can I track down the source of this error?
Posting here because I ran into the same "file is missing" issue with Visual Studio 2019 and PackageVersions5.2.6.xml. This was one of the only pages I could find related to this scaffolding issue so I suspect others will find their way here too.
I found that upgrading the "Microsoft.AspNet.Mvc" package via NuGet to 5.2.7 was not sufficient to fix the problem. I also had to upgrade "Microsoft.AspNet.WebApi" and its related packages to 5.2.7. The Add View option started working again afterward.
Just make sure you have same version of MVC nugget in all projects, if you only have one project then upgrade/downgrade MVC to different version then revert back to the version you require and issue will get fixed.
I just changed version from 5.2.3 back to 5.2.2 and then reverted back to 5.2.3 and all worked. It appears some file got messed up or and then was restored by this.
I got same issue while using visual studio 2019 community edition, where I am able to create view using visual studio 2017.
After reading answers here, I tried upgrading Microsoft.AspNet.Mvc package, and it works for me.
I'm afraid the rather unsatisfactory solution I arrived at was to create a clean project and import the project elements in, recreating the project from scratch.
I assume that some deep-configuration had become corrupted and I was unable to work out how to fix it.
I ran into the same problem when using a project from VS2013 in VS2015. In my case it was PackageVersions5.1.3.xml that was missing. 5.1.3 seems to be the version of MVC this project was using. I updated MVC to the latest (currently 5.2.3) and this solved the issue.
The XML file should exist in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates\
I had the same issue. The problem started after installing DevExpress to project. I found that DevExpress installation creates some DevExpress folders in D:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions but all necessary files for scaffolding lived in D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions. I copied the content of extension folder from vs professional to enterprise restart Visual Studio and Scaffolding works again.

Resources