Connecting DevExpress XtraReports with PostgreSQL in Visual Studio - postgresql

I have DevExpress XtraReports v18.1.6 version and PostgreSQL 4 v3.3. Visual studio 2017 v15.3.3 and Windows 7.
Here is scenario: In my project, I have some reports writen in devexpress v17.2. I could not run those reports, because I could not download exactly that version 17.2, I install new 18.1.6. Then in Visual studio main menu "DevExpress" I click on "Project converter to 18.1.." and that action replace my old dlls v17.2 with new 18.1. After that I could run reports (see it in designer).
But problem is with databse connection. I created connection string with "XpoProvider=Postgres".
Every time when I want to get data in report, or rebuild result shema, or manage queries I get error:
Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0,...
I have that reference, exactly that version. Also I tried with new versions of threading.tasks but unsuccessfully.
My version of Npgsql.dll was 2.2.7, I tried with 3.2.5 (read from some devexpres documentations). Also tried with new 4.0.3.
Did anyone have a similar problem?

we had the same issue when using the DevExpress (18.1) Report Designer with Visual Studio 2017.
I know this might not be an ideal or the best solution but at least it worked for us:
I used ProcMon to determine where it was looking for that specific File, for me it turned out to be C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\hhfnlhs1.kna
I downloaded the NuGet Package for System.Threading.Tasks.Extensions from NuGet (https://www.nuget.org/packages/System.Threading.Tasks.Extensions/)
I unzipped the Package and stored the DLL at that path from step 1
I had to active "loadFromRemoteSources" in my machine-config (see https://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/dd409252(v=vs.100))
I had to put another DLL from NuGet (https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/4.5.2) into that folder from step 1
That's it - now I can access the DB again.

Related

Windows app: fatal error C1083: Cannot open include file: 'gdiplus.h': No such file or directory

I was trying to compile the windows application for visual studio 2017 and I'm coming across this:
fatal error C1083: Cannot open include file: 'gdiplus.h': No such file or directory
I've tried searching for where to download this file but I can't seem to find it. I contacted vidyo and they redirected me to this link but I don't understand what to do with the file. It compiles and then runs without any real effect.
https://code.msdn.microsoft.com/windowsdesktop/GDI-bb1a3ba3
Anyone have any insights?
Thank you!
I am assuming you are trying out the vidyo.io Windows sample project. This sample project was probably compiled to an older version of Windows SDK, so you can either try it on an older version of Visual Studio, or the better approach would be to retarget the sample project in Visual Studio, so that it would refer to the newer Windows SDK. Here are the steps to follow:
Go to the "Solution Explorer" view.
Right-click the "VidyoConnector15" solution or the "VidyoConnector" project icon.
In the context menu, select "Retarget solution" or "Retarget Projects", respectively.
In the resulting dialog, the preselected option is probably a newer Windows SDK version that is already installed on your computer. Accept that option, and let Visual Studio update the sample project.
Built the app without errors.
Good luck!

Visual Studio 2017, Service Fabric project, Sdk Targets: Error when packaging SF project

The error displayed during build:
error MSB4102: The value "" of the "Project" attribute in element is invalid. Parameter "path" cannot have zero length.
Reproduction steps are simple:
VS 2017 RC 2.
Create new Service Fabric Application targeting ASP.Net Core using Web API.
Then attempt to package the service fabric project.
I suspect there is a bug in Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets that is part of VS 2017.
The one that sits in this directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Service Fabric Tools
In the sdk targets file, there is this statement.
<PropertyGroup Condition="'$(LanguageTargets)' == ''">
<LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.csproj'">$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>
<LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.vbproj'">$(MSBuildToolsPath)\Microsoft.VisualBasic.targets</LanguageTargets>
</PropertyGroup>
<!-- TODO: Generate error if LanguageTargets property isn't set here. This would happen, for example if an .fsproj referenced the .NET Sdk
but not the FSharp one. See https://github.com/dotnet/sdk/issues/448 -->
<Import Project="$(LanguageTargets)"/>
A little tough to decipher if you aren't used to it. But. In essence it is saying if it's a .csproj load the CSharp targets, if it is a .vbproj load the VB targets, if neither do nothing.
Then the next line tries to import the targets specified.
In the case of a Service Fabric project, that is a .sfproj, which means LanguageTargets is left blank and we get the error shown at the top of this post. The SF targets file should set LanguageTargets I think, before it reaches this line.
I suspect this sdk.targets file is some default template that hasn't been updated to handle VS 2017 service fabric projects yet.
Possible answer, but I don't like the idea of editing the Sdk.targets file installed by VS. Changing this line in Sdk.targets gets past this error, and doesn't cause any other errors in the build:
From: Matt Thalman at [https://social.msdn.microsoft.com/Forums/en-US/19fd8e9c-a517-4361-b50d-656d679d9c8b/visual-studio-2017-service-fabric-project-sdk-targets-error-when-packaging-sf-project?forum=AzureServiceFabric]
This issue should be fixed in the latest version of VS 2017 RC. Be sure you're running the latest.
However, even with the newest version, it is possible you can see this issue in cases where VS or some automated logic has downloaded the Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0 NuGet package rather than using the package that ships in the box. The version of the NuGet package that ships in the box with VS 2017 RC has the fix for this issue. But the Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0 NuGet package that exists in NuGet.org does not have the fix. There's currently an update to the NuGet package (version 1.4.1) containing a fix that exists but is unlisted. So if you need to make use of that updated package, you'll need to make some manual changes to your Service Fabric Application project:
Update the packages.config file so that it references version 1.4.1 of the Microsoft.VisualStudio.Azure.Fabric.MSBuild package.
Update your .sfproj file by replacing instances of "Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0" with "Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.1".
Normally, NuGet would make the project file updates for you automatically when you update the NuGet package version but due to an issue that NuGet has with the Service Fabric Application project type, those updates do not happen automatically which is why you need to make these changes manually (and also why the package is defined as unlisted in NuGet.org).

Visual Studio 2015 Nuget "There is no working folder mapping" Error

When adding the media services nuget package, VS 2015 is giving me errors about having no working folder mapping, then rolls back.
Here is an example of the message:
There is no working folder mapping for C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\lib\net45.
When I open the same solution from VS 2013, it works as expected.
Does anyone know how to resolve the error is VS 2015, or perhaps why it doesn't work there but does work in VS 2013?
(In VS 2015, I opened the solution by browsing to the sln file locally - not by retrieving the solution from source control.)
This is a known bug: https://github.com/NuGet/Home/issues/1004 Use Visual Studio 2013 for now. In the rush to get it out, Microsoft released a product that was not ready, even though technically this is a NuGet issue.
Not a long term solution, but I unbound from TFS, added the packages I needed, then rebound.
Try to unbound the solution and projects in TFS before updating the nuget packages.
To unbound try this
You should be able to avoid the error if you unbound from TFS. To unbound, go to File->Source Control->Advance->Change Source Control. Select the project and click on the Unbound button\link at top.

Entity Data Model Wizard crashes on Specify connection string dialog

Whenever I try to add an entity data model in Visual Studio 2013 on Windows 8.1 I see the following.
Does anybody have an idea how to fix this? I see the dialog to specify a database connection appear for a split second then dissapears.
I found a solution. Go into view->Server Explorer and remove any "Data Connections". Then this worked again.
I solved it by doing the following.
Make sure the versions of MySql.Data, MySql.Data.Entities, MySql.Web dll files in C:\Program Files (x86)\MySQL\MySQL Connector Net x.x.x\Assemblies\v4.5 and C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies are the same.
Make sure your project references the same version of dll
In my case my
MySql connector was 6.9.6
C:\Program Files (x86)\MySQL\MySQL Connector Net x.x.x\Assemblies\v4.5 and C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies had it as 6.8.3
Project referenced 6.8.3.
After updating all versions with same dlls, now I am able to update the "Model from database"
Hope this helps someone
Edit: A few weeks after there was some windows update which again screwed up the settings. To resolve it, I had to re-run the My Sql Connector installation and My Sql for Visual Studio, it worked fine after that.
Delete all connections in the Database Explorer Window and in the ADO .Net wizard add a new connection. I was able to solve this problem this way.
you have to delete all other connection from server explorer and delete other connection ss web.config
I Had a similar problem, spent 2 days trying many solutions but I finally solved. I just had to :
- Install MySQL For Visual Studio 2.0.5
- uninstall and install MySQL Connector 6.9.9
Note: Please follow the order VS => Connector and respect the version.
Finally I faced other problem and solved by adding an empty emdx first then changing SSL Generate Template property from SSDLToSQL To SSDLTOMySQL
Install MySql for VS 1.2.9
Install MySql Connector 6.8.3
Add these Nuget Packages to your Project:
EntityFramework // 6.4
Mysql.Data // 6.8.8
Mysql.Data.Entities // 6.8.3
Mysql.Web // 6.8.8
In the Solution Explorer, edit App.config(Add or Replace):
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
</providers>
</entityFramework>
rebuild and nothing more
For Anyone having this issue in VS 2019. This is what I did after a week long troubleshooting and googling, I just remove:
EntityFramework
MySql.Data.Framework or MySql.Data (or any other MySQL Nugget Packages you have added)
Then I re-install just this two in same order:
EntityFramework
MySQL.Data.EntityFramework
Then Update you entityframework section in app.config/web.config as follows:
I did not add default connection factory, I also remove version info from MySQL

Update in MicrosoftAjax.js is not reflect in my local Visual Studio 2005

I got java script error:
SCRIPT5022: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: y Actual value was 326.739990234375.
When I testing application in IE 10 browser. I did googling and found this solution from Microsoft Support.
I have modified MicrosoftAjax.js and MicrosoftAjax.debug.js files as per above article.
But After modified the javascriptfiles, when I run the application using Visual Studio 2005, I did not get the updated MicrosoftAjax.js and MicrosoftAjax.debug.js files.
So my question is: How can I get the updated versions of these two javascripts files.
Thanks,
Ankur
Instead of hacking JS files try upgrading your project to a newer .NET framework:
http://codecorner.galanter.net/2013/05/01/solution-for-ie10-error-script5022-sys-argumentoutofrangeexception-value-must-be-an-integer/