.net-4.0

.NET 3.5 SP1 prerequisite, MS giving the clients 4.0

I have been using an MSI to install a WPF application using the .NET Framework 3.5 SP1. I have set up .NET 3.5 as a prerequisite in the MSI, and what has been happening for ages is that when the user does not have .NET 3.5 SP1, the MSI first has them download and install that before resuming the installation of my application. Since ye...

How to initialize a BigInteger in C#?

Hi, Can someone show me how to use the System.Numerics.BigInteger datatype? I tried using this as a reference - http://msdn.microsoft.com/en-us/library/system.numerics.biginteger%28VS.100%29.aspx But System.Numerics namespace isn't there on my computer. I have installed VS2010 Ultimate RC and i have .NET Framework 4.0. Can someone guid...

ASP.NET Charting Control no longer working with .NET 4

I've just upgraded to .NET 4 and my ASP.NET Chart Control no longer displays. For .NET 3.5, the HTML produced by the control used to look like this: <img id="20_Chart" src="/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0.png&amp;g=16eb7881335e47dcba16fdfd8339ba1a" alt="" style="height:300px;width:300px;border-width:0px;" /> ...

Where can I find a conclusive list of features in .net 4?

I've searched the web, and I can only find marketing material on .net 4. I would like a more detailed look at the new features from a developers point of view, not high level MS business marketing. Can someone point me in the right direction please. Thanks in advance. ...

visual j# not working in .net 4

I tried to convert a project that relies on the vjs runtime to vs2010, but it errors out when trying to run. It's giving the error that "Could not load file or assembly 'vjslib' or one of its dependencies. An attempt was made to load a program with an incorrect format." I reinstalled the vjs runtime, but it didn't seem to help. Is the...

Is asp.net MVC2 included in .net 4.0 framework?

I've installed .net 4 in the server. Now I don't know if I must install the MVC 2 for VS2008 or what because I got this error: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. ...

How to prevent MSBUILD from copying dependent GAC assemblies to bin

I have a msbuild task that builds my solution and I am migrating it from .net 3.5 to 4.0. I have some dependent DLLs that have Local Copy set to true. The 4.0 version of msbuild is not only copying the dependent DLL (which I want), it is also copying all dependent assemblies of that DLL from the 32 bit version of the GAC to my bin. Not o...

How do I reflect over the members of dynamic object?

I need to get a dictionary of properties and their values from an object declared with the dynamic keyword in .NET 4? It seems using reflection for this will not work. Example: dynamic s = new ExpandoObject(); s.Path = "/Home"; s.Name = "Home"; // How do I enumerate the Path and Name properties and get their values? IDictionary<strin...

.NET WF4: Should it be in the middle of everything?

I'm working on a new architecture for essentially an n-tier collaborative application (not enterprise-class, just a smallish project with potential to grow significantly) where I'm already trying to discipline myself to use IoC and, to some extent, TDD, and I'm wondering, in general terms, whether it is wiser to just hand-code workflow l...

.net 4.0 Adoption Rate

What is the adoption rate of .net 4.0? When will it be on Windows Update? I heard that it is smaller than 3.5, does that mean if I install .net 4.0, it will decrease the space used by the framework? If I make an application in 3.5 and it runs on a computer that has 4.0, will my application get some of the optimizations that 4.0 uses? ...

Issues integrating NCover with CC.NET, .NET framework 4.0 and MsTest

I'm implementing continuous integration with CruiseControl.NET, .NET 4.0, NCover and MsTest. On the build server I'm unable to run code coverage from the Ncover explorer or NCover console. When I run where vstesthost.exe from the Ncover console it returns the Visual Studio 9.0 path and does not seem to pick up .net framework 4.0. I've fo...

How come you cannot catch Code Contract exceptions?

System.Diagnostics.Contracts.ContractException is not accessiable in my test project. Note this code is purely myself messing around with my shiney new copy of Visual Studio, but I'd like to know what I'm doing wrong. I'm using the professional edition of VS, therefore I do not have static checking. In order to still use code contracts ...

How to model localized items

I'm currently designing a e-commerce solution. One of the primary requirements is for the store to support localized item details. The same store must be able to support multiple languages via the user's language selection and/or browser preference. I have two tables: Item (id, sku, price, ...) ItemDetails (item_id, language, ti...

Add Ellipsis to a Path in a WinForms Program without Win32 API call (revisited)

I was searching for a way to insert an ellipsis in a C# path, and found an answer here on stackoverflow: http://tinyurl.com/y6rmdfr Using the RTM versions of VS2010 and .Net 4.0, I was unable to get the suggested method to work. I searched the 'Net and found example code that uses the same method, but it failed in the same way. You can...

What is the best practice for secure connection to SQL Server 2008 from .net 4.0?

What is the best practice and most secure solution when connecting from a .NET 4.0 application to SQL Server in 2008? And how is this done in c# / vb? I thought of connecting from the application to the SQL Server's database over an encrypted connection and then by using something called Application Roles. Would this be a good approa...

Any hosts support asp.net 4.0 yet - Ideally want green hosting

I realise it's vry soon after launching, but I'm keen to develop website in 4.0, but obviously need a host. If there are none hosting 4.0 yet, any one aware of timescales. UK hosts needed. edit: I would like to use GREEN HOSTING, so anyone aware of UK host supporting .net 4.0 using green energy! Thanks ...

Enterprise Library 4.1 and .Net4

Hello I have a project that uses the Enterprise Library 4.1. When I target .net 4 and compile, I get an error that says I need to add a reference to System.ServiceModel version 3. My reference is to System.ServiceModel version 4. How can I tell Visual Studio 2010 to reference a .net3 assembly from a .net3 project? Or, does somebody ...

Tracking changes in Entity Framework 4.0 using POCO Dynamic Proxies across multiple data contexts.

I started messing with EF 4.0 because I am curious about the POCO possibilities... I wanted to simulate disconnected web environment and wrote the following code to simulate this: Save a test object in the database. Retrieve the test object Dispose of the DataContext associated with the test object I used to retrieve it Update the test...

Do you need both .net 3.5 and 4.0 installed or just .net 4?

to run both 3.5 and 4.0 web apps? ...

Does the .NET Framework 4.0 intaller installs .NET 3.5 as well?

.NET 4.0 is meant to run side-by-side with 3.5 and won't run 3.5 apps, which is making me worried about having to instruct my users to download .NET 3.5 instead of just "the latest version". I've read in a blog that the 4.0 installer will install 3.5 as well if it's not already installed but I can't test it right now, did anyone try th...