DotNet CLI - unable to restore packages - dotnet-cli

I have a project that works with dnu and dnx but I am having issues to restore the packages with the new DotNet CLI:
project.json
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Hosting": "1.0.0-rc1-final"
},
"frameworks": {
"dnx451": {},
"dnxcore50": {}
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000"
},
"exclude": [
"wwwroot",
"node_modules"
]
}
command line output
Arrakis:AndaronWebApp Santhos$ dotnet restore
log : Restoring packages for /Users/Santhos/Projects/andaron/src/AndaronWebApp/project.json...
error: System.Diagnostics.Debug 4.0.11-beta-23516 provides a compile-time reference assembly for System.Diagnostics.Debug on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Diagnostics.TraceSource 4.0.0-beta-23516 provides a compile-time reference assembly for System.Diagnostics.TraceSource on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Net.Primitives 4.0.11-beta-23516 provides a compile-time reference assembly for System.Net.Primitives on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Runtime.Extensions 4.0.11-beta-23516 provides a compile-time reference assembly for System.Runtime.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Threading 4.0.11-beta-23516 provides a compile-time reference assembly for System.Threading on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Console 4.0.0-beta-23516 provides a compile-time reference assembly for System.Console on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.IO.FileSystem.Watcher 4.0.0-beta-23516 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.IO.FileSystem 4.0.1-beta-23516 provides a compile-time reference assembly for System.IO.FileSystem on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Globalization.Extensions 4.0.1-beta-23516 provides a compile-time reference assembly for System.Globalization.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Linq.Expressions 4.0.11-beta-23516 provides a compile-time reference assembly for System.Linq.Expressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Security.Cryptography.X509Certificates 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.X509Certificates on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Security.Cryptography.Algorithms 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: System.Security.Cryptography.Encoding 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.Encoding on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
error: Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64).
info : Committing restore...
log : Restore failed in 1012ms.
Errors in /Users/Santhos/Projects/andaron/src/AndaronWebApp/project.json
System.Diagnostics.Debug 4.0.11-beta-23516 provides a compile-time reference assembly for System.Diagnostics.Debug on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Diagnostics.TraceSource 4.0.0-beta-23516 provides a compile-time reference assembly for System.Diagnostics.TraceSource on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Net.Primitives 4.0.11-beta-23516 provides a compile-time reference assembly for System.Net.Primitives on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Runtime.Extensions 4.0.11-beta-23516 provides a compile-time reference assembly for System.Runtime.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Threading 4.0.11-beta-23516 provides a compile-time reference assembly for System.Threading on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Console 4.0.0-beta-23516 provides a compile-time reference assembly for System.Console on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.IO.FileSystem.Watcher 4.0.0-beta-23516 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.IO.FileSystem 4.0.1-beta-23516 provides a compile-time reference assembly for System.IO.FileSystem on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Globalization.Extensions 4.0.1-beta-23516 provides a compile-time reference assembly for System.Globalization.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Linq.Expressions 4.0.11-beta-23516 provides a compile-time reference assembly for System.Linq.Expressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Security.Cryptography.X509Certificates 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.X509Certificates on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Security.Cryptography.Algorithms 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
System.Security.Cryptography.Encoding 4.0.0-beta-23516 provides a compile-time reference assembly for System.Security.Cryptography.Encoding on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64.
Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64).
NuGet Config files used:
/Users/Santhos/.nuget/NuGet/NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json

The actual problem was that I had installation of the old asp 5 and the dotnet core and cli RC2 and that the RC2 release was also outdated.
Solution:
uninstall old versions of asp 5/core
install new RC2 not from the not from the web http://dotnet.github.io/getting-started/ because the package there is utterly outdated
install lastest RC2 from github here: https://github.com/dotnet/cli

Related

Why does (host) GCC need to be built against the target's standard library?

