Silverlight 4 + VS 2010 RC
Posted by Alex | Filed under All
Привет всем!
Вышла Visual Studio 2010 RC. И без Silverlight 4… Ждать, пока не выпустят Silverlight 4 Tools for VS 2010 RC?
Don’t Panic.
Способ запустить Silverlight 4 в Visual Studio 2010 RC есть!
Update: Translated to English version.
Итак, по порядку:
1. Скачиваем Silverlight 4 Tools For VS 2010
2. Запускаем установку
и видим сообщение о том, что у нас не установлена VS 2010 Beta 2.
3. Не жмем кнопку “Close”.
В это время идем на диск C:\{new guid} (например, C:\bfb0032a835647b79718f26ba81d3392) и ищем там файл SPInstaller.exe.
Папка может быть на любом диске, не только на диске C. Судя по моим наблюдениям, обычно папка на последнем диске (в том числе и внешнем).
Нашли файл, копируем всю папку в другое место, допустим, C:\Sl4ToolsRC
4. Открываем файл ParameterInfo.xml
в папке C:\SL4ToolsRC\ и комментируем строчки с 13 по 41 включительно. Комментируем <!– и –> (помним, что это XML). Сохраняем.
<!-- <BlockIf DisplayText="Visual Studio 2010 Beta 2 ..."> ... ... ... </BlockIf> -->
Уже отредактированный файл можно взять тут: http://sorokoletov.com/wp-content/uploads/2010/02/ParameterInfo.xml
5. Запускаем SPInstaller.exe
из той же папки и устанавливаем Silverlight 4 Tools.
6. Запускаем Regedit
Открываем следующие ключи
a. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\DesignerPlatforms\Silverlight]
b. [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\DesignerPlatforms\Silverlight]
Update 2: В 64-разрядной системе правильный путь – HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\DesignerPlatforms\Silverlight.
и меняем значение “SilverlightHost” на “v4.0″
7. Работаем с Silverlight 4!
P.S.: Ria Services
Если вам нужны RiaServices, то у меня осталось еще немного магии.
Скачиваем пропатченую Microsoft.RiaServices.Tools.dll и копируем ее в c:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\.
Далее, из GAC удаляем “оригинальную” версию и устанавливаем пропатченую версию. ([Win+R] -> assembly ->[Enter])
Перезапуск студии, и все должно заработать.
Tags: .NET, silverlight, silverlight 4, Tips, Visual Studio, vs 2010, советы


