.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Unable to Target 2.0 Framework in VS2010

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :.NET Framework

I have been using VS2005 for some time to build VB.NET applications using the 2.0 Framework.  I recently installed VS2010 on the same machine and am using it to build 4.0 Framework VB.NET applications.  All the apps work fine, and AddOrRemovePrograms shows Frameworks 1.1 through 4 installed, including the "Microsoft .NET Framework 4 Multi-Targeting Pack".  BUT, I am unable to use VS2010 to build applications to run on the 2.0 Framework, and (mis?) understand that should be do-able.  I opened an incident with MicrosoftConnect in August ("Framework Multi-Target Woes in VS2010") and sent off requested information twice, but have no response now for a month.  Any help/advice would be greatly appreciated.

Here is some detail:

The NewProject dialog only shows [.NET Framework 4].

If I try to open a 2005/2.0 project in 2010 it announces [The VB project "MyProject" is targeting ".NETFrameworkVersion=v2.0", which is not installed on this machine.  You must download this framework, as well as

View Complete Post

More Related Resource Links

VS2010 seems to target wrong framework

I have a simple website which is fine if I target .Net 4, but if I select the target framework as 3.5, it seems to incorrectly target .Net 2.0? Switching back and forth between 3.5 and 4.0 targets actually results in the pages (via showing System.Environment.Version.ToString()), and the Dev Webserver itself (via double-clicking on the system tray icon), reporting 4.0 when targetted for 4.0, and 2.0 when targetted at 3.5. All versions of .Net are installed on my machines, and I have reproduced this on 2 separate machines, one with VS2010 Pro, and the other with Visual Web Developer 2010 Express. Is this a bug, or am I missing something? Thanks for any help Ade

Windows Forms: Developing Compelling User Controls that Target Forms in the .NET Framework


In the beginning, writing controls meant dealing with Windows messages. Then came Visual Basic controls, which introduced methods, properties, and events. Later, ActiveX controls, which ran atop COM, became popular. While each innovation in control writing brought more flexibility, nothing has matched the versatility of the new .NET Windows Forms controls and Web Forms controls. This article, the first of a two-part series, introduces the reader to Windows Forms, beginning with their inheritance from one of the .NET CLR base classes, which makes control creation much faster than before. Control programming is illustrated through the development of a login control. The equally flexible Web Forms controls will be covered in Part 2.

David S. Platt

MSDN Magazine April 2002

.net framework unable to install

Okay I've had absolute ____ with this program and if another program I used didnt require it I wouldnt bother with it because its not worth this hassle. I finally get 3.5 to downloaded after 4 days  which I was getting the same error for as I am now with that and I have no idea how I fixed it. I am not computer savvy in the least, so please assume I know nothing. Anyway thats not good enough need 4.0 .The error is I download the setup for .net framework 4.0 it lingers at about 5-10% approx and stays there the temp log says "A connection with the server could not be established"  And there in lies the problem since I am able to post this I'm clearly able to connect to something but not the microsoft download server. The os is vista and yes before its said I am running it as administrator. Any help/ideas on this issue would be greatly appreciated.

Unable to Install .NET framework 2.0 SP1

Hi,   I have Win 7 Professtional Home Edition installed in my machine. Should i need to install .NET framework 2.0 SP1  (i.e earlier Win XP with SP2 was my OS and i installed .NET Framework2.0 SP1 to make my application work correctly). Thanks R.VasanthThanks Vasanth

Unable to debug Workflow in VS2010

I have a minimal sequential workflow created in Visual Studio 2010 which I cannot run in debug mode. I have created the workflow using the template in VS2010. When running the project in debug mode the breakpoint mark changes from full red circle to empty circle with exclamation mark. The tooltip message is: "The breakpoint will not currently be hit. No symbols have been loaded for this document" I am able to debug webparts deployed onto the same Sharepoint site using VS2010. Environment: Windows Server 2008 R2 Standard, Sharepoint 2010, Visual Studio 2010 Any suggestion would be greatly appreciated. Claudiu

popup error (unable to edit css) VS2010 .NET 4.0

Hi!I'm getting this strange error when i'm in SplitView or DesignView and i refresh view (i'm using VisualStudio 2010 .Net 4.0). This is happening only for this page and i have never seen anything like it, neither do i understand what is goin on.Any clues?

Opening vs2008 solution file in vs2010 - Framework targeting issue


Hey guys,

I am opening a vs2008 .sln file inside vs2010 - the conversion wizard shows up, and it goes through with no errors other than a pop up warning me that this solution needs .Net Framework 3.5 and that it is "not installed on this machine" - I chose to target it to .Net Framework 4.0 and to try to switch it later as an option.

I then bring up Properties - >Application -> Target Framework and in the dropdown, .Net Framework 3.5 is not listed - which is strange since in "Add or Remove Programs" I can see .Net Framework 3.5 is installed on my machine.

How can I get Framework 3.5 to show up in the dropdown so I can target this project to that framework?

Can't say I've ever done this, so I'm pretty sure I'm doing something wrong.


Update: I tried Method #1 here (http://blogs.msdn.com/b/robvi/archive/2004/02/17/75272.aspx) and I cannot see v3.5 - so where did it go? I'm confused why it is not in my registry but shows up in "Add or Remove Programs" list...


unable to connect to sqlserver while creating my account using VS2010 proffessional in WIN 7 home pr



I am getting  an error while  debug my application that unable to connect SQL server......The message is...


 at System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString)
   at System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString)
   at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation)
   at System.Web.Security.SqlRoleProvider.RoleExists(String roleName)
   at System.Web.Security.Roles.RoleExists(String roleName)
   at BusinessApplication4.Web.UserRegistrationService.CreateUser(RegistrationData user, String password) in C:\Users\Balakrishna\documents\visual studio 2010\Projects\BusinessApplication4\BusinessApplication4.Web\Services\UserRegistrationService.cs:line 51
   at CreateUser(DomainService , Object[] )
   at System.ServiceModel.DomainServices.Server.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters)
   at System.ServiceModel.DomainServices.Server.DomainService.Invoke(InvokeDescription invokeDescription, IEnumerable`1& validationErrors)
   at System.

Unable to connect to Database | ASP.NET Membership and Entity Framework


Ok, so this is my first Solution using the Entity Framework (EF). Here are my steps so far:

1) Created Database named: BSA with an owner of username/password (AspNetServicesUser/password)
2) Created Entity Data Model (EDM) in a separate project (contained within the same solution)
3) Created an ASP.NET Web Application with basic functionality (new project within the same solution)
4) Added Reference to the EDM in Web App and added Connection String to the EF
5) Decided I wanted ASP.NET Membership added to the Web App
6) Configured SQL Server for Application Services using aspnet_regsql.exe on BSA database

Now, I need to know: 
a) How do I create the connectionString for the Web.config file in the WebApp?

Errors I receive:

I get this error using the ASP.NET Configuration Tool under the "Security" Tab:

Login failed for user 'AspNetServicesUser'.

I get this error using the ASP.NET Configuration Tool under the "Provider" Tab --> Select a single provider for all site management data --> Test

Could not establish a connection to the database. 

If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database

Why is the WPF/XAML Designer in VS2010 unable to resolve my StaticResource references?

I have a WPF 3.5 app that was rendering properly in both the VS2008 Designer and at runtime. Since upgrading to VS2010, the Designer is no longer able to resolve any of my StaticResource references. Everything still renders correctly at runtime.

VS2010 setup using Framework 2.0 failed


When I tried to deploy the project using DotNet 2.0 using VS2010, it failed and no error message. I make sure all the Framework checkboxes have 2.0 checked. In the prerequisies window, I only checked the installer 3.1. In the Detected Dependencies, The Microsoft .NET Framework is 2.0. The development and target PCs are both XP - SP3. When I unpack the .msi file in the target PC and run the application, it crashed.

The only way to make that work is to use VS2005 to perform the setup. Of course, copying the files over to the target PC directory works. So, the VS2010 setup is unpacking something at the target that makes it crash. VS2010 fixed the code-behind fatal bugs and I cannot go back to VS2005 or VS2008. 

I also noticed that you need to install 3.5 before you can use 2.0 in VS2010... Anybody knows what is going on ?


unable to install Microsoft .NET framework 4.0 on windows server 2003 R2


HI there,

I was trying to install Microsoft .NET framework 4.0 on windows 2003 server R2 but an error is being thrown


OS Version = 5.2.3790, Platform 2, Service Pack 2
[10/25/2010, 5:50:41]OS Description = Win2K3R2 - x86 Datacenter Edition Service Pack 2

OS= Windows server 2003 R2

Package Name = Microsoft .NET Framework 4 Setup
[10/25/2010, 5:50:42]Package Version = 4.0.30319

Final Result: Installation failed with error code: (0x80070643), "Fatal error during installation. " (Elapsed time: 0 00:01:57).


Please help

Unable to install .Net Framework 4 - error 0x80070643



I tried to install .NET Framework 4 and it fails with error 0x80070643. I work with XP SP3 and I tried the verification and the cleanup tools but they did not work.

In the installation log file I get the following errors:


MSI (s) (C4:B8) [16:08:17:394]: Doing action: SchedSecureObjectsRollback
MSI (s) (C4:B8) [16:08:17:394]: Note: 1: 2205 2:  3: ActionText
Aktion beendet um 16:08:17: UnpublishFeatures. Rückgabewert 1.
MSI (s) (C4:50) [16:08:17:394]: Invoking remote custom action. DLL: C:\WINNT\Installer\MSI47.tmp, Entrypoint: SchedSecureObjectsRollback
Aktion gestartet um 16:08:17: SchedSecureObjectsRollback.
SchedSecureObjectsRollback:  Failed to store ACL rollback information with error 0x80070424 - continuing
SchedSecureObjectsRollback:  Failed to store ACL rollback information with error 0x80070424 - continuing


MSI (s) (C4:B8) [16:08:37:128]: Executing op: ComponentRegister(ComponentId={646CB2AC-7B38-445E-BA7C-E8557E09F331},KeyPath=02:\SYSTEM\CurrentControlSet\Services\EventLog\Application\.NET Runtime 4.0 Error Reporting\EventMessageFile,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)


10/27/10 16:08:42 DDSet_Status: Process ended: ReturnCode=0x00000000, Time=1.1620
10/27/10 16:08:42 DDSet_Status: ExecuteNgen: Launch HRESULT: 0, Pro

Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'


I have developed a WF4 solution on a 32-bit Windows Server 2008 environment running the .NET 4 framework and Visual Studio 2010 Ultimate. Because also BizTalk is installed on that box, those prerequisites are installed as well (like VS 2008).

Now I had a new 64 bit machine ready with Windows Server 2008 R2 and BizTalk 2010, so with only VS 2010 and all other BizTalk 2010 prerequisites.

I wanted to continue development on that Workflow Service on the new machine. Opening the solution in VS2010 was not a problem, but when I tried to open the XAMLX file on the new server, I ran into this error. Strange thing is that if I create a new Workflow Service in VS2010, it runs just fine.

Can anybody help me with this? The solutions presented in other discussions couldn't help me.

System.InvalidOperationException: Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'.  This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.

Server stack trace:
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse..ctor(IDesignTimeAssemblyLoader assemblyLoader, IVsDesignTimeAssemblyResolution projectAssemblyResolution, IVsSmartOpenScope dispenser)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse.GetUniverse(IDesignTimeAss

VS2010 Framework 4 Remoting with dataset with AllowDbNull=false gives TargetInvocationException


I have an app that uses Remoting to send a DataSet, all working OK under Framework 3.5. When I upgraded to Framework 4.0 I find that if the DataSet contains a DataTable with a DataColumn that has AllowDbNull=false, then a TargetInvocationException is thrown. If I set the TargetFramework on the assembly that contains the dataset back to 3.5 it works fine. Or if I set AllowDbNull=true, it also works fine. In my test app, the dataset contains just 1 table, with 1 column, no datarows, no keys.

The stack trace is as follows:

Server stack trace: 

   at System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Bina

Users unable to access IRM protected document in the target document library. Document being transfe



Iam using SharePoint 2007 on windows server 2003 R2 and RMS Server sp2.

A user (author) uploads a document in one (source) document library. Once uploaded it is rights managed by RMS. Another user (publisher) has to publish this document at another (target) document library. RMS is enabled on both these document libraries. whenever a user (reader) tries to read the published document from target document library, he gets an error which say's he doesn't have enough privileges. Reader has read permissions on all list items in the target document library. Here are the steps I follow.

1.       A user uploads a document into source document library. A publisher downloads this rights-managed document to publish it in target document library.
2.       SharePoint generates an issuance license (IL) for this document. The IL consists of:



.Net framework 3.5 unable to upgrade


I am running Windows 7 64 bit installed from an .iso mounted on a CD.  Since SP1 has been available, I have been unable to install it via Windows Update and directly downloading it from the website.

Recently I downloaded a program that required .Net 4.0 but was unable to install it as well.  I checked Windows Features (via Add/Remove Programs) and found .Net Framework 3.5.1 was turned off.  Clicking on it and both of its components (HTTP and non-HTTP) produces the error message: "An error has occurred.  Not all of the features were successfully changed."  Clicking on the .Net 3.5.1 alone will produce the same error.

Microsoft .Net Framework 3.5.1 does not appear in the Add/Remove Programs list, nor does any previous version of .Net Framework.

I used a .Net Framework Cleanup Tool to try and wipe 3.5.1 and start over.  I downloaded and successfully installed .Net 1.1.  .Net 2.0 reported that it could not be installed because a version of it was already installed in the OS.  .Net 3.0 reported that a newer version of the .Net framework was installed.  .Net 3.5's executable file opened but did not run.  After this, I used the .N

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend