-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding OData Connected Service to the project failed: Value cannot be null #64
Comments
We have updated our NuGet packages to the latest versions available, but the problem stays the same:
|
VS 2017 15.3.3 same problem: |
I ran this project on debug and I found that it pulls null at Line 31 on V3CodeGenDescriptor.cs. The path is referring to the WCF install location. |
I had to dig through my Windows registry to find out what the issue was. So, CodeGeneratorUtils accesses the Windows Registry to try to figure out where the install location of WCF Services is. On my machine, neither the |
@nla-brandonjames we're trying to consolidate all the issues people are coming across on this project. After you modified the registry, have you come across new issues? |
@AlanWong-MS I did not modify the registry, I just read it to try and figure out what value project was trying to access. I don't have any more issues to report. |
@nla-brandonjames ah, I reread what you wrote and I see what you did. Okay, thanks for the feedback! This will help us determine the scope of our issues. |
My five cents to discussion. We had the same issue in a shared project on TFS. A colleague of mine got this error but I didn't. The difference between us is that he has Visual Studio installed in italian. I don't now if it matters. But it is just an additional info. |
I've update a WebAPI project with OData from VS2013 to VS2017, installed the OData Connected Services and encountered the same issue. Tried installing VS2017 on a newly built machine and had the same problem. As mentioned by @nla-brandonjames the WCF Data Services registry settings are missing along with the installation files. Had a look at a VM with VS2015 and the files and registry entries are intact. After installing VS2015 on the project machine, I could generate the reference file. Remove VS2015 and the registry and installation files were removed and back to the issue. I'm not sure where VS2017 puts the WCF files, as that option was checked in the installation. @AlanWong-MS, you should try having an installation of VS2017 only and a WebAPI project with OData and try adding the connected service. |
I have the same problem. I tried to debug it using another instance of visual studio. I got this error:
And, Right after it I got:
@nla-brandonjames Can you please explain how did you solve the problem in your case? How did you hard-coded InstallLocation into the code? Did you compile the source by yourself? I |
I found a temporary solution: I my case I found Now it's working fine. But this problem can be solved easily by changing the source code: In V3CodeGenDescriptor.cs#L32 just needs to be checked that if And this will fix the bug. |
@mohsenno1 can you please open a PR with your proposed fix? |
Summarizing issue for bookkeeping: As others have been seeing, the exact method that takes a look at the registry is
|
Merged related PR at: 196d8b8 |
Please let us know or re-open this if you have further questions. |
There hasn't been a new package yet. I'll be working on the next release. It should be within a couple of weeks. |
@AlanWong-MS Is it possible to include the fix to this very critical problem? |
Is there a novice workaround to this? It seems it needs a registry key that is missing on our installations. Can anybody point out which key and if the value must be a meaningful value (path to an executable) or that the value could also be an empty string? I have no right to ask for any action on your part but waiting a couple of weeks ain't an option for me and the other option is reinstalling my visual studio 2013 setup. |
@LiQuick I have mentioned to a workaround in my previous comments. First install Microsoft WCF Toolkit from the link bellow: and then go to the registery, find the following key:
and rename "VS 2010 Tooling" to "VS 2014 Tooling" It's better to create a duplicate of that key and then rename the duplicate instead of changing the original one. |
Thank you Mohsenno1 for the help. I got it to work but instead of having "VS 2010 Tooling" I had a "reg folder" with the name "5.6". I exported this folder and changed 5.6 into "VS 2014 Tooling" and it worked (I guess). |
@siberianguy, we'd love to review and accept any PRs that address that feature gap, but at this time, we don't have resources allocated to the item. |
I encountered this issue to and @mohsenno1's workaround didn't produce the desired registry key. I had to do the same as @LiQuick. Everyone with a clean install of VS who tries to use an ODATA service is going to get this so I really think it should be prioritized higher but in the meantime, saving the below to a .reg file and importing should work for most people: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft WCF Data Services] [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft WCF Data Services\VS 2014 Tooling] |
@mohsenno1 , thank you for the fix, this saved me today! This is indeed a problem that should be fixed asap! |
@AlanWong-MS You remove a feature from VS2017 and then ship it's replacement broken, I would assume this is top priority at MS, I see VS updates come out every other week and this is still broken. |
My colleague encountered the same issue on VS 2017. @mohsenno1 and @LiQuick mentioned a workaround but that will result using an old version of WCF Data Services Tool. It seems that the required WCF Data Services Tool ( So what I do is, I send the files and registry to my colleagues who have the issue and had VS 2015 uninstalled, and the problem is solved. |
Hi, |
I'm having the same issue with OData V3 and using VS2017, getting the following error: The only workaround that works for me is Opening VS2015 to Add or Update OData Service References. Please fix this! |
Good day to everyone. Buy a new computer, and install Visual Studio 2017 Community, wanting to use the connected services, I found the same problem, in an old computer I have VS2015 and VS2017, and it works well, the temporary solution is to copy the folder WCF Data Services that it is found in Program Files (x86) to the computer that has the problem. And add the right keys to the registry and with that everything works perfectly. I share the folder with everything you need, for people who do not have such material, as try to find the installer of the version 5.6.4 RTM and I was impossible to get, apparently installed with VS2015. Greetings from Mexico |
The whole new connected service tool is flawed. Connecting to a password protected odata service is also not possible. |
After that I was unable to find the key If you are in this situation you need to create it. I hope can help somebody! |
We are converting a VS2015 solution using WCF Data Services to VS2017. The web service itself seems to be working fine, but the database model has evolved and we now need to update our OData service reference.
Visual Studio displays an error message, warning us that "The specified OData API cannot be updated because OData APIs are now only supported with Connected Services". We downloaded the connected services extensions available here : https://marketplace.visualstudio.com/items?itemName=laylaliu.ODataConnectedService.
But we can't seem to generate a new OData client for any projet, even a new simple console application. The "OData Connected Service" wizard invariably fails in the "Finish" step with this error message: "Adding OData Connected Service to the project failed: Value cannot be null. Parameter name: path1".
OData Connected Service version: 0.3.0
Visual Studio version: 2017 Enterprise 15.3.3
.NET Framework version: 4.6.1
WCF Data Services versions (server-side):
Here is the $metadata for our service:
$metadata.zip
The text was updated successfully, but these errors were encountered: