.net 6 and OLEDB - oledb

I have a program (.Net Framework 4.6) that reads and updates excel spreadsheet via OleDd.
I have ported this code to .Net 6 solution using the System.Data.OleDb (6.0.0) package.
It works fine on my development pc (Win 10), but when I upload it to deployment server (Windows server 2016) I get error:
The data providers require Microsoft Data Access Components (MDAC).
Please install Microsoft Data Access Components (MDAC) version 2.6 or
later.
The .Net Framework 4.6 app is working on the deployment server just fine.
I have installed:
AccessDatabaseEngine2016.exe
mdac28sdk.msi
My .Net 6 app is running in 32Bit mode
What am I missing?

Regarding a .NET_6 project I'm working on under 64bit Visual Studio with C#, and which I was in_serious trouble with, well, reading your question text brought me to rebuild this project of mine now specifically for 32-bit instead of building for "Any". This solved my_pending problem to get OLE.DB successfully opening a_connection to M$Access, which had been installed as part of 32-bit M$Office. It was a relief to finally get across my OLE.DB hurdle this way (after a good number of hours), but in hindsight I am surprised that earlier on, with .Net Framework v4.8, I can't seem to have needed this sort of bitwise accuracy.
So for what it's worth, at least in my case bitlevels were essential and crucial to get OLE.DB working under .NET_6.

Related

Can i edit a .NET 6 Console C# project in .NET 4.7.2?

I used to program in .NET 4.7.2 (and still do), but my High School uses .NET 6
Currently we have started using C# console in .NET 6
I don't want to update to .NET 6 because i would also have to change my Unity editor version to one that supports VS2022
Is it possible to open .NET 6 projects in .NET 4.7.2, or am i gonna have to update Unity and reinstall VS, while scouring every part of my C:// partition to clean up junk/leftovers? I am very tight on free space especially on C://
No, you can't (if you mean anything more then editing text, cause for this you can use even notepad). But depending on language features used potentially you can copy-paste code into a .NET Framework 4.7.2 project and compile it. Or not, cause at least some newer features are not supported by older framework version.
Also you don't need full blown VS upgrade. You can look into installing just the .NET 6 SDK and VS Code (which requires less space compared to VS 2022).
Though I hugely recommend to extend your disk.

using .NET Standard 2.1 with UWP

I made the big mistake of taking some NuGet library updates today. It forced me to either roll back a week's worth of work or upgrade to ASP .NET Core 3.0. I hate to use stuff that's not production, but I didn't want to untangle the libraries either, so I upgraded. Then it forces me to retarget .NET Standard 2.1 libraries. Which I did.
My problem now is with the client UWP code. When I try to compile, I get:
error : Project '..\ClassLibrary1\ClassLibrary1.csproj' targets 'netstandard2.1'. It cannot be referenced by a project that targets 'UAP, Version=v10.0.10586'.
This happens even with a virgin UWP and .NET Standard 2.1 library. Any clues on how to make Visual Studio 2019 client code work with the latest upgrade?
All Windows 10 SDKs currently don't support .NET Standard 2.1.
Windows 10 19H2 is using the same SDK number as 19H1, so it is unlikely that it will support .NET Standard 2.1. (But I certainly hope it does.)
Microsoft hasn't made an official announcement, but Windows 10 20H1 is getting a meaningful SDK update, so it is likely that it will support it. And once that's the case, UWP apps will require 20H1 to run (so that will become the minimum supported version).
One of the big issue with this situation is that Entity Framework Core 3.0 requires .NET Standard 2.1, so it can't be used in UWP apps for now (Update: This issue is resolved with Entity Framework Core 3.1 supporting .NET Standard 2.0).
By the way, as an experiment, I was able to fork Entity Framework Core 3.0 (for SQLite) and make it compile on .NET Standard 2.0. I basically had to manually copy a few new APIs from .NET Core 3.0 (like IAsyncXXX). And it worked, so it is an option for people who really need it. Note that, I did not try it with the SQL Server provider.
Update: The UWP team is planning to enable UWP apps to use .NET 5 and that's when UWP will support .NET Standard 2.1 (and more). This could happen in 20H2 or 21H1.
UWP does not support .Net standard 2.1 yet. It only support till .Net standard 2.0 and that too from windows 1709 onwards.
If you look at the link for 2.1 it states
Platform Support
An upcoming version Universal Windows Platform
so it may be 19H2
UPDATE
Microsoft is going to release a new framework called WinUI 3, this is going to support UWP as well as Win32 based application model. WinUI 3 would support .Net 5 for both the platforms. WinUI 3 preview is going to be available in mid May 2020, with final release in late 2020. WinUI 3 would be supported on windows 10 1803+.

