system.data assembly reference - xamarin.ios

I am trying to reference System.Data in a MonoTouch application for the iPhone, but am getting the following error:
The type or namespace 'Data' does not exist in the namespace 'System'.
Are you missing an assembly reference?"
I have tried adding a reference in the Edit References window, but cannot see it listed anywhere, or find it using the search option on the left side of the Edit References window.
How can I resolve this issue?

From MonoDevelop look at your solution pad (left by default).
You should right-click the References (under your project) and select "Edit References...".
The dialog should show you some tabs, select the Packages one.
A list of assemblies should be shown. Click on the checkbox across the one named:
System.Data 2.0.5.0 mono-iphone
Then click Ok to close the dialog and rebuild your application.

Related

what is the class wizard file name in visual studio 2019? How can I rebuild it? It is corrupt

I have a corrupt situation in Class Wizard in Visual Studio 2019. When I try to "Add Variable" I get the error "Did not find a dialog class with the specified ID ''".
To avoid some situations like this, may be you can try in a different way.
From your solution, select "View" from menu and from the pulldown select "Class View".
Then select the respective class from displayed class view, to which you want to add variable, right click, then look for "Class Wizard".
the Class Wizard will be opened with all the required fields filled up.
Then select the "Member Variables" tab, then select the "Add Custom..." and add the variable.
In my experience and as a result of discussions with Microsoft about this issue, we have found that if you shut down Visual Studio, rename your project folder (to give it a new time stamp) and rename it back, will trigger a rebuild of the Class Wizard database.

How to add a default include path in MSVC++ 2012?

