.net

Determine .NET Framework version for dll

I have an old dll that was compiled against the .NET framework and deployed. I am not sure which version of the .NET framework it was compiled against. I am wondering how I can determine which version of the .NET framework this dll was compiled against? I cannot trust the source code because I believe it has been upgraded to Visual St...

PDFBox - Building the latest version for .NET using IKVM

Hi, I would like to build the latest version of PDFBox (http://pdfbox.apache.org/userguide/dot_net.html) for use within my .NET project. I have no experience with Java whatsoever but I am using the steps defined here: http://www.ikvm.net/userguide/tutorial.html I am using the following versions: - IKVM (0.42.0.6) - PDFBox (1.2.1) JAR...

writing t-sql version of .net codes by using sqlclr

hi, i have a lot of methods wrote with.net codes (c#) to using with linq queries. but i have problem to translating methods to t-sql. and i want to convert that to t-sql functions and using that with t-sql queries directly. how? ...

Create .NET assembly connector programmatically in SharePoint 2010

Does anybody know how to create a .NET assembly connector programmatically? I mean I want to generate an .NET assembly in runtime using Reflection.Emit and deploy it to SharePoint. I've found this great post: http://www.toddbaginski.com/blog/archive/2009/12/01/how-to-programmatically-create-a-sharepoint-2010-external-content-type.aspx ...

Func<> and Action<> can't be found

I have a delegate: delegate ResultType Caller<ResultType>(IPtxLogic logic); Here is a function: private ResultType ExecuteLogicMethod2<ResultType>(string sessionId, Caller<ResultType> action) where ResultType : IResult, new() {...} I want to replace the function signature with something like this: private ResultTy...

Is there a validation framework for .NET?

I'm building an .NET library and was wondering if there's any validation framework for that. My intention is just validate data-fields, you know, something like ASP.NET MVC validation attributes. There is any? Post-comments edit: Actually I am not using any framework like WPF or MVC. Just "plain object" library for data handling. I nee...

What is the best way to associate error messages with error codes in C#?

I have a piece of software written in C#.NET that communicates with a device via USB. When a problem occurs the device sets an error code which is read by my software in the form of an integer. I want to store error messages in my C# program that correlate with the specific firmware error codes. What is the best way to store these? I ha...

How do I suppress the Microsoft Error Report dialog when a child process crashes

I'm creating a process with the System.Diagnostics.Process object that sometimes crashes badly and Windows puts up the Send Error Report dialog. I have no control over the child process, but I'm already handling the case when it crashes, how do I prevent the dialog from poping up? Process p = new Process(); p.StartInfo.FileName = P...

asp .net mvc 3 formdata to view model mapping issue in case of nullable decimals

I am working in asp.net mvc application. During the initial load of my view, my controller returns a list which has some decimal? properties in it. Say one account has amount = 31.56 and other account has amount = 30.00. I am doing a lot of jquery stuff in my UI to bind these items do some computations using account.amount. There is a ...

Add a Google Contact using the .NET API 1.6.0.0

Hello, I had everything working great in 1.4.0.2 but updated to 1.6.0.0 and now I can't get the code to work for adding a contact to a Gmail account. Does anyone have sample .NET code or a link to an example of adding (creating) a contact entry and submitting it to Google (gmail)? Thank you. ...

WCF 4.0 Plain Text Password over http flag

Hi all, I read in a magazine not too long ago that there is a new flag in WCF 4.0 that allows you to use Plain Text Password over http without the need for SSL. (I know not a good idea) Regardless I wish to do this. Can anyone please point me in the direction of this Framework flag? Thanks in advance Brian. ...

How do I get Bin Path?

I need to the the bin path of the executing assembly. How do you get it? I have a folder Plugins in the Bin/Debug and I need to get the location ...

Writing to windows Event Log from within IE extension in Protected Mode - fails with Access Denied

In a BHO running within Internet Explorer on Windows 7 with Protected Mode On, I'm trying to write to the windows event log. I'm writing to a source that already exists, and it's in the Application Log so I don't see why this would be blocked. However, my call to System.Diagnostics.EventLog.WriteEntry("MySource", "Some message") fails wi...

Resgen a folder of .resources files to .resx?

How can I convert a folder of .resources files to .resx? I don't want to have to manually convert each file. ...

google desktop gadget registering a .net 2.0 dll

I am trying to create a gadget which uses a COM visible .net 2.0 dll. And I have been trying to make it work since last one week. Here are a few instructions that I found to make it work: http://markmail.org/message/jkbjk2kjbyyqozc6 But I am not able to understand the 3rd step. I have manually registered the dll classes in the regi...

How to get notification that a System.Threading.Tasks.Task has completed

I am currently replacing some home baked task functionality with a new implementation using the new System.Threading.Tasks functionality found in .net 4. I have a slight issue though, and although I can think of some solutions I would like some advice on which is generally the best way to do it, and if I am missing a trick somewhere. W...

Reflection PropertyInfo.GetValue from Collection

I have problem with reflection, dynamic invoking objects and reading collection values. In Referenced COM/Interop it would look like this: ICollection collection = (ICollection)sth.getCollection("parameter"); SomeObject obj = (SomeObject)collection["id='1'"]; //DB WHERE condition Unfortunetly i need to make it with reflection and dyna...

"Compatibility Pack" for backporting new .NET Framework features?

For various reasons I often find it desirable to write code that is compatible with .NET framework 2.0 or 3.5 or compatible with the .NET Compact Framework, but it is a problem that there are numerous "small" features in new .NET frameworks that are not available in the older frameworks or Compact Framework. For example, I find extensio...

COM visible dll as ActiveX Object

What is a COM visible .net 2.0 dll? (I have got one) Can I register this dll to the windows registry and use it as an ActiveXObject? For all the dll's registered in registry (HKCR) that have the child node InprocServer32, are accessible with the ProgID through ActiveX? [I am new to this] Thank you. ...

Common Markup Language for Address/Location

I'm looking for a standard markup language to transmit addresses (locations). I really need nothing more complicated than a list of addresses with some metadata, each requiring a name, address, state, phone, email, geocoordinates, and some other metadata. I don't want to have to parse these addresses into their constituent parts; I nee...