Visual studio 2017: Razor views- HtmlHelper doesn't contain methods - asp.net-mvc-5

ASP.Net MVC 5 project is working fine in VS 2015.
If I open it in VS2017 from the same place on the same machine I got errors in Razor views like:
"'HtmlHelper' does not contain a definition for 'ActionLink' and no extension method 'ActionLink' accepting a first argument of type 'HtmlHelper' could be found"
"The name 'ViewBag' does not exist in the current context"
errors window
I looked for similar errors but cannot find anything about VS 2017.

Related

Visual Studio 2015 Application properties window null reference error

I am creating a project in VS2015. template i have choose is blank Universal app.
An error occurred trying to load the page.
Property accessor 'TargetDescriptions' on object
'Microsoft.VisualStudio.ProjectFlavoring.Automation.Project.CommonProjectExtender'
threw the following exception:'Value cannot be null. Parameter name:
targets'.
I get issues accessing some projects properties due to addins I've added to my VS (GhostDoc): can you try to disable all your addins to check of that work ?
I reinsatlled the nuget package manger: https://visualstudiogallery.msdn.microsoft.com/5d345edc-2e2d-4a9c-b73b-d53956dc458d
I restart the visual studio
and it works fine for me.

IBM Worklight - "System.NotSupportedException" in Visual Studio

Hi I am using Worklight to develop application for Windows Phone 8. The application was working fine, however when I applied the Fix Patch for Worklight the Windows Phone Console started to give me below error :
An exception of type 'System.NotSupportedException' occurred in Microsoft.Phone.ni.dll and wasn't handled before a managed/native boundary
The other error is
Error:"Unable to get property 'content' of undefined or null reference file:x-wmapp0:/www/skinLoader.html Line:1"
Any one has any idea why these two errors started coming all of sudden?
Moreover, where can I change Worklight specific properties in Visual studio?
Moreover, where can I change Worklight specific properties in Visual
studio?
There are no "Worklight specific properties" in Visual Studio.
Once you build the Worklight project in Eclipse and open the result (in your case, the generated Windows Phone 8 project) in Visual Studio, that's it - it is a Windows Phone 8 project.
Error:"Unable to get property 'content' of undefined or null reference
file:x-wmapp0:/www/skinLoader.html Line:1"
Try to:
Delete the native folder in Eclipse from the your-project\apps\your-app\windowsphone8 folder
Re-build and deploy the application
Re-open it in Visual Studio
As for the SystemNotSupportedException message, this can be safely ignored.

Visual Studio 2012 Add New Class Missing Template

I've just installed VS2012 Ultimate side by side with VS2010 and it seems the standard templates are broken. I cannot add a class nor a console application.
File > New > File dialog contains the "Visual C# Class" template
but Right Click Project > Add > Class dialog does not contain the "Visual C# Class" template
Also File > New Project only contains MVC4 and not things like Console Application even if I change framework version and left filter.
EDIT: This only occurs after installing update 1. We have tried reinstalling, repairing, deleting the templates cache and reinstalling templates. We're considering working without update 1 at the moment, but there doesn't seem to be a way to uninstall just the update.
Corrupted ISO supplied, tried another from msdn and all fine now.

Web Project Templates not appearing in Visual Studio 2012

I'm evaluating single-page application frameworks, and I've just downloaded and installed the various templates from ScottGu's page.
However, when I attempt to create a "New ASP.NET MVC 4 Project", as detailed on the Durandal page, here, I see only the default, Visual Studio-installed templates.
I've checked in C:\Users\me\AppData\Local\Microsoft\VisualStudio\11.0\Extensions, and I can see a directory (called eislr0na.wgk) containing the Durandal bits. I've deleted the .cache files in the Extensions folder and restarted Visual Studio.
But, I can't see any of the single-page templates in the dialog box.
What's the problem?
In order to use the new templates you must have the Visual Studio 2012.2 update installed.

Unable to edit Orchard CMS site in Visual Studio 2012

I'm trying to create a site using Orchard CMS. To get started, I downloaded / installed Orchard from WebMatrix. I successfully setup a site using the "Default" recipe. I then click the "Files" tab within the accordian along the left side. From here, I can see all of the files in my project. To begin editing within Visual Studio 2012, I click the "Visual Studio" button in the ribbon.
Once inside Visual Studio, I right-click on the solution and select "Rebuild Solution". The solution begins building, but then I receive an error. The error says:
Error 1 Object reference not set to an instance of an object. C:\Users\username\Documents\My Web Sites\Orchard CMS2\Modules\Contrib.Cache\Contrib.Cache.csproj 1
Please note that at this point, I have not even edited a single file. Rather, I created a basic site and attempted to open it in Visual Studio. What am I doing wrong?
Only the full source code will build in Visual Studio. You can edit the compiled web site version that you downloaded in Visual Studio, but you won't be able to build it. It actually doesn't need building as it has dynamic compilation built-in.
If you want to build the framework and core, get the full source code version.

Resources