.net-3.5

Could not load type '<typename>' from assembly '<assemblyname>'.

I decided to modify some code today, and encountered an error that doesn't make any sense to me. I have an interface called IDatabase and a class that inherits from it, called Database. I originally just put IDatabase in the same assembly as Database, but I didn't like this because it would prevent another person from creating a new ty...

Deploying an application that was unit tested with NUnit

I'm hopefully going to be deploying an application soon, and I find it strange that I would have to include nunit.framework.dll. After all, the user is not going to need to run unit tests! So the only thing I can think of is that there is some way of configuring my solution for Debug and Release, such that Debug references NUnit, while...

Does RelayCommand, or passing an Action<T>, behave differently when the method is from an interface?

I think this is my overall .NET inexperience speaking here, but I cannot figure out why this is happening to me. My Model ImportManys an interface called ISystemSetupEditor, and in this case I have a couple of parts that Export that interface. In the application's ViewModel, I have a method that creates a menu, and iterates over the IE...

Should I be using table adapters?

I am working on a personal project as a way of learning more about C# and .NET, specifically creating an application that utilises a database (MS SQL Server 2008 in my case). Whilst I appreciate there isn't always a definitive "right" way of doing things, given the choice between using an old technology/idea or a new one, I would rather...

Read evtx log files from win server 2008

I'm trying to read, from XP SP3, .evtx log files which are hosted on a windows 2008 server. I use EventLogQuery, EventLogInformation which are in Framework 3.5 System.Diagnostics.Eventing.Reader. However Visual Studio tells me this: "platform not supported exception". I don't get it as I have the Framework 3.5 installed already. I am ...

Best way to make winforms resizable?

I am working on a largish c# project with a lot of winforms that, even though you can resize the form, the elements in the form don't scale. How can I make the form elements (such as the datagridview, text area's, etc) scale when the user changes the size of the form. Nearly all the forms subclass from one specific form so if there's ...

Winforms application crashing on handheld device

I am developing a Winforms application using .Net 3.5. This application will run on desktop PCs as well as on handheld devices. I have bought "Tainell T500 POCKET PC" device. This device is running Windows XP. My compiled application works fine on PC, but gives crash on this handheld device. Error is: the application failed to intialize...

Alternative to WPF DataGrid using .NET 3.5 SP1

I am building a WPF Application using C# in VS 2008/.NET 3.5 SP1. I am trying to use the DataGrid control but when I create it in the XAML view the XML validator complains that the type is not found. Also, the IntelliSense list does not display an option for DataGrid. According to the docs, it seems this control is not supported until ...

Selecting metadata using Linq and Reflection

Hi, Here's the situation: I'm attempting to get a collection of all types in my assembly that implement a specific generic interface along with the generic type parameters used. I have managed to put together a Linq query to perform this but it seems awfully redunant. I've read up on let and joins but couldn't see how to I'd use them t...

File Does Not Exist Exception in VS2010

I've taken over the code of a website from someone else to finish off and have hit the issue that every time I load a page, I get a 'File Does Not Exist' exception caught in the Application_Error handler in my Global.asax file. I was curious what it was, so have tried creating brand new solutions with both a Web Site and Web Application...

Dictionary<string, List<int>> to WPF GridView

I would like to bind a Dictionary<string, List<int>> to a GridView in a ListView and I'm not having much luck. I've looked at this question: wpf-binding-dictionarystring-liststring-to-listview-listbox-how, and this question: dictionary-binding-to-listview But I'm not sure how to take their code and make it work for me. Here's what I'v...

Error msg: Failed to convert parameter value from a String to a Boolean.

I am getting an error msg when attempting to update a record from asp.net into a SQL database. The only boolean value being updated is: cmdAddUser.Parameters.Add(new SqlParameter("@Active", SqlDbType.Bit)); cmdAddUser.Parameters["@Active"].Value = Convert.ToBoolean(cbAddUserActiveUser.Checked); The datatype for @Active in the dat...

Cannot find method AsToken() in TweetSharp

I'm attempting to create a web application with TweetSharp that will connect to Twitter with OAuth. So far I am able to pass the consumer key and consumer secret to Twitter, have the user allow my web app access, then come back to my app passing me the oauth_token. Once I get back I am attempting to authenticate to Twitter based on the...

How to dynamically size the height and border of a ListView in View.Tile?

In a C# Winforms Application I have a ListView control. I am using the View.Tile mode and have run into two issues: The Tile truncates at a certain height (I haven't manually set anything). How do I get it to expand to fit the text? The Tile view doesn't show a border - how do I get the border to show? Or is the border issue relat...

Why isn't my parameterized query working?

I have a kinda complex query, basically I search the database in most fields for a string or strings. If it's multiple strings, the database field must match all parts of the strings. This is the base sql that the query is built on: SELECT wo.ID, {columns} FROM tblWorkOrder wo LEFT JOIN tblWorkOrderCategory wc ON wo.CategoryID ...

Scheduling tasks Advice? .Net, SQL Job?

I am creating a system where users can setup mailings to go out at specific times. Before I being I wanted to get some advice. First, is there already a .Net component that will handle scheduling jobs (either running another application or calling a URL) that will do what I am suggesting (Open Source would be cool)? If there isn’t, is it...

Scheduling tasks Advice? .Net, SQL Job?

Possible Duplicate: Scheduling tasks Advice? .Net, SQL Job? I am creating a system where users can setup mailings to go out at specific times. Before I being I wanted to get some advice. First, is there already a .Net component that will handle scheduling jobs (either running another application or calling a URL) that will do ...

loop one sequence and check againt other list

Hi, i have a namespace string like "Company.Product.Sub1.Sub2.IService". The Sub1/Sub2 can differ in their count, but normally their is one part which matches to a Dictionary with AssemblyFullname as key and path to it as value. Now ive written this code string fullName = interfaceCodeElement.FullName; var fullNamePart...

ASP.NET events symbol (yellow lightning bolt) missing

I created a new C# ASP.NET Web Application project in .NET 3.5 Then I dragged a button in my form. In the property window the events symbol (yellow lightning bolt) does not show. When I double click the box next to 'OnClientClick' in the properties Window no default event handler is created. When I double...

Static content caching

We are using IIS7 and dotnet 3.5 in our company to build different web applications used by our internal as well as external customers. It has been recommended that we start using static content caching to cache image and html files. My understanding is that in web.config file we can set the cachecontrolmaxage to specify the number of d...