Comments (26)
Any update on the issue?
from aspnet-helper.
The latest builds didn't produce any errors. I published version 0.6.2 a few minutes ago.
I hope I can get any feedback :)
from aspnet-helper.
Hi @schneiderpat
It works but I want to ask you do you have any dependency on _ViewImports.cshtml file.
If I am building a project from scratch and I am not using tag helpers do I need to create the _ViewImports cshtml in order to use Intellisense on the view because it doesn't works than i am trying to figure out why?
from aspnet-helper.
I figured out if don't put
@model ClasssName to the top line the IntelliSense won't work.
You can try the same.
Appreciate your hard work and will surely share and blog about it.
from aspnet-helper.
Hi @SailleshPawar
Let me know if you´re done with your blog! I would like to read it :D
from aspnet-helper.
I am still having issues :(
This is an example of one of my views. The property that the extension says it's missing does exist:
http://take.ms/QZXGg
Also intellisense for Model doesn't seem to work for me anymore:
http://take.ms/1mUl1
from aspnet-helper.
@karabaja4 Hi make sure you have updated to the latest update.
from aspnet-helper.
@SailleshPawar I am using latest - vscode 1.10.1 (released yesterday) and ASP.NET helper 0.6.2.
from aspnet-helper.
@karabaja4 Share the _ViewImports.cshtml code
from aspnet-helper.
@schneiderpat It's dependent on _ViewImports.cshtml. I am trying to play with it, it seem like this to me. Can you please elaborate on the same.
from aspnet-helper.
@using app.Portal.ViewModels.Admin
@using app.Portal.ViewModels.Controls
@using app.Portal.ViewModels.Databases
@using app.Portal.ViewModels.Home
@using app.Portal.ViewModels.Static
@using app.Portal.ViewModels.Controls.Utils
@using app.Base.Platform
@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers"
The model in my screenshots is in namespace "app.Portal.ViewModels.Controls".
from aspnet-helper.
@karabaja4 latest version seems to be 0.6.0
from aspnet-helper.
Are your models stored in a ViewModels or Models folder?
Latest version is 0.6.2
from aspnet-helper.
@schneiderpat Models are stored in ViewModels.
from aspnet-helper.
Can you post your model?
from aspnet-helper.
using Newtonsoft.Json;
namespace app.Portal.ViewModels.Controls
{
public class IconAndLabelModel: IViewModel
{
[JsonIgnore]
public string LeftIconClass { get; set; } = null;
[JsonIgnore]
public string Text { get; set; } = null;
[JsonIgnore]
public string RightIconClass { get; set; } = null;
}
}
from aspnet-helper.
The problem might be your interface or your default values. At the moment just simple classes are supported to provide IntelliSense.
from aspnet-helper.
@schneiderpat I get the same result if I remove the interface and default values.
I will try to put together a sample project for you so you can try and reproduce it from there.
from aspnet-helper.
That would be the best! Thanks for your help at this issue! I´m sorry you´re facing it!
from aspnet-helper.
@karabaja4 That would be best.
from aspnet-helper.
Guyz are you using project.json or latest .csproj file?
from aspnet-helper.
I´m using .csproj but project.json should be supported too
from aspnet-helper.
I updated VS code just now seems like IntelliSense for project.json for dependencies is not coming. :(
extension is working fine no doubt with latest 0.6.2 (y)
from aspnet-helper.
project.json is marked as deprecated, maybe they removed IntelliSense from it
from aspnet-helper.
@schneiderpat Thanks for the update. Need to upgrade :D
from aspnet-helper.
I think I figured it out. This is the test project:
https://www.dropbox.com/s/myxn3l3cq3zsl09/app.zip?raw=1
(to start the project, run "dotnet restore" and "dotnet run" in app.portal folder)
You can see the problem in "MyView.cshtml" file.
In short, it seems that if the first entry in "_ViewImports.cshtml" is something that is not used in the view, the view displays an error.
Also please note that there seem to be two separate issues here: one is that the razor view linter complains about missing properties, and the other are errors when hovering over properties:
[Error - 21:20:38] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: Cannot read property 'type' of undefined
Code: -32603
from aspnet-helper.
Related Issues (17)
- Anchor helper not working if project root is not vs code workspace root
- Intellisense for Model's in cshtml files not working. HOT 6
- intellisense @Model doesn't shows some properties. HOT 3
- Intelligence not working in View
- False error reports in view + intellisense not working HOT 4
- Kentico and Umbraco CMS
- Extension causes high cpu load
- goahead
- Usage
- Can't seem to get the extension to work (vscode on Debian 8.6) HOT 4
- VS Code 1.9.1 on MacOSX HOT 1
- cpu lockup on ubuntu HOT 1
- Intellisense HOT 8
- High CPU usage - macOS HOT 1
- Model from different namespace than view HOT 2
- It does not autocomplete inherited models HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet-helper.