Nancy, First razor page not working - razor

I'm trying to get a first Razor template working with Nancy, and the first line of my .cshtml...
#inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
gives me 3 build errors including the following...
'NancyContext' does not contain a definition for 'ApplicationInstance' and no extension method 'ApplicationInstance' accepting a first argument of type 'NancyContext' could be found (are you missing a using directive or an assembly reference?)
One very weird thing is that I have three "errors", but they're not stopping the build. They show in the Error list, the classes are underlined in red in the Solution explorer but not in the code window. Don't believe me ? Screenshot follows...
Update
I've fixed the first two errors by adding explicit references to System.Web.Helpers and System.Web.WebPages. The remaining error, 'NancyContext' does not contain a definition for 'ApplicationInstance', is still bugging me. ApplicationInstance is a type in System.Web, for which I have a reference. If I delete the System.Web reference the project still builds. If I add the reference I still have the error.

I got the same error today and then noticed that the project was getting build in "Build + IntelliSense" mode (as in your screenshot), going to the dropdown their and building in "Build Only" mode resolved my errors!

All I can say is that ApplicationInstance is not a Nancy type. Perhaps you are missing a namespace or assembly include? https://github.com/NancyFx/Nancy/wiki/Razor-View-Engine
Other than that, you are going to have to share a lot more information or there's not much to go on

Related

can I use Kendo UI Grid with Nuget package Telerik.UI.for.AspNet.Core?

I am running into a strange issue. I built an ASP.net Razor project with a Kendo UI Grid. When I first built it, I made a direct reference to the Kendo.Mvc.dll, and all was good. But I need it to be referenced by a NuGet package. However, when I switch the reference, it no longer recognizes Html.Kendo().Grid. I have tried moving the namespace reference from the Views/Web.config to the main web.config as well, but no luck. The error message I get is:
Compiler Error Message: CS1061: 'HtmlHelper' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'HtmlHelper' could be found (are you missing a using directive or an assembly reference?)
Is it possible that something in the larger NuGet Telerik.UI.for.AspNet.Core package is overriding something in the base Kendo.Mvc.dll? Or does my namespace need to be moved somewhere else? Any help would be appreciated.
Kendo UI Core does not include certain widgets, the Grid being one of them, nor does it include the server side wrappers so the Razor helpers such as Html.Kendo().Grid will not work. Hence using the Core package available via NuGet cannot be used for what you need. So the simple answer to your question is, unfortunately, no.

MvxBind Error View type not found

i have seen stuart answers explaining the meaning of this error, and when it can be ignored.
I currently have this error with custom controls referenced in an android layout which is consumed by an MvxFrame control.
One of these control is in an external lib and works perfectly.
Another one is an Mvx derived control and was in the main droid project. I moved it to a lib project, updated namespaces, and puh ! No more warning ... but no more control displayed in the app. And no crash and no log at all :(
idea needed !

Getting an error when attempting to acces a storyboard resource from code

A developer on my team did some refactoring of a control we're using in WinPhone 8 that represents a card that can be flipped.
We've created two animations using the storyboard named FrontToBackFlip and BackToFrontFlip, with declarations like: <Storyboard x:Name="FrontToBackFlip">
When a Tap is received we call
this.FrontToBackFlip.Begin()
or
this.BackToFrontFlip.Begin()
The refactoring the code worked before, but now we are getting the following error:
'Views.CardCarousel.IssuerCardControl' does not contain a definition for 'FrontToBackFlip' and no extension method 'FrontToBackFlip' accepting a first argument of type 'Views.CardCarousel.IssuerCardControl' could be found (are you missing a using directive or an assembly reference?)
Note that intellisense can find and complete the references to the Storyboards, so the namespaces and type names seem to be correct in both the XAML and code-behind. It's just that the compiler can't resolve these.
Any suggestions for tracking this down?
We were able to fix the issue by simply adding a new user control to the project, copy and paste the code from the control that was not building.

Method or Data Member Not found for every control or event

Got a weird problem. I was debugging some code for a form and everything was working as intended for the most part when suddenly I began to get a "Method or Data Member Not Found" for every event of my form. It's like my form suddenly does not recognize any of my controls or events. I have all of my methods properly closed and did not rename any controls.
Any ideas on what would be the root of "Method or Data Member Not Found" for every single control with an event?
Thanks
Importing into a fresh database as talbright suggested gave me more descriptive error messages.
A fresh import, compact&repair, and renaming of appropriate control fixed the problem from occuring. As Remou suggested, regular maintenance can help prevent these sorts of problems.
edit for future readers: This problem occurred while using a shared front end file. So don't do that if possible.
I've found that any MISSING: reference can make the simplest of code fail.
Check in the visual basic window
Menu Tools -> References
look down the checked refences to see if any are MISSING
I just fixed the same error by renaming text and combo boxes something not so close to a concatenated Table & Field string. Actually just prepended those names with "tbx" and "cbx".

How to make Flashdevelop errors appear in Results Panel?

I am using Flashdevelop to build an Actionscript 3.0 game. It was originally a FlashIDE project but I decided to migrate the project to FlashDevelop. I also changed some asset and property names, as a result there were a lot of syntax error. The errors keep coming out in the Output Panel instead of Results Panel (is that normal) when compiled. I know that when I click errors in the Results Panel it will open and point the error in the Code Panel. I can't do that with errors in the Output Panel (I assume its normal). Is there something I can do to make the errors clickable ?
Even a simple error like this doesnt come out in the Results panel:
Loading configuration file H:\04 Noveline\03 GD\GD03\Folder (aaaa)\TEST\obj\MeccatomedinaConfig.xml
H:\FD(1)\TEST\src\Game.as(75): col: 3 Error: Access of undefined property sssss.
sssss
^
Build halted with errors (fcsh).
(fcsh)
afaik it's impossible to make output panel clickable. but you can press F10 to open program settings dialog and check if your results panel is disabled. and also disable output panel if it's really annoying)
The errors should appear in the results panel and the output panel. Make sure the results panel is open.
Remove parentheses from project path to workaround the issue.
(As Stucko & Markus von Broady wrote in comments.)
This issue is still around for FlashDevelop 5.1.1.1.
I have logged the issue here for ref:
https://github.com/fdorg/flashdevelop/issues/1676