I've been looking into building cross-toolchains and have a general question about the compilation and workings of gcc.
The question is about this excerpt from the official gcc documentation:
In order to build GCC, the C standard library and headers must be present for all target variants for which target libraries will be built (and not only the variant of the host C++ compiler).
Why is the target's standard library required to build the (cross) compiler itself? Shouldn't the (cross) compiler running on the host only require the host's standard library to be built and then be able to compile the target's standard library?
I also found this on crosstool-NG's how a toolchain is constructed:
the final compiler needs the C library, to know how to use it, but: building the C library requires a compiler
This is consistent with what's stated above but I don't get why the final compiler needs to be built against a prebuilt target C library just to know how to use it later on. What is there to know for the host compiler about the target C library? Isn't it the linker's job to link target programs against the target's standard library at compile time?
Because that's the only way to ensure a working compiler for the target platform is created. There's no point in creating a non-working compiler, distributing it to the target platform, and finding out then that it's useless.
In general, a non-shared-object executable file is only successfully created if there are no unresolved symbols.
Per the GCC 11.2 "Overall Options" documentation
Compilation can involve up to four stages: preprocessing, compilation proper, assembly and linking, always in that order. GCC is capable of preprocessing and compiling several files either into several assembler input files, or into one assembler input file; then each assembler input file produces an object file, and linking combines all the object files (those newly compiled, and those specified as input) into an executable file.
So the final step is linking. The GNU linker 'ld' man page states:
Normally the linker will generate an error message for each
reported unresolved symbol but the option
--warn-unresolved-symbols can change this to a warning.
and
--error-unresolved-symbols
This restores the linker's default behaviour of generating
errors when it is reporting unresolved symbols.
So, by default linking fails when there are unresolved symbols.
Why?
Because if there are unresolved symbols, the resulting executable file won't work when it's run.
And the only way to ensure there are no unresolved symbols is to have all the necessary libraries from the target platform available when cross-compiling so all symbols can be resolved when the new compiler executables are being linked.

Using gnu toolchain compiled library in Keil

I'm trying to use a library I compiled under debian by GNU toolchain in Keil and getting this error:
._build\nrf52832_xxaa_s132.axf: Error: L6218E: Undefined symbol
_impure_ptr
this symbol comes from newlib, How can I compile a library with arm-none-eabi-gcc without newlib?
I've already tried -nostdlib but it doesn't work.

error installing Entity Framework Core SqlServer on VS 2017

Does anyone have any ideas about how to fix this?
I have tried it various different ways and version on VS 2015, and then I just recently upgraded to VS 2017, but still have same issue.
I'm in the process of installing Entity Framework Core, and wanted to connect to a SqlServer.
When I install the package via Pack Man Console or via NuGet interface, I get the following error....
I have the following installed currently..
System.Threading.Thread 4.3.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm).
System.Threading.Thread 4.3.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Threading.Thread 4.3.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64).
System.Threading.Thread 4.3.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
System.Threading.Thread 4.3.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86).
System.Threading.Thread 4.3.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).
Package restore failed. Rolling back package changes for 'RapidDeploy'.
Thanks in advance for any help on this.
Randy
You cannot use the SQL Server provider with UWP applications, you must use the SQLite provider instead. https://learn.microsoft.com/en-us/ef/core/providers/sql-server/

Visual Studio unresolved symbol _InterlockedCompareExchange

I'm porting some C code from GCC into Visual C++ and I'm running into this error when trying to add SQLite3 as a static lib.
I've compiled SQLite as another Visual Studio project, but when I try to add sqlite3.lib in Properties->Liner->"Additional Dependencies" I get the following error:
error LNK2001: unresolved external symbol _InterlockedCompareExchange | File sqlite3.lib(sqlite3.obj)
It seems to be referring to this function, but that's a bit over my head.
Thanks!
SQLite's system call redirection mechanism tries to access InterlockedCompareExchange through a function pointer. This does not work on x64 architectures, where it is a macro.
This is fixed ([1], [2]) in version 3.8.6.

Are static c libraries created with one compiler compatible with another?

In my case I have a library built with code sourcery gcc targeting arm cortex-m4. I am trying to then link that library into a project being compiled with IAR compiler.
Is it possible to do this or does the library have to be rebuilt with the new tools? What factors affect this?
Static library is bundle of several object files which are always compiler specific. So if you try to link a gcc based lib with IAR compiler, you will get error at compile time due to mismatch between object file formats to be linked.
You need to rebuild your library using IAR.
The IAR compiler for ARM supports the AEABI format, which allows you to compile files with one compiler and link with another.
If you have built your library using GCC and have enabled AEABE, it should be possible to use the static library in a project build using the IAR tools.

Resources