Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@kenjiuno
Copy link
Contributor

Hi.

This is pr for #598 DDEX VSIX for VS2015 retail.

  • Non gac install. Npgsq.dll is installed with NpgsqlDdexProvider vsix package.
  • The optional setup process allows you to define <DbProviderFactories> at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe.config instead of machine.config.
  • EFv6 EDM wizard (edmx file) should work.

Known problem(s):

  • DataSet designer doesn't work well for now. It loses Password property and it fails to connect.

@kenjiuno
Copy link
Contributor Author

(Check official doc http://www.npgsql.org/doc/ddex/)

NpgsqlDdexProvider v3.0.4 Setup insturction:

  • Setup_NpgsqlDdexProvider.exe
  • Run VisualStudio, [TOOL]→[Setup Npgsql DbProviderFactories...]
  • At C#/VB.NET project, try [Check Npgsql project installation] in project's popup menu on Solution Explorer.

NpgsqlDdexProvider v3.0.0-3.0.3 Setup insturction:

NpgsqlDdexProvider will ask you to install on first use.
confirm1

Exit the VisualStudio.
And then, run VisualStudio as an Administrator!

Select Setup NpgsqlDdexProvider... in TOOLS menu.
Note: It should be done per VisualStudio. It isn't needed for each solution and project.
setup1

It asks permission to modify your devenv.exe.config:
setup2

This will add the Npgsql in devenv.exe.config:

  <system.data>
    <DbProviderFactories>
      ...
      <remove invariant="Npgsql" />
      <add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
    </DbProviderFactories>
  </system.data>

Setup succeeded.
setup3

Restart the Visual Studio once.

New! Dec 22, 2015
NpgsqlDdexProvider 3.0.4 provides [Check Npgsql project installation] in project's context menu.

checknpgsqlprojectinstallation

Click a button to start the check!

test1

It will suggest them if you need one or more actions:

test3

[Test and result] shows test cases and their results:

test2

You will be able to generate models with Entity Data Model wizard after restarting Visual Studio 2015.
edm1

References:

@kenjiuno
Copy link
Contributor Author

My private build is available at https://github.com/kenjiuno/Npgsql/releases/tag/NpgsqlDdexProvider

@roji
Copy link
Member

roji commented Aug 17, 2015

Thanks @kenjiuno, I'll try to review this ASAP!

@roji
Copy link
Member

roji commented Aug 24, 2015

@kenjiuno, I don't know have enough time at the moment to dive into VSIX - you can go ahead and merge this when you feel it's OK. Some comments:

  • It seems weird to have a menu option for setting up the DDEX provider, can't this automatically be part of the installation instead? Any reason to make this optional?
  • Do you want to fix the DataSet designer before merging? Or is the VSIX usable enough to be published?
  • Before merging to develop can you please squash all commits into one with git rebase?
  • After merging to develop we should also cherry-pick this to 3.0.2 (or a later minor version)
  • I'll take care of building the VSIX on the build server, and then we can start publishing it on the Visual Studio Gallery too.

@kenjiuno
Copy link
Contributor Author

Hi. @roji Thanks for checking this!

It seems weird to have a menu option for setting up the DDEX provider, can't this automatically be part of the installation instead? Any reason to make this optional?

Yes, it is ideal to process required file edits on vsix installation.

The problem is that installation is done without running Visual Studio shell (devenv.exe).
It will take much time to find out better way for now.

Do you want to fix the DataSet designer before merging? Or is the VSIX usable enough to be published?

I think many developers are interested in use of Entity Framework (EDM wizard).

I'll postpone the fix if it will take more than 1 week.

Before merging to develop can you please squash all commits into one with git rebase?

Ok, I'll do it periodically.

@kenjiuno kenjiuno mentioned this pull request Sep 29, 2015
@kenjiuno kenjiuno force-pushed the 598-non-gac branch 2 times, most recently from 64fbbe0 to 277827f Compare September 30, 2015 12:32
@kenjiuno
Copy link
Contributor Author

Ok, new pushed commit contains Npgsql-ddex.sln and src/NpgsqlDdexProvider/Build-all-ddex.csproj for building ddex 2012,2013 and 2015 versions at once.

@kenjiuno
Copy link
Contributor Author

kenjiuno commented Oct 1, 2015

We need to tweak Version attribute in 3 source.extension.vsixmanifest files dynamically:
<Identity Id="958b9481-2712-4670-9a62-8fe65e5beea7" Version="3.0.0" Language="en-US" Publisher="Npgsql" />

  • Vs2012/source.extension.vsixmanifest
  • Vs2013/source.extension.vsixmanifest
  • Vs2015/source.extension.vsixmanifest

@kenjiuno
Copy link
Contributor Author

kenjiuno commented Oct 2, 2015

Some ideas'd be done:

  • Add2doc: Run visual studio as admin in order to successful Setup NpgsqlDdexProvider.
  • Fix: use "runas" verb for Setup NpgsqlDdexProvider (elevation of Administrators privileges).
  • Add2doc: How many times should run Setup NpgsqlDdexProvider
  • Fix: Show "done nothing" if setup is already done on Setup NpgsqlDdexProvider
  • Add2doc: T-shooting: "Unable to add data connection, Keyword not supported: compatible. Parameter name: keyword."
  • Model First
  • Add2doc: Model first
  • Add2doc: supported/unsupported operations/features on EF facet. EF Power Tools

@kenjiuno
Copy link
Contributor Author

It mentions 3 distribution types of VS's package: VSIX/MSI/VSI

Visual Studio Extension Deployment
https://msdn.microsoft.com/library/vstudio/dd393694(v=vs.100).aspx

We'll need to combine VSIX and MSI(or NSIS) in order to support EDM wizard, even if we don't use GAC since Npgsql 3.0.

  • VSIX package installs: NpgsqlDdexProvider, Npgsql, and EntityFramework5.Npgsql.
  • MSI (or NSIS) install: VSIX package, modify devenv.exe.config, and deploy SSDLToPgSQL.tt (Edited)

Single VSIX package distribution is fantastic, and may be possible, if we can prepare tooling like: Direct Code-first code-generator for PostgreSQL with Npgsql support! (without EDMX and EDM wizard)

@roji
Copy link
Member

roji commented Oct 24, 2015

@kenjiuno, the last commit you added to this PR, 6276f4470dc8c202a67b5cc71115f7aebd06da25, contains some non-ASCII characters in the commit message ("build fix 2012 2015"). In UTF8 the problematic character is encoded as 0xe3 0x80 0x80, which I think is a Japanese whitespace character. This caused some trouble with the build server database, and I think in general it's probably better to stick to ASCII in commit messages...

Can you please rewrite the commit message?

@kenjiuno
Copy link
Contributor Author

Hi.

Can you please rewrite the commit message?

Yes, I have confirmed that it is non ASCII white space.
Sorry, I didn't notice it. It looks like we type 2 ASCII space characters.
I have pushed fixed comment!

Tweak NpgsqlDdexProvider2012 configuration names.
(cherry picked from commit 658b5f9631d232c49c992b7315d8189c40e8641f)
(cherry picked from commit 766556ee2fb2d8a28fde38d03e9fa3bb5e4e1d29)
(cherry picked from commit 193df08155e9fb5f2338b534abd09b79ac06d568)

Conflicts:
	packages/repositories.config
@hypocentrum
Copy link

Hi Kenji,
Thanks for the great work.

I have followed the instructions but I cannot choose the Npsql data provider from ADO.Net Entity Model Wizard.
I'm currently using VS2013 Update 4 and installed EntityFramework6.Npgsql straight from nuget.
Is there something I might be missing?

@kenjiuno
Copy link
Contributor Author

kenjiuno commented Nov 3, 2015

Hi.

Thanks for trying NpgsqlDdexProvider!

I'll check about your issue.

2015-11-03 12:44 GMT+09:00 hypocentrum notifications@github.com:

Hi Kenji,
Thanks for the great work.

I have followed the instructions but I cannot choose the Npsql data
provider from ADO.Net Entity Model Wizard.
I'm currently using VS2013 Update 4 and installed EntityFramework6.Npgsql
straight from nugget.
Is there something I might be missing?


Reply to this email directly or view it on GitHub
#718 (comment).

@kenjiuno
Copy link
Contributor Author

kenjiuno commented Nov 4, 2015

I'm currently using VS2013 Update 4 and installed EntityFramework6.Npgsql straight from nuget.

Please confirm if both (EntityFramework6.Npgsql and NpgsqlDdexProvider) versions are 3.0.3?

Please build your project once. It will copy files to OutputPath. And you will be able to use PostgreSQL data connection.

@hypocentrum
Copy link

Thanks!! After I built the project it worked flawlessly.

@kenjiuno
Copy link
Contributor Author

I'll close this pr, setups are merged: 3.0.x for 82275da, (3.1.x for 79f5d1e)

Please open new issue if you encounter any problems...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.