In my project in Visual Studio 2010, I'm trying to add an Object Data Source which points to one to my business services, and to bind the datasource to a datagrid (or datalist, or whatever).
The problem is, after adding the ObjectDataSource from the toolbox, when I hit the "Configure Data Source" link to open the configuration wizard I get this error:
Error invoking Configure Data Source - Exception has been thrown by
the target of an invocation
This only happens in my project (i.e. if I create a blank project, ObjectDataSource configuration works properly).
Searching similar questions here in stackoverflow and on the internet I've read that this error is often related to a missing assembly. In fact, my project references several .dlls, and after checking time and again I just can't see what is missing. I also tried enhabling logging on Visual Studio, but it doesn't log anithing related to that error.
So: is there a way to get a more exhaustive error message from Visual Studio? Perhaps accessing the "inner exception" that fired the error, like you do when debugging your code?
And by the way: is there a way to configure "manually" ObjectDataSources without using the wizard?
Related
I'm getting an unexpected error when I (re)build the main project of my solution:
"Exception has been thrown by the target of an invocation." D:\MyApp\Db\Model.edmx
Db is a supporting project referenced by the main project. I created the .EDMX with a Model-First design.
I've looked at the detailed build output, but nothing is apparent as to what the cause and/or source of this is. There's no apparent way to find out what the exception actually is.
Nor does Google return anything for this error in the context of an .EDMX file.
How to go about finding out what's causing this, so I can fix it?
EDIT #1: I also get the error as a single MessageBox when I try to open the .EDMX for editing in Visual Studio. There's no hint about what the exception may be, nor where I might find more detail.
EDIT #2: I've been able to narrow it down to one of these four assemblies:
Db.dll (the project assembly)
EntityFramework.dll
EntityFramework.SqIServer.dll
EntityFramework.SqIServerCompact.dll
If I delete any one of the four in the project's \bin folder, I can open the .EDMX for editing.
Does anyone know how to trap the exception that's occurring, so I can go about fixing it?
I found the source of the exception—it's the SqlServerCe provider (or its configuration) that's installed by SQL Server CE & SQLite ToolBox. When I change the provider to SqlClient the exception disappears.
This is not impugn this excellent tool—there just appears to be a conflict between its latest version and VS2013.4.
EDIT:
I'm pleased to be able to retract my report; the problem didn't lie within the extension's scope.
The problem was that I hadn't installed the EF Tools for Visual Studio nor registered the DDEX provider. Details here.
The coded ui test builder is failed to generate code. i created the new test project and added the coded ui test file. i have chosed the option 1.Record options then the Test builder is running.
when i record the actions and trying to generate code
it is throwing error
"Object reference not set to an instance of an object"
Kindly help in this.
There is no simple answer to this from the very small amount of information in your question. Searching the web for the error message (eg searching for "coded ui Object reference not set to an instance of an object" and variations) provides many cases of people getting the same message plus, in some cases, their solutions.
One possible cause is that the UI Map file has been edited in a text editor, leaving XML that the Generate tool does not understand. Another possibility is that Visual Studio has become corrupted and should be reinstalled.
To narrow down the possibilities, determine whether the problem is specific to one project, to one computer or to one user. Try creating a new Coded UI test in a new Visual Studio solution to drive a simple application (eg the Windows Calculator) and see whether the generator works OK. Copy the failing project (and the whole solution) to another computer and see whether code can be generated there. Try logging in as a different user on the same computer and generating code for the same project and for different projects.
I am trying to setup a VS2010 project in VS2012 and have a problem with generating the service references. Somewhere it fails and Reference.cs becomes empty.
I looked at this:
WCF Service Reference generates an empty reference.cs due to DuplexBinding
But since the code is working for VS2010 I would prefer not to change anything.
I have tried this:
Sometimes adding a WCF Service Reference generates an empty reference.cs
Then it appears code in Reference.cs but some functions is missing so the project doesn´t work. Is there any known problems when doing this? I am totally stuck and need some ideas.
Thanks in advance!
/David
In the Add Service Reference dialog , click on 'Advanced', there uncheck the option 'Reuse reference types in this assembly'
I often encounter this problem, this workaround works most of the times.
I need to be able to add an existing project from one collection, to another project from another collection
But when i do this in visual studio (by clicking on Add->Existing Project then selecting the project which has already been checked into another collection and sits on my local drive)
I get the error message:
"The associated source control plug-in is not installed or could not be initialized. Common causes for this error include server unavailability and/or incorrect workspace mappings"
When i open the project that's in the different collection standalone, it works fine (and source control is mapped)
Not sure if this is possible, but it should be (seems a bit silly that it wouldn't be supported)
I am new to C# and Enterprise Library and I ran into some weird behavior in the IDE that I was able to resolve, but I thought that it was strange enough that I wanted to get the reaction of other developers and perhaps benefit others.
I wanted to start out by using the Data Access blocks. Using VS2010 and NuGet, NuGet downloaded the data Access DLLS and set the references. However, every time I trued to type the following:
using Microsoft.Practices.EnterpriseLibrary.Data;
and then save the project, the line simply disappeared and then I would get a compile error suggesting that I was missing a reference when I tried to enter the following statement:
Database db = DatabaseFactory.CreateDatabase();
It didn't help when I tried to bypass the "using" statement by fully qualifying the object.
Finally, I resolved the issue by compiling using the full 4.0 Framework instead of the Client Framework.
My Visual Studio Environment is a bit screwed up, but so far the issue seems isolated to SSIS and SSRS. Is this behavior that others have experienced or is it my computer? It sure seems like unusual behavior to me.
This is not standard VS behaviour. Do you have the VS Power Commands installed? That has an option to remove unused usings on save.
On the Tools menu choose Options and scroll the left window, looking for PowerCommands. If it's there click that entry and then ensure Remove and sort usings on save is unchecked.
If you don't have that plugin installed it will be another plugin doing this.