In Xamarin, I have added the "universal-image-loader-1.9.2-with-sources.jar" as a file in the "Jars" folder of a binding project, I have then built the application but I am getting one error.
Here is the error:
Error CS0234: The type or namespace name 'DiskLruCache' does not exist
in the namespace
'Com.Nostra13.Universalimageloader.Cache.Disc.Impl.Ext' (are you
missing an assembly reference?)
Can I please have some help to get this code working?
Thanks in advance
You need to add the binding project as a reference in your Startup project.
To do so click on References directory in you solution tree and select the binding project in the "Projects" tab.
Good luck!
You need to create the Bindings Library project and then add this jar into the folder Jars.
For fixing error:
The type or namespace name 'DiskLruCache' does not exist in the namespace 'Com.Nostra13.Universalimageloader.Cache.Disc.Impl.Ext'
add to Transforms\Metadata.xml
<attr path="/api/package[#name='com.nostra13.universalimageloader.cache.disc.impl.ext']/class[#name='DiskLruCache']" name="visibility">public</attr>
Related
I'm getting "The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)" from "using System.Windows.Forms;". Various people on the internet say to add it through a "References" tab in Solution explorer, but for me it's not present:
How do I get the references tab to appear, or how do I otherwise get "using System.Windows.Forms" to work?
In section 5 of the ASP>NET MVC Music Store example, "Creating the StoreManagerController," when I click "Add" I get the error,
There was an error running the selected code generator:
'Unable to retrieve metadata for 'MVCMusicStore.Models.Album.'
The popular solution is to comment out the connection string in Web.config. This did not work for me. After trying many things I decided to add the code manually, by taking it from the completed code that's included with the example. When I do that I receive the error,
Compiler Error Message: CS0234: The type or namespace name 'Album' does not exist in the namespace 'MvcMusicStore.Models' (are you missing an assembly reference?)
and on line 31 I see the error,
public class _Page_Views_StoreManager_Index_cshtml : System.Web.Mvc.WebViewPage<IEnumerable<MvcMusicStore.Models.Album>>
Album is defined in the models folder. I have used webform development many times and am trying to add MVC to my repertoire. It seems to me "Album' is not registered, but I don't even know if that's appropriate lingo for MVC. What's the problem? I'm running this example in Visual Studio 2017.
The problem with line 31 is my project is named "MVCMusicStore". In the completed code I imported it's "MvcMusicStore". So it's looking at the wrong thing for the 'Album'namespace. Still don't know what causes the first error.
After correcting the namespace in the sample file, that error goes away and the new error is on the line;
#foreach (var item in Model{
the error is "System.NullReferenceException 'Object reference not set to an instance of an object.'
I am adding new table in database. Then for that when i am updating Edmx designer file become blank it's only contain:
"// Seeing this comment implies that the code generation for file
'E:\PrognoHealth\trunk\Development\PrognoHealth\PrognoHealth_MT\PHModel.edmx'
// failed. See the ErrorList for details."
And error list contain like
"Severity Code Description Project File Line Error CS0246 The type or
namespace name 'PrognoHealthEntities' could not be found (are you
missing a using directive or an assembly
reference?) PrognoHealth_MT E:\PrognoHealth\trunk\Development\PrognoHealth\PrognoHealth_MT\Partial\Address.cs 18
" error
Thanks in advance.
Please Check your EdmxFileName.context.cs file.
Check your EdmxFileName.context.cs file. Th class name must be "PrognoHealthEntities".Also check constructor name.
I am trying out examples from a book. The first one is really simple .. a few lines of code in a view (MVC).
I run the code but get an error :
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Ajax' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)
Source Error:
Line 22: using System.Web.WebPages;
Line 23: using System.Web.Mvc;
Line 24: using System.Web.Mvc.Ajax;
Line 25: using System.Web.Mvc.Html;
Line 26: using System.Web.Routing;
Source File: c:\Users\Aindriu\AppData\Local\Temp\Temporary ASP.NET Files\root\6882868f\b519e811\App_Web_index.cshtml.a8d08dba.h-o4pos5.0.cs Line: 24
I fixed the problem - I right clicked the solution in Solution Properties (on the right) and selected Manage Nuget Packages - i typed in MVC on top right search bar - and installed MVC.... it installed a whole load of files and my program worked..... but it added code to the solution I am working on..
Is there a easy way to get around this error ? I don't want to have to keep doing this every time I create a MVC program...
If you are using Visual Studio, from the project's References select the System.Web.Mvc dll. At the Properties Window set the Copy Local attribute to True.
You could even copy the necessary references to the bin\Debug or bin\Release directory (whichever you would use) manually, but setting it to happen automatically by Visual Studio is far better.
With newer versions of MVC, the preferred method is to use the NuGet package manager. Under: View > Other Windows > Package Manager Console. Type:
Install-Package Microsoft.AspNet.Mvc -Version 4.5.1
You should do this for every Mvc project.
I have a resource file named Res.en.resx in my Asp.Net Mvc 4 project.
In a view I'm trying to access its properties like this: #MvcApp.Resources.Res.Title but I'm getting the following error:
The type or namespace name 'Resources' does not exist in the namespace 'MvcApp' (are you missing an assembly reference?)
If I change resource name to Res.resx everything works fine.
Why is this happening?
I believe you need to have at least a file named xxx.resx which contain the translation for the default language of your application.
So if your main language is french and you would like to have an english version, you need:
xxx.resx file which contain the default language of your app.
xxx.en.resx file which contain the english version of your file.
Hope this help!