Visual Studio 2010 (Argument Exception) - exception

I get the following exception: 'Cannot find the method on the object instance' when I hover over a property of one of my classes in Visual Studio 2010.
Any ideas?

I changed the target platform for the project from x86 to AnyCPU and rebuilt. Some of the projects in the solution were set to target AnyCPU and some x86, initially. Hope this helps someone ...

Related

BIML - How to set .NET Framework version in a Script project using BIMLExpress

I'm creating script tasks in SSIS packages using the free BIMLExpress. Since we have different versions of .NET Framework installed in our environment I really need to be able to set the Framework version for the script project. Although I know how to change it manually, it would be very difficult to change it manually.
I have already tried looking for a solution and this answer suggests to use TargetFrameworkVersion property but I don't see that property at all, I've tried using it with no effect. I don't know if it only works with BimlStudio the paid version.
I'm using BIMLExpress 5.0.61915.0 with Visual Studio 2015.
Any help is greatly appreciated.
Thanks
I opened the generated .dtsx package and found that the TargetFrameworkVersion node placed inside of a separate PropertyGroup node. After I had moved it out to the first PropertyGroup of the same arrayElement node, then reopened my package in Visual Studio again, issue was gone! So you can write a script to move TargetFrameworkVersion node into the proper place for now.
Varigence support team told me that a public preview release is coming late next week which will include a fix for that.

Visual Studio 2012 Cannot Use Added Reference

I have a problem about using added references on VS2012.
I added System.Runtime.Caching in my projects references, but I can not call it from classes not event its namespace.
I've already tried closing and restarting computer. My .Net framework version is 4.5, not ClientProfile.
Did anybody get this problem before and is there a solution for it?

Why is keyhelp.ocx failing in my Visual Studio C++ application?

Using keyhelp.ocx to display popup HtmlHelp in a modern Visual Studio C++ application fails.
I get a COM exception with no sensible error code. Looking at the debug output, there seems to be an Access Violation behind the scenes.
Your executable is build with Data Execution Prevention enabled, via /NXCOMPAT. That's the default in Visual Studio.
keyhelp.ocx is built using ATL7, which is incompatible with DEP - see http://support.microsoft.com/kb/948468
You need to disable DEP (/NXCOMPAT:NO) for your executable or find an alternative to keyhelp.ocx (I don't know of one).
(Note that's it's possible to enforce DEP system-wide - your code will still fail on such machines.)

Why can't I see Microsoft.ReportViewer.WebForms version 10.0.0.0 in "Add Reference..." dialog?

I have a VS2008 Reporting Services project (database: SQL Server 2008 RC2). This project has been updated from VS2005/SQL2005.
I need to update the Report Viewer control to version 10.0.0.0. But when I install the Redistributable (http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=a941c6b2-64dd-4d03-9ca7-4017a0d164fd), it isn't added to the .NET-tab in the 'Add reference...' dialog!
I can see the Microsoft.ReportViewer 8.0.0.0 and Microsoft.ReportViewer 9.0.0.0 in the dialog, but no 10.0.0.0
I tried running uninstalls for everything ReportViewer related, and reinstalling the ReportViewer 10.0.0.0 control. But I still see both version 8 and 9 in the dialog, but no version 10!
Checking the GAC through Start->Run->Assembly I can see all three versions. I cannot remove 8 and 9 because they apparently are used by other programs...
This is driving me somewhat nuts...
What do I have to do to make this assembly available in the "Add Reference..." dialog in Visual Studio 2008??
Regards
Alex
OK, found a solution: Apparently VS2008 combined with ReportViewer2010 requires a little handy-work:
http://blogs.msdn.com/b/changliw/archive/2010/06/29/use-the-reportviewer-2010-control-in-visual-studio-2008-project.aspx
After I extracted the assembly DLLs from the GAC, I could add them to the 'Add reference...' dialog as described here:
http://www.csharp411.com/adding-assemblies-to-the-visual-studio-add-reference-dialog/
I hope this'll help another distressed soul! ;)
/Alex
Another possible cause of assemblies not showing in Add reference is the implicit target framework filtering. E.g.: Visual Studio 2010, .NET Fwk 4.0 target will filter assemblies targeting this particular fwk. To add Microsoft.ReportViewer.WebForms 10.0.0.0, I changed project's target fwk to 3.5, added the references and then switched back to 4.0.

Problems deploying .rdlc to server. (ie. ReportViewer with local report)

I would like to Publish my web application and view a report with the Microsoft ReportViewer. Everything works locally but when published I've encountered a troubling number of errors. Finally I seem to have come across one that I cannot fix.
So far I have solved the first 3 problems by...
Installing the Miscrosoft Report
Viewer Redistributable 2008
package on my server.
Changed my "rdlc" file to be "Content" and removed the rdlc
buildProvider in the web.config
file.
Configured the Managed Handler in IIS for the ReportViewer
Finally, the ReportViewer is at least visible and it "seems" to be trying to load the report. BUT Now I'm getting the following error:
[InvalidCastException: Unable to cast
object of type
'Microsoft.Reporting.WebForms.ReportHierarchy'
to type
'Microsoft.Reporting.WebForms.ReportHierarchy'.]
Microsoft.Reporting.WebForms.ReportDataOperation..ctor()
+253 Microsoft.Reporting.WebForms.HttpHandler.GetHandler()
+669 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext
context) +13
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+181 System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously)
+75
Oh great! Of course you can't cast an object to the type that it already is!!!! Does anybody know how to fix this one?
Thanks,
Justin
Well turns out when I did step 3.
"Configured the Managed Handler in IIS for the ReportViewer"
I registered the wrong one. The system had a v8.0 and a v9.0. 50-50 odds of picking the wrong one and I won.
Let this be a lesson to people who think dialog boxes don't need to be resizable... THEY ALWAYS SHOULD so you can see the content. The version number is not visible in the dropdown you are staring at 2 identical entries to the eye!!!
Anyways... if you encounter this problem check that you're version in Visual Studio matches your Managed Handler on the report server machine.
If you don't have Visual Studio upgraded to SP1, you need to upgrade as per this MSDN thread.
Do you have .Net 3.5 SP1 installed on the server?