This blog post, Changes of WCF RIA Services for Visual Studio 2010, is very handy when upgrading code using previous versions of WCF Ria Service.
I started getting this error when deploying my custom SharePoint Server 2010 site definition, which was little weird, because it was working and then it suddenly stopped. After trying a few different things, I closed down Visual Studio 2010, and left it at that, while attending to some other business. When I came back and reopened the solution, everything worked fine again, and after a “little” investigation, it turned out to be because I had deleted and recreated the site collection, which was used for debugging.
I started getting this error message, after installing SP1 for Visual Studio 2010.
The “CreateRiaClientFilesTask” task failed unexpectedly.
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
It turns out that some sort of locking is the culprit, so simply shut down the ASP.NET Development Server and rebuild your solution.
—————————— UPDATE ———————————–
If the ASP.NET Development Server hasn’t been started yet, or you are using IIS, you need to close down VS 2010, and restart it.
I guess the subject line pretty much says it all… Anyway, I do a lot of documentation on Visual Studio, ASP.NET, Visual Basic, and Visual C#, and I therefore often need to copy code I have created from my development VMs to my Word documents. Now, for blocks of code that is indented in the Code editor in Visual Studio, it is handy to be able to remove the indentation before copying it, but the default set up for Visual Basic prevents this. Turns out it is because it automatically formats the text when you unindent.
Fear not, just click Options on the Tools menu, to open the Options dialog box. In the Options dialog box, in the left pane, expand Text Editor, expand Basic, and then click VB Specific. Clear the Pretty listing (reformatting) of code check box, and click OK.
If you don’t want to turn it back on, you can always resort to using CTRL+K, D to format the open document.
I got this error when upgrading from RC1 of Visual Studio 2010 and the .NET Framework 4.0 RC1, to the RTM version of both. The fix is simple, very simple; simple add the outlined markup to your web.config file.
<configuration> ... <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Security, Version=18.104.22.168, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Data.Entity, Version=22.214.171.124, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.Entity.Design, Version=126.96.36.199, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> </assemblies> <buildProviders> <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" /> </buildProviders> </compilation> </system.web> </configuration>
Finally, we can all get our hands on the Visual Studio 2010 and .NET Framework 4 Release Candidate. Download from here, http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx
I get this error, The operation could not be completed, quite frequently in Visual Studio 2010 Beta 2 and to my knowledge, I only get it when double-clicking a code file, .cs or .vb, in Solution Explorer. If I try again, the same thing happens, the Microsoft Visual Studio dialog box, pops up with the error message. Short of closing down Visual Studio, which does work, simply open the associated markup file, if you’re trying to open a code-behind file, right-click anywhere in the Text editor containing the markup, and then click View Code. Alternatively, right-click the code file in Solution Explorer, and then click Open. Rather simple, but you don’t always think about it, when you get set in your ways of doing things. 😉
Lately, I’ve been getting this quite a lot on my development VM. I have a SQL Server 2008 Express Edition database in the App_Code folder of my Web site, and sometimes when I get the error, closing down the browser and running the Web site again from within Visual Studio solves it. However, more often than not, that doesn’t do it. Stopping the ASP.NET Development Server doesn’t fix it either nor does closing down and reopening Visual Studio.
What does the trick, is to clear the items in this folder, %LOCALAPPDATA%\Microsoft\Microsoft SQL Server Data\SQLEXPRESS. If the files are locked, you’ll need to reboot your machine, and delete the files before you run your Web site again.
You can also open up the Task Manager and delete all sqlservr.exe processes, but I think a reboot is better…
— UPDATE —
It turns out that you don’t have to delete the files, but simply kill the sqlservr.exe process that runs under your account (the logged in identity). Much easier…
By default, Visual Studio and Visual Web Developer Express, randomly or dynamically assigns a TCP port to a new Web Site or Web Application when you create them. This is just fine when you’re testing functionality, but not so when you need to test access etc. after moving it to IIS. Now, here is how you change it:
Web Site Project (WSP)
- Right-click the Web site in Solution Explorer.
- Press F4 to open the Properties window, if not already open.
- In the Properties window, click False in the Use dynamic ports list.
- In the Port number box, type the desired port number.
Web Application project (WAP)
- Right-click the project in Solution Explorer, and then click Properties.
- In the Properties dialog box, click the Web tab.
- On the Web tab, click the Specific port option, and type the port number in the box next to the Specific port option.
- Close the Options dialog box.
Visual Studio 2010 and the .NET Framework will launch on April 12, 2010… 🙂