.Net Standard 2.0 with .Net Framework 4.8 - Could not load file or assembly System.Security.Principal.Windows, Version=4.1.1.0
The solution to this was to install a NuGet package on both the application project and the library project, specifically Microsoft.Net.Compilers
, which serves to cause the project to be built using the C# and Visual Basic compilers contained in the package, as opposed to the version installed with MSBuild.
While this package is now deprecated, it was the correct version to use given the application is running using .Net Framework, not .Net Core 2.1+.
.NET Standard + .NET Framework: could not load file or assembly 'Ninject'
Found the solution!
You have to migrate Your packages.config
into Your .csproj file.
for more details lookup here.
Nuget - " Could not load file or assembly '{Class Name}, Version= x.x.x., Culture=neutral, PublicKeyToken=null' or one of its dependency"
I don't believe this is an issue with .Net Standard, as I was able to get it loaded, but got a different error, as I have a more recent version of Chrome running, but I was able to load the assemblies fine using Class Lib (.Net Standard 2.0.3) and Console App (.Net Core 3.1).
EDIT: Your output/bin folder should look something like the following:
... and your .csproj file for your reference lib should have at least the follow:
Edit #2: I just noticed from your nuget packages screenshot above that you have warnings on them. Please delete remove you references and try adding them back, or if you right click your project is VS there should be an option to redownload your packages, but I never have much success with the ladder method. However it does seem to be an issue with you packages. If these don't work for you, please try removing your bin and obj folders and rebuild, sometimes this can help. If you still have issues, please share the ⚠️ messages as they might assist in debugging.
Edit #3: You may also want to try and see if adding this <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
to you .csproj file as explained here might help: Nuget Pkg Dlls Missing from Build Folder in .Net Standard DLL Project. dlls are Not Copy Local? Fix in Visual Studio 2019?
Related Topics
Postgresql Query to Return Results as a Comma Separated List
Select Only Rows That Contain Only Alphanumeric Characters in MySQL
How to Get the Last 12 Months from the Current Date
Select to Get Rows Based on Minimum Value of a Column
Using Node.Js (Express) and MySQL to Insert for a Timestamp
How to Import CSV Data into a Table Without Knowing the Columns of the Csv
T-Sql Challenges from Hackerrank
Database Table With Million of Rows
Mysql Error 1449: the User Specified as a Definer Does Not Exist
How to Use Json_Extract in MySQL and Get a String Without the Quotes
A SQL Query to Get All the Records Where 5 Columns Are Same But Only One Column Is Different
Sql Query to Select Million Records Quickly
How to Convert Yyyy-Mm-Dd Hh:Mm:Ss to Mm-Dd-Yyyy Hh:Mm:Ss in SQL Server
Mysql: Alter Table If Column Not Exists
How to Close Idle Connections in Postgresql Automatically