Having already followed the advice in the SAP website documentation and installed the developer edition of SQLAnywhere 17, and also having manually run the installer for VS integration that is provided by this installation I still could not see any providers other than the MSSQL ones while creating an EF6 model in Visual Studio 2017.
I found this https://www.nuget.org/packages/Sap.Data.SQLAnywhere.EF6/17.0.7.3399
Does anyone know where to find documentation on how to use it? Nuget provides no links to documentation and does not list a repo.
I installed the package without incident and it appears in project references but it does not appear in the provider list when I try to create an EF model.
A request to the package author provoked this response:
Hi Peter,
For information and documentation go to:
https://sqlanywhere-forum.sap.com/
or with SyBase
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01776.1604/doc/html/san1357754863708.html
Kind Regards, Erwin Bakels
While I appreciate the prompt response, the documentation link leads to information about doing another thing with a different version -- it's for code-first with EF4.3 while the library is for EF6 and I need database-first. To be fair to Erwin, I didn't explicitly tell him I wanted database-first, but it's still not a usable answer.
Further research suggests that changes in VS2017 prevent the installer from registering the provider correctly. This implies that until such time as SAP updates the installer to suit VS2017 there is no possibility of designer support for EF with SQL Anywhere.
I have confirmed with SAP support, that Sql Anywhere ADO.NET integration with Visual Studio is not supported in VS2017. You will have to use VS2015 or earlier.
SAP DocCommentXchange
I suggest you download the SQL Anywhere, developer edition. You will get all the files necessary to use EF.
Related
I have an Azure website configured to deploy from Visual Studio Online (hosted TFS). I'm evaluating the move from Database First model to Code First from Existing Database model.
Currently, As I check-in code to Visual Studio Online, it is deployed to Azure website. How to configure this process to run EF Migrations on the remote (live or test) Azure SQL database when I check-in code to Visual Studio Online.
AFAIK, you need to use the publish profile option to achieve this.
You have to download the publish profile settings file for the website, Import the file in Visual Studio, configure the Execute Code First migrations option and then specify the profile file path in Build Definition used for Continuous deployment.
You can check below post for reference.
http://blogs.msdn.com/b/webdev/archive/2014/04/09/ef-code-first-migrations-deployment-to-an-azure-cloud-service.aspx
I know it is a old post, but I could't find a good answer, so after figure out how to solve it I'm sharing a solution. I work in a project with DDD and N-tiers level. So, it means that the EF isn't in the same project as WebApi, therefore has no option to run migration during the publish wizard. To solve it I have ran update-database directly from package manager console.
Steps:
Acquire the ADO connection string (https://azure.microsoft.com/en-us/documentation/articles/sql-database-connectivity-issues/#connections-to-azure-sql-database)
From package manager console run: Update-database -StartUpProjectName NAMEPROJECTWITHEF -ConnectionString "connection string obtained from item one" -ConnectionProviderName "System.Data.SqlClient"
That's all!
Best Regards,
thiago
I deployed a ASP.NET MVC4 app with SQL Server CE database, but I'm getting
Sorry, an error occurred while processing your request
I am using VS2012 to publish this app to azure website. How can I solve this issue? Thanks.
To summarize and so an answer can get marked on this to help the next person that comes by.
When running into issues on azure-web-sites FTP is a handy debugging tool which enables you to:
Verify that the dll exists in your bin directory
Sometimes the .gitignore file blocks directories from being checked in
Verify that your web.config file has the proper version of the assembly configured
NuGet can help, but it's ultimately up to you to verify your dependencies
Here is a good article to follow on the subject: http://www.dotnetcurry.com/showarticle.aspx?ID=883
Unfortunately with VS 2013 Compact edition is not supported any more, so things are somewhat tricky.
For my current project i would prefer to update my database to the correct version on publish instead of first run via the App_Start.
It seems that there is support for manual upgrades via a commandline tool 'migrate.exe' which is supplied together with Entity Framework (5.0 rc2). But i can not find any information about how other people have combined this tool together with msdeploy to upgrade the database on publish instead of first run.
I have found the following page which explains how to use the migrate.exe tool:
http://blog.overridethis.com/blog/post/2012/03/13/Automating-EF-43x-Data-Migrations-in-your-Build.aspx
But this forces me to somehow 'know' the connectionstring information.
My optimal solution would be something like:
connectionstring is configured in setParameters.xml file for
replacement on publish
on publish after publish of codebase
migrate.exe gets called with correct connectionstring
It seems that what i search for is an 'entity framework MSDeploy provider' (see: http://blogs.msdn.com/b/adonet/archive/2012/01/12/ef-4-3-beta-1-released.aspx) but it seems that they abandoned that option some time ago
You have two options:
Configure Visual Studio Databases option in the Publish Profile; or
Configure your project properties on Package/Publish SQL Tab.
I didn't use any of them yet but I was researching because I'll have the exactly same scenario.
I have been playing around with the new StateMachine workflow that has been added to Windows Workflow as part of Platform Update 1 (see also). I now want to look at installing what I've created and therefore need to make sure my bootstrapper is up-to-date. In the future, I will be moving to WIX but right now, for the purposes of prototyping, I'm just using a regular Setup and Deployment project and its bootstrap support.
The list of standard pre-requisites does not include the PU1 as an option. Therefore, how can I add support for it?
Update
I found this answer on StackOverflow regarding custom prerequisites, which led me to this article on MSDN, which led me to creating my own pre-requisite. However, I got a new error about mismatched framework requirements. I suspect I need to pick apart the multi-targeting support and the existing .NET framework prerequisite package to see how to make a new prerequisite that will work correctly.
I've had a stab at creating my own bootstrapper packages for this. The results are here to download. Note that these are entirely untested and provided as-is - use at your own risk. However, feedback is welcome. Hopefully Microsoft will provide an official solution.
See How to detect if the .NET Framework Platform Update 1 is installed
is the Microsoft .NET Framework 4 Platform Update 1 - Runtime Update (KB2478063) what you are looking for? See here for the download.
Is there anyway i can check if .NET 2.0 is installed without any errors?
The answer here led me seriously astray... i found microsoft's own documentation: .NET Framework 2.0 Redistributable Package Reference: Detecting Installed .NET Framework 2.0
This documentation states:
The Setup.exe bootstrapper should use the following registry key to detect the .NET Framework version 2.0.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727
It then verifies the existence of the entry value:
Install (DWORD value = 1)
Note The same registry key will be checked for all versions of Dotnetfx.exe regardless of language. Therefore, if you want to display dialogs in a specific language you should use the corresponding version of Dotnetfx.exe. You do not need to make any changes to the settings.ini file when deciding which version of Dotnetfx.exe to use.
works like a charm... i realize this question and answer is 2 years old or more... but i got here from a search engine, and this is here for the next person who does the same... hope this helps -ck
This blog post describes two options for checking for a .NET installation, as well as retrieving versioning information.
The second option (using CorBindToRuntime) will fail if the .NET installation cannot be loaded. This might help you determine if there are any errors in the install - or at least whether the framework loads properly.
If you're using ClickOnce as your publishing method, you can click on the "Prerequisites" button in the "Publish" tab of the project's properties and check the box for ".Net Framework 2.0". This will make sure that framework is installed before the program installs, and can fetch and install the framework if necessary, too.
In regular VS Setup Projects, right-click on the setup project, chose View->Launch Conditions and add it as a condition. Visual Studio should have added one for you that matches the target platform of the project.