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
Initial DDEX support : new pr #213
Initial DDEX support : new pr #213
Conversation
…d customization DDEX: Make copy/paste drag/drop work Npgsql: Rework NpgsqlConnectionStringBuilder to be more consistent Npgsql: Fix bug in NpgsqlMetaData.xml, wrong CompositeIdentifierSeparatorPattern Npgsql: Fix GetSchema for tables to return TABLE only
… change GetSchema() Npgsql: Revert NpgsqlConnectionStringBuilder.resx to using 2.0 assembly Npgsql: Fix typo Keywords.Host to Keywords.UserName
…TargetInvokeException when parsing invalid value Fix MinPoolSize/MaxPoolSize check Make NpgsqlConnectionBuilder keyword case insensitive Fix GetSchema SQL on Contraints and ConstraintColumns when using restriction
… to be compatible with postgresql 8.1
Hi @kenjiuno, I tested this pull request over the ngsql master branch. This works great ! My configuration : To make it work with my version of postgresql, i had to patch GetConstraints and GetConstraintColumns in npgsqlSchema.cs (use of "as" SQL keyword). Then, I installed NpgsqlDdexProvider.vsix and put npqsql.dll, Npgsql.EntityFramework.dll and Npgsql.EntityFrameworkLegacy.dll into the GAC. I hope this pull request will soon be integrated into the official npsql master branch. |
Correct GetConstraints and GetConstraintColumns : use of "as" keyword to...
Hi, @kenjiuno ! Do you think it would be possible to get it working with visual studio 2010? This is the only Pro version I have. Extensions don't work with express editions :( I'll check the 2013 evaluation option. Thanks in advance. |
I think it will work on earlier versions like VS2010. |
Hi, @kenjiuno ! Thanks for having a look at this!
Actually, I meant get it compilable in vs.net 2010 :) |
Hi, @kenjiuno ! I think this pr is almost ready to be merged. We even have a test done by @samy2 ! :) I have an observation. In your changes, I noticed that in the 2002 solution file, there is a signature change:
I think visual studio 2013 changed the vs 2012 project signature. Can you confirm that? If so, would it be possible to change the vs.net 2013 solution file instead of the 2012? Thanks in advance. |
Hi.
Yes, you are right. I will fix problems on VS2012/VS2013 versions, when my MSDN license is activated that I have purchased last week. It will take a week... also working on VS2010 version... |
Added License.rtf for NpgsqlDdexProvider vsix installer.
Hi. I have updated Vs2010/Vs2012/Vs2013 solutions for NpgsqlDdexProvider. |
NpgsqlDdexProvider build tipsVS2010 usersYou'll need VS2010 Professional or greater. SP0 users:
SP1 users:
If you need newer NpgsqlDdexProvider2010.pkgdef, create your own manually. Command example:
Output:
Check: How to create a pkgdef file for your Visual Studio Package http://blogs.msdn.com/b/dsvst/archive/2010/03/08/how-to-create-a-pkgdef-file-for-your-visual-studio-package.aspx VS2012 usersYou'll need VS2012 Professional or greater.
VS2013 usersYou'll need VS2013 Professional or greater.
|
That's excellent, @kenjiuno ! I'll copy your instructions to a new wiki page NpgsqlDdexProvider! I'll make some tests with visual studio 2010 and will give you my feedback! Thank you very much for your support and hard work. You rock! |
@franciscojunior Thanks. It'll be good information source! |
You are welcome! And thank you very much for all your help and support. I could get it to work in my visual studio 2010. But I only did some simple tests. I'll try some other tests and will let you know if I find any problems. I think we are ready to merge it! :) |
You are welcome! And thank you for your hard work!
Great! I can confirm that the binaries can be built on master branch on our build server: https://build.npgsql.org/viewLog.html?buildId=1354&tab=artifacts&buildTypeId=npgsql_all |
I also can confirm the packages are restored correctly when running on Xamarin Studio under Mono on OS X :) |
@kenjiuno, thanks for the screenshots! @franciscojunior, it's probably a good idea to have a small guide with these in the wiki? @franciscojunior, regarding your git question on removing and .gitignore. .gitignore only has an effect on untracked files. So it's perfectly OK to remove files from git and add them to .gitignore in the same commit. |
Agreed! I'll take care of that. We even have a wiki page about de where I'll add those images and more documentation.
Ahhhh , great! I didn't know that. I only had a feeling git would do the right thing though. :) I already merged the gitignore change too. |
Please visit Wiki for the latest info →→→ https://github.com/npgsql/npgsql/wiki/Visual-Studio-Design-Time-Support---DDEX-Provider VS2013Pro+NpgsqlDdexProvider+EF6 how toPrerequisites:
Build your Npgsql
You will obtain 3 important files:
Install assemblies into GAC
How to check installed assembly: gacutil /l Npgsql
Also: gacutil /l Mono.Security
Install NpgsqlDdexProvider.vsix
Edit machine.config files
machine.config will be found in following places:
Note: Don't forget to launch text editor with Run as Administrator. Prepare new project for testing
Install EntityFramework 6
Add Npgsql.dll and Npgsql.EntityFramework.dll manually
Note: Select [All Files (.)] to show your DLL files. Add references to Npgsql and Npgsql.EntityFramework
Npgsql.dll Add EF6 provider into App.config
Build once
New ADO.NET Entity Data Model
My sample ConnectionString:
Note: Don't forget to set PreloadReader to true.
Note: remember the text npgsql_tests_efModel at [Model Namespace].
Edit your program.csJust my sample code for npgsql_tests_ef database. About the name of "npgsql_tests_efEntities" class, check your [Model Namespace] entered above. Replace "Model" with "Entities", like it is "npgsql_tests_efModel".
|
Excellent, @kenjiuno !! I just added your tutorial to our wiki page: https://github.com/npgsql/Npgsql/wiki/Visual-Studio-Design-Time-Support---DDEX-Provider#vs2013pronpgsqlddexprovideref6-how-to |
Hi @franciscojunior |
Hi, @kenjiuno ! I thank you for all your hard work! |
I am sure this is probably common knowledge, but since I tripped over this for a day I wanted to save anyone else the grief. When performing the above steps using VS 2012, you will have to download and install Entity Framework 6 Tools for Visual Studio 2012 (http://www.microsoft.com/en-us/download/details.aspx?id=40762). Otherwise the "PostgreSQL Database" option will not show up in the "Change Data Source" dialog even though you can connect to the PostgreSQL server using Tools - Connect To Database menu command. |
Hi, @jubilee-scott Thanks for the information. I'll add your information as a trouble shooting note! And there is another note from user's report that rebuilding project helped to resolve the problem. Thanks! |
Can you just provide workable sample with EF6 and Npgsql. And please test on Mono as well. I would really helpful for everybody. I tried all advices possible many hours and nothing helps. |
Hi @abelondev Are you targeting .NET development on mono environment?
Ok, I want to know development situation like: IDE (SharpDevelop?, command line xbuild?), OS (Windows or Linux or etc) DDEX support is intended to be used with Microsoft Visual Studio 2012/2013/2015 Pro, with Microsoft .NET Framework 4.5 and later. |
I wondering what is the right sequence of installing new version of Npgsql. I had the 2,2 and when try to install new 3.0.5 things stop working. I cant create new project and older projects stop working, I guess something was overwritten? Im using Visual Studio 2013. I start here http://www.npgsql.org/install.html Downloading the package from NuGet.
Is there a simple way to test if this steps are already working? Now I want setup the Visual Destign-Time. The main page say try the "experiental installer" (check the typo) but the link is the same page so dont know where that installer is. When go to "manual installation" but this looks like an older version not sure if work with this new version. The first instructions say install in the GAC, when the previuos page say you only install Npgsql in the GAC in some cases so is confusing. Is using the Visual Design one of those cases where you need install in the GAC? So i go to https://github.com/npgsql/npgsql/releases After install I expect would be updated the machine_config but still the same.
This is where Im now. |
Hi @dropyghost Sorry for inconvenience, I will rewrite about Visual Studio Design-Time support.
It needs
Sorry for the problem... can you launch Visual Studio?
NpgsqlDdexProvider for Npgsql 3.x won't use GAC for now. But you can leave Npgsql GAC installed. NpgsqlDdexProvider for Npgsql 2.2 relies on GAC and machine.config modification. |
Thanks @kenjiuno In december I try 3.0.4 and got similar result, when saw didnt update the GAC I stop trying and because holiday were already near didnt worry to much in ask what was wrong. I see 3.0.4 already have a Setup_NpgsqlDdexProvider.exe so what steps should I follow to install it? When I try I follow the step in december I install something but couldnt find those steps now. Right now I have NpgsqlDdexProvider. version 3.0.3 installed 01/2015 |
Hi @dropyghost I have uploaded NpgsqlDdexProvider 3.0.5 at https://github.com/npgsql/npgsql/releases. Installing Npgsql 3.0.5 into your project (by NuGet) requires NpgsqlDdexProvider 3.0.5 in order to activate Visual Studio Design Time support.
Yes, the instructions are written across some topics like #718 (comment), sorry. I have just updated official doc. And it will be reliable source against recent NpgsqlDdexProvider releases. http://www.npgsql.org/doc/ddex |
I got until the save connection step. got this message. My versions looks ok Already rebuild solution. Update app.config Dont understand the part of "remove invariant" after add "invariant" I try creating a new project and reinstall the Entity Framework 6 from NuGet, but now say is using an older version |
Hi. @dropyghost Your setup and configuration seem to be ok. Please check the App.config, <?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup> If And, NpgsqlDdexProvider v3.0.5 equips light weight diagnostics feature. Please try [Check Npgsql project installation] menu item displayed on project's right click. |
@kenjiuno The link is down |
@dropyghost Hi, please try this link http://www.npgsql.org/doc/ddex |
@kenjiuno Documentation help link is down again :( |
@dropyghost sorry, new link is here http://www.npgsql.org/doc/3.0/ddex.html |
@kenjiuno it appears that the http://www.npgsql.org/doc/3.0/ddex.html link is down, and the http://www.npgsql.org/doc/ddex link is out of date (it still refers to a setup.exe file instead of vsix). |
Hi. This link is correct! But it is old one targeting NpgsqlDdexProvider 3.0 and below. I have new NpgsqlDdexProvider 3.1 tutorial expanded on this issue: |
Thanks, that did the trick. Not having it in the docs is not great, but maybe you could include a link to the updated instructions in the release notes? |
A new pull request.
Initial DDEX support code is inherited from #67 started by wwindcloud.
Note: I have manually rebased previous code. So, it may contain some problems...
DDEX tips:
Built tips:
(Edit 22 Jun, 2014)
You'll need gacutil for .NET runtime 4.0.
It will be found from one of following folders: