missing NinjectDependancyResolver.cs - asp.net-mvc

i'm working on a project that uses mvc in dotnet. i have to develop the remaining code given to me.I made a copy of the Maincode and tried to run it ;i'm getting this error when i tried to run with breakpoints.
This is the error i'm getting.
i googled and i got a answer saying to refresh the reference i did that too, but its not helping. what can be the problem.
this is the error i'm getting, a screen shot from web.
http://www.google.co.in/imgres?um=1&sa=N&hl=en&biw=1024&bih=621&tbm=isch&tbnid=MuZffsIBSR3nhM:&imgrefurl=https://stackoverflow.com/questions/8506618/no-source-available-error-with-ninject-when-debugging-code&docid=yGGstg8JC99hAM&imgurl=http://i.stack.imgur.com/nlWbT.png&w=1107&h=480&ei=GotmUf2yNYWKrgeam4DYBw&zoom=1&ved=1t:3588,r:3,s:0,i:91&iact=rc&dur=1437&page=1&tbnh=148&tbnw=341&start=0&ndsp=12&tx=91&ty=96

Are you sure your reference to Niniject in web project references is OK? Because it seems like author of the code used sources of ninject (placed in c:\projects\ninject\...) instead of library or nuget package (i dont know why). Try remove that reference and add Ninject as nuget package and see what happens.

Related

F# build error: "No compiled representation for provided namespace"

Has anyone run into this error message before? Google found it for me in the source code (https://github.com/fsharp/fsharp/blob/master/src/fsharp/tast.fs), but I haven't the slightest idea what is causing it.
This started happening when I tried to upgrade my library project from .NET 5 to .NET 6, so the real answer to my question may be an explanation of what I did wrong there. All I did was the following:
In the fsproj, changed "TargetFramework" from "net5.0" to "net6.0"
In my paket.dependencies file, changed "framework" from "net5.0" to "net6.0". (I've also tried commenting out the "framework" line.)
Then after running "paket update" and "dotnet build" I get the obscure error. ("error FS0192 : internal error : No compiled representation for provided namespace")
UPDATE: After some laborious code commenting/uncommenting, etc., I believe I've narrowed this down to my code's use of the Fable.RegexProvider assembly. (I use the SafeRegex component.) RegexProvider hasn't been updated in a couple years. I'll alert the folks over there to this issue, and I'll post an update here if/when I learn anything. (In case anybody else runs into this.)
In case anyone else runs into this, here is the solution (which is the solution #CaringDev recommended above, though it only works for Fable 3.7.18 and after):
When I raised this issue on the Fable.RegexProvider github (see thread here: https://github.com/fable-compiler/Fable.RegexProvider/issues/9), the initial thought was to try a .NET 6 build of Fable.RegexProvider. But then Alfonso Garcia-Caro realized that subsequent improvements to Fable may have obviated the need for SafeRegex.
He ultimately needed to tweak something in Fable, but as of version 3.7.18, the Fable transpiler supports the use of FSharp.Text.RegexProvider, such that Fable.RegexProvider is now unnecessary.

vs2019 'SharpDX.Toolkit.Compiler' could not be found after Nuget package update

I have an old WPF/HelixToolkit/SharpDX project from 2016 that I started working with. I was having some viewport issues and thought they might be cured by updating HelixToolkit & SharpDX packages. Unfortunately, after the updates my project will no longer compile.
I tried Build->Clean and Rebuild All, but no joy. Still getting these errors:
Severity Code Description Project File Line Suppression State
Error The "SharpDX.Toolkit.EffectCompilerTask" task could not be loaded from the assembly \SharpDX.Toolkit.CompilerTask.dll. Could not load file or assembly 'file:///C:\SharpDX.Toolkit.CompilerTask.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. MyWPFMagViewer2
Severity Code Description Project File Line Suppression State
Warning The referenced component 'SharpDX.Toolkit.Compiler' could not be found. MyWPFMagViewer2
I'm really hoping it's something simple, but I don't have a clue what it might be. Can anyone help?
TIA,
Frank
I never found an answer to this problem, but I was able to work around it by re-cloning my project from GitHub, and not updating SharpDX
Frank

File not found error on ALL files in Blackberry project

I haven't touched any of my Blackberry projects for about 2 weeks now. Today I had to make some modifications, but when I tried to compile and run my code I got an error message like the following (this has been simplified):
JavaBuilder handling CoreException
org.eclipse.core.runtime.CoreException: File not found: C:\Program Files\etc etc etc\ClassName.class
And this error pops up for every single one of the files in my project.
I'm not a Java professional by any means, but I'm pretty sure this has something to do with my build path. What do I have to do? I did a system restore a little while back don't know if that has anything to do with this.
Thanks a lot.
Problem solved. For some reason alot of the folders in my project's folder were duplicated (ie: mainpackage, mainpackage(2)), so each one of my class files had a twin. Eclipse didn't tell me this, instead it just decided to say "I can't find the files" even though they were there. Not a very useful error message.
So I deleted mainpackage(2) and now it runs fine.
Thanks again for the help.

how to step into system.web.mvc

Does anyone have know how I can step into system.web.mvc? I am getting an error (Cannot create an abstract class) that is buried in the System.Web.Mvc.DefaultModelBinder.CreateModel method, and I can't tell which part of my code is causing the issue.
I was advised that I could download the sourcecode from codeplex, (actually microsoft.com/downloads as I am using 1.0), build in Debug and then step through. I tried, unfortunately the system.web.mvc was installed in GAC, thus causing an ambiguous call, and gacutil would not allow me to uninstall, so tried by hand removing from the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Global\system.web.mvc). when I ran my program it was still reporting an ambiguous call.
Background
A couple of weeks ago I had a problem where MVC was throwing up a YSOD, but I could not step into the code to find the problem because the issue was I was doing something wrong, that was not being picked up until it was in the framework (in this case, by thrashing around blindly for a day I found it was that I didn't have a default empty constructor on one of the classes within my viewmodel). Now I am getting a different error (Cannot create an abstract class) that is buried in the System.Web.Mvc.DefaultModelBinder.CreateModel method, but I don't know what part of my code is causing the error in the framework.
It's a little involved, but you can do it. Steve Sanderson has step-by-step instructions.
If you have the source code then you can recompile the code using a different assembily name and reference that.

A problem with Castle.Core.dll

the thing is I have an issue with Castle.Core.dll. I've installed RC3 from their website, so I have 1.0.3.0 version of DLL.
I`m studying MVC framework using Steve Sanderson's book (which is great, btw) and running samples.
Project compiled successfully, all was running, but suprisingly today I've got this runtime exception:
Method not found: 'Void Castle.Core.Configuration.ConfigurationCollection.AddRange(Castle.Core.Configuration.ConfigurationCollection)'
It's strange because before today project was OK, all worked well. I checked on RedGate's Reflector - this method is present in the DLL.
So, any ideas what I've done wrong? I restarted VS, deleted reference and added it again - in vain:(. Googling does nothing for me - many people have similar troubles, but not exactly.
EDIT:
And, by the way, I've tried Steve's code downloaded from apress.com. It didn`t work - the reason is the same.
[UPDATE - pulling what's in comments to the body of the answer]
Ensure you have no old (RC) version installed in your GAC, if you do - uninstall it.
Download binary package of Windsor 2.0 (or newer if available) and unzip it to a folder on your hard drive
Remove old references in your project. Add references to the files you extracted in the above step
Ensure you updated version number in your app.config (can be copied from Reflector)

Resources