Solved: Unrecognized attribute ‘multipleSiteBindingsEnabled’. with .NET 4.0 Beta 2 and RC1.

by dsandor 15. February 2010 22:59

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'multipleSiteBindingsEnabled'. Note that attribute names are case-sensitive.
Source Error:

Line 105:  -->
Line 106:	<system.serviceModel>
Line 107:		<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
Line 108:  <services>
Line 109:			<service behaviorConfiguration="RFID.Server.WCF.Service1Behavior" 
name="RFID.Server.WCF.Service1">

Source File: C:\inetpub\web\services.test.\RFIDServer\web.config    Line: 107


Version Information: Microsoft .NET Framework Version:4.0.21006; ASP.NET Version:4.0.21006.1


Received the above error message when executing a WCF service on a test server.  The WCF service was compiled with .NET  4.0 RC and the test server only had .NET 4.0 Beta 2 installed.  The fix was easy.  Install .NET 4.0 RC full runtime on the test server and it worked.

Tags: , , , , ,

WCF | Visual Studio | Programming

Visual Studio 2010 RC - ObservableCollection<> is no longer available..

by dsandor 10. February 2010 19:25

From VS2010 Beta 2 to VS2010 RC we lost the ability to choose the data type ObservableCollection when configuring a service reference in a Silverlight application.  I am going to use this blog post to chronicle my discussion with Microsoft Go-Live support about this functionality change.

---

This may be a user education issue but the difference is significant and affects all of the production projects we currently have for Visual Studio 2010 Beta 2.

Today we upgraded 3 of our developer machines from Visual Studio 2010 Beta 2 to the Visual Studio 2010 RC.  In beta 2 when adding a Service Reference to a Silverlight 3 application we were given the option to choose a collection type of: System.Collections.ObjectModel.ObservableCollection in the Collection type drop down box.

clip_image002

Now in the release candidate we are no longer given the option to choose ObservableCollection.  Instead the dropdown offers ( Custom ), Array, Generic List (and another).  This presents us with several issues.  Existing Beta 2 code can no longer update service references without converting all return types from Array[] or List<> to an ObservableCollection. 

For Silverlight applications this is pretty major as we pass Generic Lists from our WCF service and heavily relied on the ability for the WCF Proxy class to deserialize the list into an ObservableCollection since these are bindable directly to our Silverlight grids.

Please advise.  Is this the way this will work in production or is it possible to patch the RC to provide this functionality once again.

Please feel free to call me tomorrow ( 2/10/2010 ) from 9AM EST to 8PM EST to discuss if you need more information.  It has been a while since I used Visual Studio 2008, but I am pretty sure that VS 2008 also provided the ObservableCollection collection type option when configuring a service reference.

To verify the Beta 2 vs. RC functionality difference I tested this against the same exact WCF service in both B2 and RC.

Tags: , , ,

Silverlight | Visual Studio | WCF

Translucent intellisense, when technology obscures your code ;)

by dsandor 7. February 2010 18:57

Blankenburg posted this on Friday.  Very cool thing and I never even knew about it.  Often times I am coding and am inserting a line of code above some existing code.  Many times the two are related and I need to see the line below but Intellisense covered it up.  Drat.  Press the left control key and it will get out of your way!

http://jeffblankenburg.com/2010/02/5th-of-diduary-did-you-know-you-can.aspx

 

Tags: , ,

Programming | Visual Studio

My Fix: Unknown build error, 'Cannot resolve dependency to assembly…

by dsandor 3. February 2010 18:19

image

This work around did not work for me.  I have a solution with several projects.  One of them is a WPF application that uses a Telerik third party control for the DataGrid.  Yesterday everything worked fine and this morning I came in to work and I get the error:

Error    3    Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Windows.Controls, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 12 Position 10.'     D:\Projects\RFID\Source\RFID\Client\RFID.Client.UI\View\IdleView.xaml    12    10    RFID.Client.UI

No checkouts or get latest was performed.  Restarted VS2010 did not work. 

In my case the work around was to add the Telerik.Windows.Controls assembly to the project references manually.  This should have been done by the drag/drop of the Telerik control to the design surface but it did not.  Other issues were reported on connect.microsoft.com explaining that assemblies with a 2nd degree of separation which are not normally required to be directly referenced are now needed in VS2010 for whatever reason.

Tags: , , ,

WPF | Visual Studio | Programming

Sweet, my VS 2010 B2 bug was fixed! Thanks VS Dev Team!

by dsandor 13. December 2009 03:31

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=505636

I am developing a silverlight application that is using a WCF service in my local solution. When I right click on the service reference in the SL application and choose update or if I click configure a duplicate Endpoint and Bindings for the service in my ServiceReferences.ClientConfig file:
     <endpoint address="http://localhost:15153/AdminService.svc" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IAdminService" contract="Proxy.AdminService.IAdminService"
        name="BasicHttpBinding_IAdminService" />
     <endpoint address="http://localhost:15153/AdminService.svc" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IAdminService1" contract="Proxy.AdminService.IAdminService"
        name="BasicHttpBinding_IAdminService1" />

Posted by Microsoft on 11/16/2009 at 2:52 PM

Dear Customer,
Thanks for reporting the issue.
This issue has been resolved in the latest version of Visual Studio 2010.
Thanks!

