For my current project, we're using some CLR 2 based mixed mode assemblies.
In order to use these from within a .NET 4 targetted assembly, I know you have to add useLegacyV2RuntimeActivationPolicy=true to the <startup> element within app.config.
I understand that this changes the activation policy, causing these mixed-mode assemblies t...
I'm struggling with my first simple "hello world" RX application. I'm using VS2010 RC, plus the latest RX download.
The following is the simple console app;
class Program
{
static void Main(string[] args)
{
var channel = new MessageChannel()
.Where(m => m.process)
.Su...
I'm currently working on creating an Assembly with virtual properties. The examples on MSDN are only creating normal properties. How do I create a class inside an assembly which has virtual properties?
I would like to be able to generate a class like this:
public class ClassA
{
public virtual int Id { get; set; }
...
I wondered if anyone knows if Microsoft is planning to do a Dynamic Data framework for Silverlight like they’ve got for ASP.NET? Does a non Microsoft framework like this already exist?
...
ParallelEnumerable has a static member AsParallel. If I have an IEnumerable<T> and want to use Parallel.ForEach does that imply that I should always be using AsParallel?
e.g.
Are both of these correct (everything else being equal)?
without AsParallel:
List<string> list = new List<string>();
Parallel.ForEach<string>(GetFileList().Where...
I have an application which is being developed in VS2010, and makes use of the Castle-Windsor IoC, through a configuration file.
One of the components I am registering, also developed in VS2010, references a .net 2.0 component (LeadTools), so recompiling the 2.0 project isn't an option. When the wrapping component's registration is done...
I tried to compile a project dependent on the Log4Net logging framework using .NET 4.0 RC and ran into some problems.
Out of the box (just changing the target to .NET 4.0), it no longer works, a security exception is thrown.
Inheritance security rules violated while overriding member: 'log4net.Util.ReadOnlyPropertiesDictionary.GetObjec...
I'm using the Self-Tracking Entities codegen option in EF4 (VS2010 RC), and I'm trying to use Dynamic Data to build a quick-and-dirty website for editing. The Entities, Data Context, and EDMX files are all in separate assemblies, and this model works well when I call everything in code. But when I try to use it with Dynamic Data, right o...
Can you recommend some resources (web or book) providing an introduction to Windows Workflow Foundation in .NET 4? Basic introduction is what I need at the moment but I would also very appreciate advanced-level materials. Thanks!
...
In .NET 4, loading .NET 2 mixed-mode assemblies requires setting useLegacyV2RuntimeActivationPolicy="true" in the startup element of the app.config file for the application project.
How can I set this (and is it necessary) for a test project? I am getting some very odd behavior in the testing host, but only for tests that use CLR 2 mix...
My company is tossing around the idea of using the Entity Framework when it comes out with .NET 4. We are currently a VB.NET shop, but have some interest in switching to C#.
Is there any major arguments for or against such a move?
Does EF with C# hold any advantages in performance, coding ease, etc over VB.NET?
Thanks for your thought...
I've heard a bunch of podcasts recently about the TPL in .NET 4.0. Most of them describe background activities like downloading images or doing a computation, using tasks so that the work doesn't interfere with a GUI thread.
Most of the code I work on has more of a multiple-producer / single-consumer flavor, where work items from multi...
I have seen samples using Word 9.0 object library. But I have Office 2010 Beta and .NET 4.0 in VS2010. Any tips on how to go with the new Word Dlls?
So I just wanted to get the functionality of RTF to TEXT with .NET3.5 or later.
...
I have a task to perform an HttpWebRequest using
Task<WebResponse>.Factory.FromAsync(req.BeginGetRespone, req.EndGetResponse)
which can obviously fail with a WebException. To the caller I want to return a Task<HttpResult> where HttpResult is a helper type to encapsulate the response (or not). In this case a 4xx or 5xx response is not...
Previous questions have asked if it is possible to turn compiled delegates into expression trees, for example:
http://stackoverflow.com/questions/767733/converting-a-net-funct-to-a-net-expressionfunct
The sane answers at the time were:
It's possible, but very hard and there's no standard library solution.
Use Reflector!
But fortu...
Some strange behavior with the C# 4.0 co- and contravariance support:
using System;
class Program {
static void Foo(object x) { }
static void Main() {
Action<string> action = _ => { };
// C# 3.5 supports static co- and contravariant method groups
// conversions to delegates types, so this is perfectly legal:
action...
I have a pretty simple console project with an entity model (containing two simple entities), two handmade POCOs and a handmade Context class. The program fires a simple query against the DB and everything including LazyLoading works fine.
The problem: As soon as i add another Entity data model (even if i add an empty one), the calls t...
Here's what I have:
Custom-made C# CMS where the content is stored in a database in XML, and XSLT is applied to format the page content.
Here's my task:
Design new front-end site and upgrade to ASP.NET 4.0 (via ASP.NET 2.0 first) in the process. Accessibility and standards compliance are factors.
Here's my problem:
Comprehensi...
I'm committed to EF as I'm currently using it in a project but I also find it a major pain and learning curve as there are some things it does not do well that I would expect it to.
Does anyone know if the following issues are any easier in EF 4.0?
Foreign key access, sometimes you want the foreign key from a table rather than an enti...
Possible Duplicate:
Can I use .NET 4.0 beta in Visual Studio 2008?
Hot can I use visual studio 2008 IDE with .net framework 4?
...