Running ADO.NET Data Services 1.5 CTP1 on Windows 7

Url: http://blogs.msdn.com/astoriateam/archive/2009/...

ADO.NET Data Services

I've been running Windows 7 as my primary machine now for a couple of months (first the Beta and now the RC).  I love the OS but there have been a couple of frameworks that didn't work right. The one that perplexes me the most is ADO.NET Data Services 1.5 CTP1.

When you are on a Windows 7 box, running the installer will complain about a problem and point you to the readme file.

The problem is that the "%ProgramFiles%/Reference Assemblies\Microsoft\Framework\v3.5" folder on Windows 7 is protected as a part of the operating system. Specifically only "Trusted Installer" has rights to update the files and the ADO.NET Data Services 1.5 installer doesn't have those rights so it doesn't update the crucial assembly. To address this, you have to take over ownership of the System.Data.Services.Design.dll assembly in that folder and give yourself full access to the file.  If you're not familiar with how to do this, i'll cover it further down in the blog post.

Once you have ownership of the assembly, re-run the installer (choose Repair if you already installed once with the error). You will get the same error again, but this time it replaced the crucial file.

In order to use the new bits, there are some small hoops to jump through, but Mike Flasko explains these really well in a video on the Astoria Team blog:

http://blogs.msdn.com/astoriateam/archive/2009/03/16/ado-net-data-services-v1-5-ctp1-now-available-for-download.aspx

Changing Ownership/Permissions to the Assembly

For the uninitiated, taking ownership and assigning permissions can be done like so:

Open the "%PROGFILES%/Reference Assemblies\Microsoft\Framework\v3.5" folder and find the assembly:

Force ANDS Image 1

Next, right-click the assembly and pick Properties to show the property window for the assembly.  On the Security tab, click on the "Advanced" button near the bottom:

Force Image 2

 Next, select the "Owner" tab and click on the "Edit" button:

Force Image 3

Next pick a new owner (probably your user name or your machine's Administrator group) and press OK:

Force Image 4

 Close all the dialogs and return to the Explorer window again (changing owner requries you re-open the property window).  Right-click the assembly again and pick "Properties.  In the Security Tab, click the "Edit" button to change permissions for you user name (or group):

Force Image 5

Lastly, in the Permissions dialog, click the "Full control" checkbox to give you full control of the assembly.

Force Image 6

You've now got the full permissions requried. 

 

Comments

Gravatar

MSFT_GlenF Monday, June 08, 2009

Shawn,

I'm sorry to hear that you've been having issues with Windows 7 and your data service. I know how frustrating it can be when your system isn't working properly. You might want to consult the Windows 7 forum at microsoft.com/springboard, there may some information about compatibility with your system, please keep in mind, if your system was stable before, and you have the Vista Drivers they will work with Windows 7, so you may want to revert to them.
Thanks,
Glen

Gravatar

Josh Einstein Tuesday, September 08, 2009

Man, there's a special place in programmer heaven reserved for people like you. Thanks a million.

Gravatar

Sherif Abou-Klila Saturday, September 19, 2009

It does not work
the exception still appeared
error 7001: Method not found: 'Void System.Data.Services.Design.EntityClassGener
ator.set_UseDataServiceCollection(Boolean)'.

Gravatar

Shawn Wildermuth Saturday, September 19, 2009

Try adding the new System.Data.Services.Design.dll to the GAC with GacUtil:

GacUtil /f /i System.Data.Services.Design.dll

Gravatar

Sherif Abou-Klila Sunday, September 20, 2009

It does not work
the exception still appeared
error 7001: Method not found: 'Void System.Data.Services.Design.EntityClassGener
ator.set_UseDataServiceCollection(Boolean)'.

Gravatar

Sherif Abou-Klila Sunday, September 20, 2009

Salaam
It works fine, I was wrong and you are right, Accept my apologize, You are really genius

Gravatar

Shawn Wildermuth Sunday, September 20, 2009

I am no genius but I am glad its working.

Gravatar

Jeff Evans Friday, September 25, 2009

If you are running Windows 7 64bit, you'll need to modify the permissions for the files under Program Files (x86) as well as Program Files. Also, I needed to modify ownership and permission on the v3.5 folder, which contains the Design.dll, as well as the dll itself. All told, I needed to do 4 steps:
Make Builtin\Administrators owner and grant that group Full Control of %ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5, %ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\v3.5, and the respective System.Data.Services.Design.dll files. I was able to figure this out using Process Monitor, available at http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Gravatar

Shawn Wildermuth Friday, September 25, 2009

Jeff,

I am running x64 and didn't have to change it in Program Files. Since VS08 doesn't have a 64 bit version I'd be surprised if it matters.

Gravatar

Jeff Evans Saturday, September 26, 2009

A few things: there is no %PROGFILES% environment variable, it's %ProgramFiles% and %ProgramFiles(x86)%, so your instructions are currently incorrect. I'm just trying to report what worked for me since I still had to spend quite a bit of time debugging the setup issue even after trying your fix, and since the Astoria team is linking to your blog instead of posting their own workaround instructions. Don't get me wrong, I'm very happy you've posted your fix, but it needs to be tweaked a bit. Secondly, .NET is not the same thing as VS, and while VS shell is a 32bit process, the .NET runtime comes in both 32bit and 64bit versions. On my machine, System.Data.Services.Design.dll was updated under both 32 and 64 bit Program Files directories. You do need to update the 64bit assemblies because DataSvcUtil.exe, which needs the design assembly, will run as a 64bit process on a 64bit OS.

Gravatar

Greg Tuesday, October 06, 2009

Just to add, I had to also perform the same steps as Jeff to get the installer to work (Windows 7, x64). Just altering the owner and perms on the dll itself wasn't enough, once I'd set it on the dir as well (in both program file locations) it worked.


Leave a Comment

*
*
*