Tags:

Programming | Visual Studio | Silverlight

Solved: Custom tool warning: No endpoints compatible with Silverlight 3 were found.

by dsandor 12. December 2009 04:30

Warning    7    Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor.    D:\Projects\VMR\AzureVMR\VMRSilverlight\Service References\Proxy.DataService\Reference.svcmap    1    1    VMRSilverlight

Visual Studio 2010 Beta 2 has been giving me some funky errors lately.  The errors occur out of the blue.  Updating the service references work find for a few days and then seemingly at random I start to get the error above.

I found a solution that has been working for me.

Reconfigure the service reference:

image

Check the box “Reuse types in referenced assemblies” and choose “Reuse types in specified referenced assemblies”  Choose only the Model assemblies that you share between the Silverlight App and your WCF Service.  Hit OK and you should be good to go!

Tags:

Silverlight | Programming | Visual Studio | WCF

Solved: Can not (F5) run Silverlight 3 application from Blend 3 when the Silverlight application is created via Visual Studio 2010 Beta 2.

by dsandor 1. December 2009 19:30

The “Microsoft.WebApplication.Build.Tasks.GetSilverlightItemsFromProperty” task could not be loaded from the assembly … Microsoft.WebApplication.Build.Tasks.dll. … The assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.  Confirm that the <UsingTaskk> declaration is correct, and that the assembly and all its dependencies are available.

So I am sure there is a way to tweak / edit the solution files and .csproj files to fix this.  I had not gotten into much coding with the Silverlight side of this solution.  I had been working on the Model and WCF stuff (targeting .NET 4.0) so I encountered this when I started on some ViewModel code. 

Clearly this is because the WebApplication project created for the Silverlight 3 application is trying to build with the .NET 4.0 version of the MSBuild environment and Blend 3 wants the 3.5/2.0 version.

The simplest way to fix this is to create the Silverlight + Website project from Blend 3.  Then Add the projects to your VS 2010 B2 solution.  Then everything works.

image

 

image

Solved: .NET 4.0 cannot find assembly reference even though assembly is there and there are no exclamation marks on the reference in Visual Studio 2010.

by dsandor 8. November 2009 19:25

Error    1    The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)    c:\projects\DevSQL\…\Properties\AssemblyInfo.cs    4    7    SomeService

And warning:

Warning    8    The referenced assembly "c:\projects\DevSQL\…\AccountService\aaa.ServerCommon\bin\Debug\aaa.ServerCommon.dll" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client".    aaaService

 

image

So you are getting an error that typically points to an assembly reference not found.  Well just hang on a second before you go wild with debugging this.  First, check to make sure that there are no yellow exclamation marks on the assembly reference.  That would be a classic assembly not found problem.  If it is not there you may have another issue as discussed here.

Check to see if you have any warnings.

image

If you have warning messages like this you have a .NET 4.0 Profile settings error.  This is super easy to fix.  To give you some background on this, there are now more than one installation profile for .NET Runtime Libraries.  One is Full and one is Client.  The idea behind this is that if you are building a program that does not need to reference server side assemblies (System.Web.* as an example) then why install them?  You can now target a Full or Client profile.  The Client profiles will NOT have the server assemblies installed. 

To fix the problem, you need to target the full profile.  Simply Right click on your project and go to Properties.

image

Simply change the Target Framework drop down to .NET Framework 4 instead of .NET Framework 4 Client Profile and your code should compile.

Tags: , , , ,

Programming | Visual Studio

WPF: Cannot create instance of 'MainWindow' defined in assembly…

by dsandor 4. November 2009 05:21

Back on a WPF project for a day and received this while wiring up a ViewModel to the main WPF form. 

image

As with most XAML errors the problem is related to something else deeper in the code.  The inner .. inner exception shows the problem.  An XML data file is being deserialized and the file does not exist. 

So if you get a wierd error like this you probably have some bad code in a constructor for the View’s class or your ViewModel.

Breakpoint the View’s class declaration right before initialize component or at the constructor of your ViewModel class.

image

Tags: , , ,

Programming | WPF | Visual Studio

FIX: Visual Studio 2010 Beta 2 – The application cannot start.

by dsandor 30. October 2009 08:38

Everything was working great and my Visual Studio 2010 Beta 2 stopped starting.  I tried to reinstall VS2010B2 and that did not fix the problem.  I just got this stupid error:

theapplicationcannotstart-01

The application cannot start.

Some google searches turned up Weston Hutchins blog on the issue.  I tried several of the steps and noted this difference on my system.

He says that your personal settings files are stored here:

%USERPROFILE%\Documents\Visual Studio 2010\Settings

I actually found them in:

%USERPROFILE%\Documents\Visual Studio 10\Settings

Weird.  So I blew them away and restarted.  Got the same error.  So this tells me there is more to it than just the settings files.  There must be a settings file elsewhere that is the culprit.  So I moved on to the next step that actually worked for me.

Load the Visual Studio 2010 Beta 2 command prompt and type: devenv /resetuserdata

Viola!  This worked and I got the following screen:

image

After this I got the screen asking you how you want the development environment to be configured and it sets up the IDE in the default manner.  But everything is working great now!

Tags: , ,

Visual Studio | Programming | Installation Issues

Other Pages

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 David Sandor