JetBrains Rider enable-migrations for ASP.NET MVC on mac - sql-server

I have JetBrains Rider 2018.3 on macOS Mojave. I created an ASP.NET MVC project, installed entity framework 6.2. I added the connection string to web.config. But, I don't know how to configure app.config. I want to enable-migrations for this project to connect to the Microsoft SQL Server. I googled it and found this link Entity Framework Support in Rider. However, I am not able to find Tools | Entity Framework | Initial setup. I was wondering if you could help me to solve this issue.

After I have posted the question I read the link again. I noticed I missed the point project context menu. I right clicked on project name and I found Tools.

When you're done adding the EntityFramework nuget package, just right-click on the project, and use the Entity Framework options available. See my screenshot below.

Related

WCF Data Service reference in WPF Project in VS2017

I'm having issues adding a service reference to my WPF project in VS2017. The service itself is a WCF Data Service using EntityFramework (EntityFrameworkDataService). In VS2013 that I was using before, I didn't have any issues adding services to my WPF project. I upgraded to VS2017 last month, and recently made some changes to the WCF service and needed to refresh the reference in my WPF project. I couldn't seem to get it to refresh so I deleted the reference and started trying to re-add the reference and now I'm greeted with this error message:
The specified OData API cannot be added because OData APIs are now
only supported with Connected Services.
For more information, please see:
https://aka.ms/odatavsclientguidance
That provided link does not have any info regarding VS2017 setups. It recommends to use the 'OData Connected Service' extension but that extension does not support VS2017 (tried it but got a "not compatible" message). I also found the 'VS WCF Connected Service' extension for VS2017, but it doesn't appear to support WPF projects (or atleast I couldn't figure it out).
Has anyone ran into this issue with adding a WCF Data Service reference to a WPF project? Any other suggestions that I could try?
I typically generate my clients via the DataSvcUtil.exe which is part of the .net framework
e.g.
"%windir%\Microsoft.NET\Framework\v4.0.30319\DataSvcUtil.exe" /dataservicecollection /version:2.0 /language:CSharp /out:c:\temp\DataService.cs /uri:http://localhost:16584/DataService/
The MSDN docs:
https://msdn.microsoft.com/en-us/library/ee383989(v=vs.110).aspx
As TGRA so eloquently stated, the best bet for VS2017 at time of writing is to use the dataserviceutil.exe. To make things simpler for myself I do the following:
In File Explorer, navigate to the datasvcutil.exe using the path as follows:
%windir%\Microsoft.NET\{{YOUR_PROCESSOR_ARCHITECTURE}}\{{YOUR_FRAMEWORKVERSION}}
Hold shift and right-click. Select Open Commandwindow here (or command prompt if you prefer.
Now execute a datasvcutil.exe command like so for C#: datasvcutil /language:Csharp /out:{{PATH_TO_PROJECT}}/{{SERVICE_NAME}}.cs /uri:{{URL_TO_SERVICE}}.svc
OR execute a datasvcutil.exe command like so for Visual Basic: datasvcutil /language:VB /out:{{PATH_TO_PROJECT}}/{{SERVICE_NAME}}.VB /uri:{{URL_TO_SERVICE}}.svc
And voila, you're done.

LoB Silverlight app updated to Entity Framework 5 doesn't work on Windows Azure

I've a LoB Silverlight 5 app running on Windows Azure. I developed that app with EF4 and RIA Services. I decided to update the model to EF5 with the latest RIA Services keeping it on .NET 4.
Short story:
after I've updated to EF5 and RIA Services 4.2, the app works locally in the emulator but it crashes on Azure.
Long Story:
App is divided in 4 projects: client, server (contains DbContext), model (contains edmx file), helpers.
When I decided to update, I started with the model project: deleted old references, deleted edmx, added new references (nuget), generated new edmx. It build correctly.
Then the server project: deleted old references, added new references (nuget), changed Domain Service files with DbContext and edited so it works with EF5. It build and the app worked locally (no azure emulator).
When I tested on the Azure emulator the response was a 501. I found somewhere (I post the link when I'll find it again) the solution is to add an app.config file containing the same runtime/assemblyBinding/dependentAssembly/assemblyIdentity section is in the web.config file that references Entity Framework.
Then I uploaded on a staging environment on Azure and the process WaBootstrapper keep cycling trying to install the server code while WaIISHost keep crashing.
Things I tried:
change name to app.config to the server assembly dll eg: AppName.Web.dll.config
delete System.Data.Entity (do not build at all.. that dll is needed);
migrate to .NET 4.5 to get rid of System.Data.Entity;
checking all references in every project and "Copy local" option;
migrate to Entity Framework 6 (RC1).. just trying.. I can't be blamed for it;
(other stuff I don't remember).
None of the list above have changed the results. I spent more that a week on this and now I think I lost focus.. so I'm asking for your help. You, guys, have saved me more than one time. I can't even try to remember how was before internet and StackOverflow.
Thanks.. any help is welcome!
P.S. Edited by the author I forgot to mention I also updated Windows Azure SDK from 1.7 to 2.1.
If you are using spatial data types, they are defined Microsoft.SqlServer.Types. I've read a tweet (from whom I can't remember - sorry) that they had to switch to "copy local" for this type as the Azure image does not contain this file.
I did found this article on code project that highlights this issue in the Background section. Using Spatial Data with SQL Server 2012, Entity Framework 5 and ASP.NET MVC
HTH,
Richard
Installed Visual Studio 2013, opened project, I was asked if I want to update to Windows Azure SDK 2.2: YES. Build. Published. Works.
I really don't know what happend. Anyway my project went beyond that point so I have to migrate to EF 5 and new Ria Services again. If I found out something else I'll edit this answer.

Silverlight 5 Install Project using InstallShield - which one do I use?

Well I think this might be the final question for this Silverlight 5 project.
I just installed the InstallShield Limited Edition for Visual Studio 2012 and no I am faced with a dilemma. Which installation project to use?
The project is a Silverlight WCF application and I hope that is a simple enough description to go on. What is required is that the client side sees the web environment and the server side has the WCF services (of course).
I have not worked with this kind of project before so there may be some configuring certain pieces to go certain places and I am very unfamiliar with how all this works. The Installer projects available are as follows:
Setup Project,
Merge Module Project,
Setup Library Project,
Bootstrapper Project,
C# Custom Action Project,
VB Custom Action Project,
C++ Custom Action Project
Which one would I use to create an Installer for this Silverlight 5 WCF solution?

Crystal Reports "Class not registered" WPF

I have a shiny WPF (4.0) app that I need to add Crystal Reports to. I downloaded and installed CR for VS2010, then after that we purchased and installed Crystal Reports 13 (which has the WPF CrystalReportsViewer).
As a test, I created a new "Crystal Reports WPF Application" project in Visual Studio. I created a report, linked it to my DB (Sql Server), and previewed the report. All was well.
I then copied the CrystalReportsViewer window into my "real" app (same machine and framework), added the same references and tried to run the same code:
ReportDocument _report;
this._report = new ReportDocument();
this._report.Load(#"CrystalReport1.rpt");
this.reportViewer.ViewerCore.ReportSource = _report;
However in my "real" application it bombs out on the second line with the error:
Retrieving the COM class factory for component with CLSID
{4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I've double and triple checked that the references are the same in both projects.
I've gone through all obscure project and solution properties.
I've added a new Crystal Report to the project so it would add the references that way instead of manually.
Google says "make sure the framework is Framework 4 not Framework 4 Client Profile". Google also says "make sure the framework is Framework 4 Client Profile not Framework 4". I've tried both to no avail.
The product is registered.
What else can I do? I don't want to add my entire project to the test app!
I've been using Crystal Reports since about version 3, and not once in ANY of those versions has it cleanly installed, registered, built reports, added them to an app and deployed. You'd think that after 13 versions they'd either be able to get it right, or my various employers would choose another reporting tool!
Got it. One solution needed to be changed from "Any CPU" to "x86" in Configuration.
Installing the standalone x64 and x86 packages solved this error for me.

Setup project for wpf application

I am trying to build a setup-msi using visual studio for my wpf application.
The issue i am facing is that i force primary output from wpf project to the setup project
and the dependencies are calcaluted automatically.
I run the msi locally (on the machine i built the wpf app) and everything works fine.
The problems start when i try to install it on different machines.
On other machines i run the installation process and it finishes justfine
but when i try to run the application i get exceptions about assemblies that could not be found.(e.g System.Web , Version=4,0,0,0 could not be found etc)
I really suck building setup projects but can anybody give a hand?
P.S.: I also tried installShield... same results.
I would guess that the target machine only had .NET Framework 4.0 Client Profile installed. System.Web is in .NET Framework 4.0 Extended, which is installed with the full 4.0 Framework but not with the Client Profile.
Are you bootstrapping .NET 4 in your setup?
Check for the presence of "Microsoft .NET Framework 4 Client Profile" and "Microsoft .NET Framework 4 Extended" in Add/Remove Programs (XP) or Programs and Features (Vista/7) on the machines where the application ran fine and those where it gave that error.
Edit: .NET Framework Deployment Guide for Developers. That should help you figure out how best to deploy it.

Resources