I have a web app and a winforms app - both of them display reports via the standard web/winforms ReportViewer controls. (Using VS2010 / .Net 4.0 btw).
I also have a shared library that returns the ReportParameter objects for the reports being generated. I ran into little issue with the ReportParameter's being returned though:
The Winforms ReportViewer uses ReportParameter from Microsoft.Reporting.WinForms namespace.
The WebForms ReportViewer uses ReportParameter from Microsoft.Reporting.WebForms namespace.
Is there a generic ReportParameter class I can use to share reportparameters from web vs winforms? Or is there a built-in utility to easily translate between the two?
I know it is old, but I had the same question today so figured I would provide an answer.
I couldn't find anything definitive, so I pulled out ye-old-reflector... and I chose to use Microsoft.ReportViewer.WebForms because it referenced a subset of the assmblies referenced by Microsoft.ReportViewer.WinForms.
Specifically...
WebForms referenced:
Microsoft.ReportViewer.Common
mscorlib
System
System.Configuration (Not Referenced by WinForms)
System.Data
System.Drawing
System.Web
System.Web.Services
System.XML
WinForms referenced:
Microsoft.ReportViewer.Common
mscorlib
System
System.Data
System.Drawing
System.Web
System.Web.Services
System.Windows.Forms (Not referenced by WebForms)
System.XML
If I am going to be pulling in an assembly reference to System.Web regardless, I might as well avoid the System.Windows.Forms reference impo.
EDIT
Also, as for passing around ReportParameter across references, you will pretty much have to re-map them accordingly. Either via wrapper, or some Mapping extension method would do the trick.
Related
How to add standard .Net references such as
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
When trying
using (System.Drawing.Image I)
I get the error
Severity Description File Line
Error The type name 'Image' could not be found in the namespace 'System.Drawing'. This type has been forwarded to assembly 'System.Drawing.Common, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcdxxxxx' Consider adding a reference to that assembly.
When going into reference VS 2018 wants me to point to the DLL File.
Its really frustrating. This is a Asp.NetCore MVC web based project.
System.Drawing is incompatible with .NET Core, because it uses Windows-specific APIs not available in .NET Core. Microsoft has since released System.Drawing.Common, which is a NuGet package that provides a similar API to the old System.Drawing but uses cross-platform APIs. To make this truly a drop-in replacement, the System.Drawing namespace now forwards to System.Drawing.Common, so older code could work without change.
Long and short, you need to add the System.Drawing.Common NuGet package to your project.
I am new to F# and I apologize if this question was asked before, but I could not find it.
I am trying to create an F# DLL in NetStandard 2.0 and I would like to use HttpClient
open System.Net.Http does not work: The namespace 'Net' is not defined.
I looked and could not find any solutions specific to F# and HttpClient in the context of NetStandard 2.0
The name space System.Net.Http is there on the C# side using in NetStandard 2.0. No problem there.
On F#, intellisense does not show the .Http namespace when expanding System.Net
Any ideas would be greatly appreciated.
TIA,
David
That namespace is an assembly that is not automatically referenced as part of .NET, so it needs to be referenced for each project that uses it. It's possible that the C# project already had the reference, or your tooling added it automatically when you tried to open the namespace. So you just need to add a reference to the DLL "System.Net.Http" in your F# project.
I am working on Image processing and i have made an application in c# using EmguCV wrapper version 2.4 beta and now i want to covert it in to vb.Net so which version would be compatible for vb.Net i want to use these dll files.
Imports Emgu.CV.UI
Imports Emgu.CV
Imports Emgu.CV.Structure
Imports Emgu.CV.CvEnum
Help me to resolve this problem how can i use EmguCV in vb.Net..
Use the same version of visual studio that you used to create your c# project (or newer). Target the same version of the .net framework in each (or newer). Reference the same EnguCV dlls in each.
Functionally the languages are almost identical, however if your c# app uses unsafe code blocks then stay with c# as they're not supported in vb.net
I need to Finish a project written a couple of years ago on windows form vb.net on VS2008. I pass the project to VS2010. I have AutoCAD 2013 on my computer. What is the Wright way to add the references for AutoCAD and where are they ?
I basically need to read data from a table from an autocad drawing grammatically using vb
On the reference for the VS2008 project I can see some references such as
ACCTRLLib
Autodesk
AutoCAD.Interop
Autodesk.AutoCAD.Interop.Common
AxACCTRLLib
And when calling the namespace I see some like :
Imports System
Imports System.IO
Imports System.Math
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports System.Threading.Thread
Imports Autodesk.AutoCAD.Interop
Imports Microsoft.SqlServer.Server
Imports System.Text.RegularExpressions
Imports Autodesk.AutoCAD.Interop.Common
I read some of the AutoCAD manuals as the one link below but it didn't help much. On this manual they also mention something between the .NET API and the Interop of AutoCAD.
AutoCAD .NET Developer's Guide
Please Any Help with these .. Thanks in Advance
On the newer versions of AutoCAD, the Interop libraries are at the acad.exe folder, look for
Autodesk.AutoCAD.Interop.dll
Autodesk.AutoCAD.Interop.Common.dll
I am moving a vb.net application from Oracle Lite to Sybase SQL anywhere. I have made several code changes but have a specific error that is driving me mad. All of this is in Visual Studio 2005.
When I compile the code it gives me the following error "Reference required to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.Common.DbCommand'. Add one to your project".
I have both System and System.Data added for the WindowsCE platform and these worked fine under the Oracle Lite system. I have removed and re-added these files to the project. Nothing seems to be working to get rid of the error.
The offending code is legion, one example is:
Public con As ULConnection
Any thoughts here would be very helpful!
A public Key Token of b77a5c561934e089 indicates a full framework, not compact framework, assembly. Something you're using (likely the version of SQL Anywhere you have) was built referencing the desktop System.Data assembly, which is not going to work on a device. You need assemblies built specifically targeting the Compact Framework.