I would like to add an include and library path to the default configuration in VC++ 2012. I know I can add it manually per project, but there is a checkbox "Inherit from parent or project defaults". I would like to modify this "project defaults" so it applies to all my projects.
Any clue of where to edit this?
***EDIT
No, that answer doesn't help. I edited the vsvars32.bat file, run the bat to check that INCLUDE and LIB variables where updated with my own path (and they are), but when I start MSVC++ 2012 my added path is not included.
It's a bit of a pain, and there is a blog post on MSDN that explains in detail, but in summary here's how you do it:
Open a project, any project.
From the menu, choose View / Property Manager (near the bottom of the menu)
In the property manager window, expand the project tree to show Debug and Release nodes
Expand either Debug or Release (it doesn't matter which)
Right-click on Microsoft.Cpp.Win32.user
Choose Properties from the pop-up menu
You should see a dialog where you can edit the VC++ Directories entry like this:
Once you OK through everything, any project you create or load will inherit these defaults.

VS2012 Assembly is incorrectly specified as a file

I am getting this warning on assembly references in a VS2012 Winforms application project. In this case the references are for Infragistics controls used by the app, which are located in the bin folder.
This issue has been addressed in the following link, but the answer ("set the Build Action" property) doesn't work because there is no Build Action property in VS2012 for referenced assemblies.
VS2005: Assembly '<assembly>' is incorrectly specified as a file.
What's the fix?
You probably refer to the wrong Assembly.
You need to "set the Build Action" for the Assembly which located in Bin folder, NOT from references.
Go to Solution Explorer > Expand the Bin folder, right click on the
Assembly that give warning, and you should be able to set the Build
Action
Again, it is not the assembly that located in the References panel but it is from Bin Folder
Have you tried removing the references, saving the solution and exiting Visual Studio - then re-opening the solution and re-adding the references?
The problem is almost certainly lurking in the project file (.csproj if this is a C# app) if you fancy opening it up in a text editor and having a look - might also help if you were to paste it here.
Alternatively, have you tried recreate the project from scratch? May be a quicker solution than trying to work out what's happened.

Reference defining all Visual Studio 2012 Solution Explorer Icons

I have been unable to find a reference to the new Visual Studio 2012 Solution Explorer icons. From time to time, some of our .sql files icons change as with the one with the yellow triangle below. Does such a reference exist? If not, what does this yellow triangle icon mean?
I don't have a reference for all the icons. However, I believe the yellow triangle indicates that there are warnings associated with referenced assembly.
View the warnings by going to Error List (usually in the at the bottom of Visual Studio or in the menu VIEW - Error List or by Ctrl + W, E).
Then click on the Warnings tab. There should be one or more warnings about the assembly. Usually there are missing or conflicting references or something like "the primary reference X could not be resolved because it has an indirect dependency on Y which has a different version of the framework.
This could happen if you reference an assembly that is built for a new version of the .NET framework. (Example your assembly is using .NET 4.0 but the assembly you want to use is built with .NET 4.5).
The icon indicates a document warning.
Follow this link Visual Studio image library. The download contains a document listing of the icon and what it means.
As Chris Weber says, the problem may arise if you add a new project to your solution, and the new project targets a higher version of the .NET framework than the other projects in the same solution.
Fix: Right click your newly added project, go to properties. On the left handside, find the topmost tab called "Application". In the right frame, you should see a dropdown where you can set "Target Framework". Make sure this is the same version as the rest of your solution.

Linker error after porting C++ application from VC6 to VS2005

I am getting an error while porting my application from VC6 to Visual Studio 2005.
Does anyone have any idea what this means?
mfcs80.lib(dllmodul.obj) : error
LNK2005: _DllMain#12 already defined
in MSVCRT.lib(dllmain.obj)
From http://support.microsoft.com/default.aspx?scid=kb;en-us;q148652
A LNK2005 error occurs when the CRT
library and MFC libraries are linked
in the wrong order in Visual C++
Because
The CRT libraries use weak external
linkage for the new, delete, and
DllMain functions. The MFC libraries
also contain new, delete, and DllMain
functions. These functions require the
MFC libraries to be linked before the
CRT library is linked.
So
There are two ways to resolve this
problem. The first solution involves
forcing the linker to link the
libraries in the correct order. The
second solution allows you to find the
module that is causing the problem and
to correct it.
Either
Force Linker to Link
Libraries in Correct Order
On the Project menu, click Settings.
In the Settings For view of the Project Settings dialog box, click to
select the project configuration that
is getting the link errors.
On the Link tab, click to select Input in the Category combo box.
In the Ignore libraries box, insert the library names (for example,
Nafxcwd.lib;Libcmtd.lib).
Note The linker command-line equivalent in /NOD:.
In the Object/library modules box, insert the library names. You
must make sure that these are listed
in order and as the first two
libraries in the line (for example,
Nafxcwd.lib Libcmtd.lib).
To set this option in Visual C++ .NET,
read the "Setting Visual C++ Project
Properties" online help topic.
Or
Locate and Correct the
Problem Module To view the current
library link order, follow these
steps:
On the Project menu, click Settings.
In the Settings For view of the Project Settings dialog box, click to
select the project configuration that
is getting the link errors.
On the Link tab, type /verbose:lib in the Project Options
box.
Rebuild your project. The libraries will be listed in the output
window during the linking process.
I'm sure there are a number of reason this could happen - the worst one I ever found was when trying to integrate a number of static libraries (ours) that were originally DLLS (in fact, we build the projects as both DLL & static libraries).
Our C++/CLI DLL was using the static versions of these libraries (To avoid DLL dependency issues that were causing ASP.NET loading issues when the C++/CLI Dll was being used) and was initially seeing the same linker error.
The problem turned out to be the use of AFX_MANAGE_STATE(AfxGetStaticModuleState()) macro that was needed when the code was built as a DLL but not actually needed for the static library call.
To solve this i ended up adding the following code to the stdafx.h of each project.
#ifdef OMUTILITIES_LINK_STATIC
#undef AfxGetStaticModuleState
#define AfxGetStaticModuleState AfxGetModuleState
#endif
This, of course, may not be your specific problem. But the way i eventually figured it was by turning on the /VERBOSE option for the linker and seeing who, what, where & when it was pulling in the runtime libraries. (Project Properties/Configuration Properties/Linker/Show Progress in vs2005)
You could set the linker input to ignore the troubling library in the project properties, but this may or may not work.

Resources