February 18th, 2010 at 6:50 am
Большое спасибо, за решение
February 18th, 2010 at 9:08 am
[...] wersji RC narzędzi dla Silverlight 4, a te przeznaczone dla Beta 2 nie chcą działać z nowym VS. Alex Sorokoletov znalazł jednak sposób na ominięcie tego problemu – można go przedstawić w kilku [...]
February 18th, 2010 at 12:58 pm
[...] Today I found a link which is written in a different version. I thought to share this thru my blog which may help the fellow developers (who are keeping a eye to my blog posts) to explore both simultaneously. Here is the original link of the post: http://sorokoletov.com/2010/02/hate-2-wait-silverlight-4-beta-2-vs-2010-rc/ [...]
February 18th, 2010 at 8:44 pm
Thank you. This helped me greatly!
February 19th, 2010 at 1:46 pm
My registry values are overwritten everytime I launch VS. Not sure if anybody else is running into this. I’m on Win7 x64.
February 20th, 2010 at 5:55 am
Christian, I had the same issue once.
Hm, these are the steps that helped me.
1. Close all VS 2010 (maybe, Blend too)
2. Open regedit and search for “SilverlightHost”
3. Change all found values to “v4.0″
4. Start VS and try running SL 4.0
Hope this will help you.
Alex.
February 20th, 2010 at 2:12 pm
Hi. I installed Silverlight 4 with VS 2010 successfully but when I try to compile my project I get the following error:
Error 3 Internal Compiler Error (0xc0000005 at address 62B616A1): likely culprit is ‘BEGIN’.
An internal error has occurred in the compiler. To work around this problem, try simplifying or changing the program near the locations listed below. Locations at the top of the list are closer to the point at which the internal error occurred. Errors such as this can be reported to Microsoft by using the /errorreport option.
Has anyone else encountered this? I am also using Win 7 64-bit.
February 20th, 2010 at 2:13 pm
Hi. I installed Silverlight 4 with VS 2010 successfully but when I try to compile my project I get the following error:
Error 3 Internal Compiler Error (0xc0000005 at address 62B616A1): likely culprit is ‘BEGIN’.
An internal error has occurred in the compiler. To work around this problem, try simplifying or changing the program near the locations listed below. Locations at the top of the list are closer to the point at which the internal error occurred. Errors such as this can be reported to Microsoft by using the /errorreport option.
The error, however, doesn’t point to any file, the columns of “File”, “Line” and “Column” in the VS error list are empty. Has anyone else encountered this? I am also using Win 7 64-bit.
February 20th, 2010 at 5:30 pm
Hi, Dimitar!
I didn’t received such error.
Can you send me the solution you are trying to compile?
February 21st, 2010 at 5:07 am
I am very sorry but I am not allowed to send you the solution. I am also unable to try and reproduce it with another project because last night I switched back to VS 2010 Beta 2. Anyway, this is not much of an issue for me because the beta works just fine, and besides, within a month there will be a newer version of SL 4 (at MIX) which will support the RC. My question was more out of curiosity than of any real need.
I’d like to apologize for posting twice last night, I had forgotten to add a note in the first comment. I also hope you’re comfortable with me writing in English instead of Russian, I figured that more people might benefit from the discussion this way.
February 21st, 2010 at 11:18 pm
Hi Alex
Every thing work OK but the business application dos not work
I get this error:
Error 1 The “CreateRiaClientFilesTask” task failed unexpectedly.
System.MissingMethodException: Method not found: ‘System.Collections.Generic.IEnumerable`1 Microsoft.Build.Evaluation.Project.GetItems(System.String)’.
at Microsoft.RiaServices.Tools.ProjectFileReader.LoadProjectReferences(String projectPath)
at Microsoft.RiaServices.Tools.LinkedServerProjectCache.LoadCacheFromProject()
at Microsoft.RiaServices.Tools.LinkedServerProjectCache.get_LinkedServerProjectsByProject()
at Microsoft.RiaServices.Tools.LinkedServerProjectCache.get_LinkedServerProjects()
at Microsoft.RiaServices.Tools.CreateRiaClientFilesTask.GetSharedFilesByProject()
at Microsoft.RiaServices.Tools.CreateRiaClientFilesTask.CopySharedFiles()
at Microsoft.RiaServices.Tools.CreateRiaClientFilesTask.ExecuteInternal()
at Microsoft.RiaServices.Tools.RiaClientFilesTask.Execute()
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) BusinessApplication9
February 22nd, 2010 at 8:02 am
Hi Sby!
I found solution for you.
The issue originates from the changes signature of some methods in Microsoft.Build.dll.
Using reflector/ildasm/ilasm/VS2010RC I made an assembly that works.
You can download it here: Microsoft.RiaServices.Tools.Patched.zip
Place it in “c:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\” folder and restart VS.
Have fun.
February 22nd, 2010 at 11:53 am
Thank you Alex
I replace the dll file but i get this error warning when i load the business project:
Warning 1 The “Microsoft.RiaServices.Tools.CreateRiaClientFilesTask” task could not be loaded from the assembly C:\Program Files (x86)\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\Microsoft.RiaServices.Tools.dll. Could not load file or assembly ‘Microsoft.RiaServices.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0×8013141A) Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. BusinessApplication11
Then when I run the program I get this error:
Error 1 The “CreateRiaClientFilesTask” task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is “public” and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the “C:\Windows\Microsoft.NET\Framework\v4.0.30128″ directory. BusinessApplication11
February 22nd, 2010 at 1:04 pm
Hi!
I had strong name validation disabled
So there are at least 2 ways.
1. SN -Vr *,*
2. Redownload the assembly (I signed it) and place it where it should be.
If this won’t help, write me directly at alex@[myblogdomainname].
February 22nd, 2010 at 9:11 pm
Thank you Alex
it is work now
February 23rd, 2010 at 2:35 am
hi alex, i’m running into the same problem as Sby.
but i got this error
Error 11 The “CleanRiaClientFilesTask” task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. RiaGenerator
February 23rd, 2010 at 1:49 pm
Fantastic!
Thank you very mach for help!
It realy usefull post.
February 23rd, 2010 at 4:24 pm
Большое вам спасибо за эту информацию, она была очень полезной как это позволило нам перейти к совершенно RC2 окружающей среды, в том числе Team Foundation Server.
(Извиняюсь за качество этой должности, я перевел его с английского помощью Google Translate).
February 23rd, 2010 at 5:53 pm
All pleasure is on my side
You can write in english, it’s not a problem.
February 23rd, 2010 at 9:09 pm
Hi alvin:
try to uninstall RIA only then reinstall it again then apply Alex solution.
February 23rd, 2010 at 9:30 pm
if anyone was unlucky enough to encounter this error below:
Error 15 The “CleanRiaClientFilesTask” task could not be instantiated from “C:\Program Files (x86)\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\Microsoft.RiaServices.Tools.dll”. Could not load file or assembly ‘file:///C:\Program Files (x86)\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\Microsoft.RiaServices.Tools.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0×80131515) RiaGenerator
Error 16 The “CleanRiaClientFilesTask” task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. RiaGenerator
THS SOLUTION is I added the Microsoft.RiaServices.Tools.dll to my GAC and it worked!
thanks for Alex’s advise on this.
February 26th, 2010 at 3:42 pm
Social comments and analytics for this post…
This post was mentioned on Twitter by ivorobiev: SL4 + VS2010 RC – http://bit.ly/975nA8...
February 27th, 2010 at 10:03 pm
[...] I was forwarded to this website which explains how to install the Silverlight 4 tools for Visual Studio 2010 Beta 2 onto Visual Studio 2010 RC http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http://sorokoletov.com/2010/... [...]
February 28th, 2010 at 1:21 pm
Привет
Все сделал по инструкции но ни один проект теперь не открывается. Пишет
error : The project file ‘D:\My Repository\company_projects\RapidCMS\Cms\Tests\RapidAppServices.Cms.Controls.Tests\RapidAppServices.Cms.Controls.Tests.csproj’ cannot be opened.
The project type is not supported by this installation.
February 28th, 2010 at 1:23 pm
Забыл сказать правда папки
DesignerPlatforms\Silverlight
в [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\] не было…
February 28th, 2010 at 1:32 pm
Константин, значит вы не все сделали по инструкции
, раз не было такой папки в реестре.
Можно попробовать еще раз. Удалить тулы + все что связано с сильверлайтом. Запустить студию. Закрыть ее. Все сделать по инструкции, перед изменением в реестре запустить и закрыть студию (возможно она там создает нужные ключи/записи) и потом продолжить.
Надеюсь, у вас получится.
March 1st, 2010 at 5:05 am
Хоть ты тресни на папки в DesignerPlatforms
в [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\] нету
Переустановил студию переустановил тулы запускал несколько раз как вы сказали и по инструкции все сделал. Результат тот же
Видимо опять возвращаться к глюкам бета 2…
March 1st, 2010 at 9:59 am
I have the same issue. If you have a 64bit s.o. the registry key is under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
Hope this help
March 1st, 2010 at 11:37 am
Thank you!
I’ve updated the post.
March 1st, 2010 at 12:50 pm
Далее, из GAC удаляем “оригинальную” версию и устанавливаем пропатченую версию. ([Win+R] -> assembly ->[Enter])
а как это сделать?
March 2nd, 2010 at 2:22 am
Руслан, можно использовать gacutil для работы с GAC-ом. Но проще нажать “Пуск->Выполнить” и туда ввести “assembly”.
Откроется GAC (расширение Explorer-а для работы с GAC-ом). Там находите нужную сборку и удаляете (клавишей Del). Потом новую версию сборки перетягиваете на это окошко и все.
March 3rd, 2010 at 10:40 pm
I had some problems with registerint the Ria patched assembly in the GAC, I’m not even using RIA Services for the project that I’m working at the moment so I decided to fix it differently.
notepad C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.Common.targets
And comment the last line to avoid importing it
<!– –>
I’m not sure why it’s trying to load the assembly in the first place if I’m not using RIA, to me that seems like a bug, but anyway, this HACK did the work for me.
March 4th, 2010 at 2:40 am
Thank you, Miguel!
That way was first I decided to go
What problems did you have with GAC and patched assembly?
March 4th, 2010 at 2:46 am
[...] You could completely use Silverlight 4 bits for VS 2010 Beta 2 with VS 2010 RC. Alex Sorokoletov has found how to install Silverlight 4 on VS 2010 RC. [...]
March 4th, 2010 at 3:20 am
I’m not sure what the problem was, I just took the quick route. It was a weir error, probably something wrong with my machine…
March 4th, 2010 at 3:26 am
I’ve other problem, I was using dynamic objects, it was working fine on Beta 2, but I got an issue at compile time:
Error 1 Missing compiler required member ‘Microsoft.CSharp.RuntimeBinder.Binder.Convert’ Common.Silverlight
Error 2 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? F:\MiguelBkp\personal\Engagements\segator\Loms\trunk\Common\Common\Ninject\ServiceProxyProvider.cs 37 24 Common.Silverlight
I checked and I’ve all the necessary references.
I just got rid of the usages of dynamic, but I would like to find a fix for this since I could see other scenarios for dynamic.
Has any of you found a problem?
Not a hurry, I’m happy to wait two weeks for a new release of the tools….
March 4th, 2010 at 4:13 am
I’m not aware of any of these errors.
I think, that problem is that API somehow was changed between B2 and RC (and thus I was patching the DLL), but as soon as it’s not important and it’s already March 3, best solution is wait.
March 11th, 2010 at 9:14 pm
[...] hacking untuk membuat VS 2010 RC dapat dipakai untuk mengembangkan Silverlight 4.0, silahkan cek disini atau jika anda menggunakan sistem operasi 64 bit seperti saya cek link ini. Jika dilihat apa yang [...]
May 4th, 2010 at 9:40 pm
Great work, Saved me from becoming bald.
June 9th, 2010 at 5:19 am
i have try…but i can’t work it…why…please help…
September 6th, 2010 at 3:58 am
I have installed Silverlight tools for my VS 2010 (Win7 / x64) and followed your steps but after installation i can’t open VS – get error on startup: The operation could not be completed. Please advice what can i do to solve this problem.
Thanks
September 6th, 2010 at 4:01 am
Repair and reinstall of VS doesn’t help
September 6th, 2010 at 10:32 am
Wind, I don’t know how to help you.
If you have RTM version of VS 2010, then try downloading latest tools and totally reinstall both VS and all silverlight-related stuff.
If you still have Beta1(Beta2) then please download VS 2010 RTM and try using RTM version.