aspnet core 1.0 full .net framework on Linux

I have a few simple questions:
a) can I use mono on linux and osx to load the full .net framework like I would on windows by adding net46 to my project.json?
b) can I use mono as an alias like net46?
c) can I use mono with aspnet core 1.0 rtm projects on linux?
I have been looking at the dotnet docs, specifically the standard library and the table and the table with the platform support confuses me with the arrows and star under mono.
thanks
can I use mono on linux and osx to load the full .net framework like I would on windows by adding net46 to my project.json?
In theory, yes, that's exactly what you do: specify some version of net inside frameworks in your project.json and dotnet run will then use mono to run your application.
In practice, basic Hello World application works, but I'm not sure how well will more complicated applications work.
If you want to run dotnet build on the same machine, you will also need reference assemblies. The version I tested (mono 4.2.1) only contained reference assemblies up to .Net 4.5.1, so net451 works, but net46 doesn't.
can I use mono as an alias like net46?
I don't think you can, at least not without forking .Net Core SDK.
I don't understand why would you want to do that, but I believe doing so would require modifying DefaultFrameworkMappings in NuGet.Client.
can I use mono with aspnet core 1.0 rtm projects on linux?
I wasn't able to make a basic ASP.NET Core application run under mono. I don't know what the problem is, or how hard would it be to fix it. EDIT: I managed to work around the issue I encountered.
Mono is other thing. Yeah they developed mono like .net framework but you cannot use .net 4.6 on mono.
Read the following article. Click here
Micrsoft developed .net core a new framework to run .net on windows, linux, mac osx etc.

ChartFX 4.0 components in Delphi XE4: inconsistent design time license issue

We have a huge app that uses ChartFX 4.0 a lot and we're migrating from Delphi6 to XE4. The programmer mainly responsible so far has basically created a new package for the ChartFX components and has successfully installed it on his machine, and has tested a lot of the code that uses these components. Every thing looked great at this point. Then he tried rebuilding/installing/testing on a couple of other machines - XE4 throws a designtime license not found error when he opens a new project and tries to place a chart object on the form. All machines have a licensed copy of chartFX 4.0 installed.
Any ideas?
You need to locate and transfer the CFX*.lic file (it's the development license for the .OCX file). In Delphi 7, it's CFX32.lic, and it's located in the %WINDIR%\System32 folder.

my webapi mvc4 not run in server with net.4.0

hello I made one applicattion(WEB API MVC4 which connect with SQL server) using framework 4.5, in my IIS express run fine but I try publish in other server which uses framework 4.0, my applicattion not run ?
I change in properties of my application works with framework 4.0 and in my IIS express run fine but other server not run.
I can't upload version framework in the other server.
thanks for the asnwers and sorry for my english I'm learning
Maybe you have changed target framework attribute in your web application that isn't sufficient to deploy. In your codes you may use libraries that require .net 4.5 while you only have changed the setting. About running this in your iis express must say that your system by default supports .net 4.5 while your app says i need only .net 4.0. So .net 4.5 related parts will be compiled and executed on local server and no ambiguous thing is here.
Running .NET4.5 based app on .NET4 machine is not supported. Simply because .NET4.5 is a super set of .NET4. Everything that's built for .NET4 works on .NET4.5 but not the other way around. If you are using Visual Studio 2012, you can change TargetFramework (in project properties) to .NET Framework 4, this will ensure that your app is built for .NET4.
--Varun
(.NET Framework Team)

Resources