Errors upgrading .NET Core app to 1.1 - asp.net-core

So, I have a happily working ASP.NET Core 1.0 app targeting net461 framework.
Today I tried to upgrade it to the new ASP.NET Core 1.1 (according to the instructions on this page all you need to do is a Nuget package upgrade)
This resulted in the following slew of errors:
error: Unable to resolve 'Microsoft.AspNetCore.Diagnostics.Abstractions (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.AspNetCore.Http.Extensions (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.AspNetCore.WebUtilities (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.Extensions.FileProviders.Physical (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.Extensions.Logging.Abstractions (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.Extensions.Options (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'System.Diagnostics.DiagnosticSource (>= 4.3.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'System.Reflection.Metadata (>= 1.4.1)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.AspNetCore.Mvc.ApiExplorer (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
error: Unable to resolve 'Microsoft.AspNetCore.Mvc.Cors (>= 1.1.0)' for '.NETFramework,Version=v4.6.1'.
...
what am I missing here? Shouldn't this just work?
For reference, here are the relevant sections of the project.json (before running the Nuget upgrade):
"dependencies": {
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.AspNet.WebApi.Client": "5.2.3"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"net461": {
"imports": [
]
}
}
EDIT: after running the Nuget upgrade, the dependencies section was changed to this by Visual Studio:
"dependencies": {
"Microsoft.AspNet.WebApi.Client": "5.2.3",
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0"
},

I finally figured it out, in case anyone else has the same problem.
There were three steps to make it work:
For some reason, the standard "Microsoft and .NET" Nuget feed was not including these packages.. I had to open the Nuget Settings and tick the "nuget.org" feed as well. Having done that it was able to restore the v1.1 packages
The blog post that I was referencing didn't mention that you need to open your global.json file and change the SDK Version to "1.0.0-preview2-1-003177" (for some reason, v1.1 still has an SDK called v1.0.0 -- any ideas what's going on there?!?)
Having done those two things, trying to run the app produced a 500 error, but after enabling stdoutLogEnabled in web.config you can see the exception is:
System.IO.FileLoadException: Could not load file or assembly
'System.Collections.Immutable, Version=1.2.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference.
To solve this, you need to delete your application's bin folder and then rebuild (for some reason "Rebuild Solution" isn't enough). When you deploy to Production, presumably you'll also need to delete the bin folder there or you might get the same problem.

I suspected something similar to what #gallivantor mentioned in his #1, but somehow something kept rewriting the NuGet.config file behind the UI and when I re-started Visual Studio per #jim-w's suggestion, the NuGet.org item would go back to un-checked.
So I decided to look into the NuGet.config file and noticed that there were two sections: <packageSources> and <disabledPackageSources>. And the source with the NuGet.org key was in both. I tried to remove it from the disabled packages section and everything started working.
Before:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources>
<add key="nuget.org" value="true" /> <!-- This is what I was referring to -->
</disabledPackageSources>
</configuration>
After:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
Warning: I omitted a number of details (in particular about the environment) to keep the answer simple. Before applying this solution to your situation make sure it is appropriate to your circumstances.

Related

Upgrading React Native version give me "Undefined symbols for architecture x86_64"

I am trying to upgrade my react-native version from 63 to 67.4 and I have issues for the iOS part.
I have done bundle install yarn upgrade cd iOS && pod install and this is the issue I have after changing iOS deployment target from 10.0 to 11.0 as suggested in the react-native upgrade helper.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_RCTViewManager", referenced from:
_OBJC_CLASS_$_BVLinearGradientManager in BVLinearGradientManager.o
"_OBJC_METACLASS_$_RCTViewManager", referenced from:
_OBJC_METACLASS_$_BVLinearGradientManager in BVLinearGradientManager.o
"_OBJC_CLASS_$_RCTView", referenced from:
_OBJC_CLASS_$_BVLinearGradient in BVLinearGradient.o
"_OBJC_METACLASS_$_RCTView", referenced from:
_OBJC_METACLASS_$_BVLinearGradient in BVLinearGradient.o
"_RCTRegisterModule", referenced from:
+[BVLinearGradientManager load] in BVLinearGradientManager.o
"_OBJC_CLASS_$_RCTConvert", referenced from:
objc-class-ref in BVLinearGradient.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After fixing this error by adding React-Core to the linked binary with librairies in the Build Phases. I have a second error which I don't know if it is linked to the previous fix or from what it is:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_NSMigratePersistentStoresAutomaticallyOption", referenced from:
-[MQTTCoreDataPersistence createPersistentStoreCoordinator] in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_CLASS_$_NSManagedObject", referenced from:
_OBJC_CLASS_$_MQTTFlow in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_NSInferMappingModelAutomaticallyOption", referenced from:
-[MQTTCoreDataPersistence createPersistentStoreCoordinator] in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_NSSQLiteManualVacuumOption", referenced from:
-[MQTTCoreDataPersistence createPersistentStoreCoordinator] in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_NSSQLiteAnalyzeOption", referenced from:
-[MQTTCoreDataPersistence createPersistentStoreCoordinator] in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_CLASS_$_NSAttributeDescription", referenced from:
objc-class-ref in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_METACLASS_$_NSManagedObject", referenced from:
_OBJC_METACLASS_$_MQTTFlow in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_NSSQLiteStoreType", referenced from:
-[MQTTCoreDataPersistence createPersistentStoreCoordinator] in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in libNAOSDK.a(MQTTCoreDataPersistence.o)
"_NSInMemoryStoreType", referenced from:
-[MQTTCoreDataPersistence createPersistentStoreCoordinator] in libNAOSDK.a(MQTTCoreDataPersistence.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And this is the dependencies I have in my package.json:
"dependencies": {
"#babel/plugin-proposal-class-properties": "7.16.7",
"#bam.tech/react-native-batch": "6.0.1",
"#react-native-async-storage/async-storage": "1.17.0",
"#react-native-community/datetimepicker": "6.1.0",
"#react-native-community/eslint-config": "3.0.1",
"#react-native-community/masked-view": "0.1.11",
"#react-native-community/netinfo": "8.2.0",
"#react-native-community/push-notification-ios": "1.10.1",
"#react-native-firebase/analytics": "14.7.0",
"#react-native-firebase/app": "14.7.0",
"#react-native-firebase/crashlytics": "14.7.0",
"#react-native-firebase/messaging": "14.7.0",
"#react-navigation/bottom-tabs": "6.2.0",
"#react-navigation/native": "6.0.8",
"#react-navigation/stack": "6.1.1",
"#zsajjad/react-native-heading": "git+https://github.com/zsajjad/react-native-heading.git",
"buffer": "6.0.3",
"date-fns": "2.28.0",
"i18next": "21.6.14",
"memoize-one": "6.0.0",
"moment": "2.29.1",
"react": "17.0.2",
"react-i18next": "11.16.2",
"react-native": "0.67.4",
"react-native-autolink": "4.0.0",
"react-native-camera": "4.2.1",
"react-native-cardiweb-polestar": "0.5.7",
"react-native-contacts": "7.0.4",
"react-native-elements": "3.4.2",
"react-native-fast-image": "8.5.11",
"react-native-gesture-handler": "2.3.2",
"react-native-image-crop-picker": "0.37.3",
"react-native-image-progress": "1.2.0",
"react-native-keyboard-aware-scroll-view": "0.9.5",
"react-native-linear-gradient": "2.5.6",
"react-native-modal-datetime-picker": "13.1.0",
"react-native-progress": "5.0.0",
"react-native-push-notification": "8.1.1",
"react-native-reanimated": "2.5.0",
"react-native-root-modal": "5.0.1",
"react-native-safe-area-context": "4.1.4",
"react-native-screens": "3.11.1",
"react-native-snap-carousel": "3.9.1",
"react-native-splash-screen": "3.3.0",
"react-native-svg": "12.3.0",
"react-native-swipe-gestures": "1.0.5",
"react-native-swipeable": "0.6.0",
"react-native-swiper-flatlist": "3.0.16",
"react-native-vector-icons": "9.1.0",
"react-native-video": "5.2.0",
"react-native-webview": "11.17.2",
"react-redux": "7.2.6",
"redux": "4.1.2",
"redux-persist": "6.0.0",
"redux-thunk": "2.4.1",
"remote-redux-devtools": "0.5.16",
"rn-fetch-blob": "0.12.0"
},

Updated to CRA 2.0 and now can't build - Out of memory

My Yarn build is broken since updating to CRA 2.0.
Getting out of memory error, I've tried running with a bigger max memory and it's not making any difference.
Yarn start is fine, but yarn build gives the following error:
<--- Last few GCs --->
[14692:000001A168B8CC30] 367561 ms: Mark-sweep 1245.1 (1430.7) -> 1244.8 (1433.2) MB, 4524.1 / 0.0 ms allocation failure GC in old space requested
[14692:000001A168B8CC30] 372188 ms: Mark-sweep 1244.8 (1433.2) -> 1244.8 (1387.7) MB, 4626.6 / 0.0 ms last resort GC in old space requested
[14692:000001A168B8CC30] 377070 ms: Mark-sweep 1244.8 (1387.7) -> 1244.8 (1378.2) MB, 4882.6 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 00000117FCAA57C1 <JSObject>
0: builtin exit frame: stringify(this=00000117FCA88FF1 <Object map = 0000015BE0D02BA1>,000002A6D8C022D1 <undefined>,000002A6D8C022D1 <undefined>,00000025F91DAB39 <Object map = 0000016E6AF79681>)
1: arguments adaptor frame: 1->3
2: _send [internal/child_process.js:675] [bytecode=0000024FC7AFB9B1 offset=551](this=0000037EBD602981 <process map = 0000015BE0D0A341>,message=00000025F91D...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node_module_register
2: v8::internal::FatalProcessOutOfMemory
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal::Factory::NewRawTwoByteString
5: v8::internal::Smi::SmiPrint
6: v8::internal::StackGuard::HandleInterrupts
7: v8::internal::wasm::LocalDeclEncoder::Size
8: v8::internal::wasm::LocalDeclEncoder::Size
9: v8::internal::wasm::LocalDeclEncoder::Size
10: v8::internal::wasm::LocalDeclEncoder::Size
11: v8::internal::wasm::LocalDeclEncoder::Size
12: v8_inspector::protocol::Debugger::API::SearchMatch::fromJSONString
13: v8_inspector::protocol::Debugger::API::SearchMatch::fromJSONString
14: 00000178DC106B21
I'm not sure what else has changed to for this to fire.. i.e. what it's trying to stringify that is running out of memory.
Build scripts'
"build": "npm run pre:build && react-app-rewired build && npm run post:build",
"pre:build": "yarn run build:css && rimraf build && rimraf mobile/www/app/*",
"post:build": "cp build/index.html mobile/www/ && cp build/* mobile/www/app --recursive",
Dev dependencies:
"devDependencies": {
"#types/react": "16.4.13",
"babel-core": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"chai": "^4.1.2",
"cra-build-watch": "^1.0.3",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-react": "^7.3.0",
"file-loader": "^1.1.11",
"gh-pages": "^1.0.0",
"html-webpack-plugin": "^3.2.0",
"karma": "^1.7.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.6",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.3",
"phantomjs-polyfill": "0.0.2",
"react-addons-test-utils": "^15.6.0",
"react-test-renderer": "^16.0.0",
"sinon": "^4.1.2",
"typescript": "^2.7.2",
"customize-cra": "^0.1.1"
},

Updating to Newest Version of Sylius

Looking at the recent changes to Sylius and the new interface, as well as the Roadmap which has beta 1.0 out in November, I'd love to update my development project to the newest version, and continue updating until the beta in November, at which point I'll stop and use this as the version which I finish development on. I see an old post here on SO about updating Sylius, but it's from 2014 and almost every package referenced is out of date. I'm looking for a fresh copy of a recent composer.json requirements list, or instructions on the easiest way to get my project up to date (without a total reinstall) so I can keep up until Beta 1.0. I'll attach my current composer.json require list, in case it's pertinant. Thanks!
"require": {
"php": "^5.6|^7.0",
"ext-exif": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"doctrine/collections": "~1.2",
"doctrine/common": "~2.5",
"doctrine/data-fixtures": "~1.1.0",
"doctrine/doctrine-bundle": "~1.3",
"doctrine/doctrine-cache-bundle": "~1.0",
"doctrine/doctrine-fixtures-bundle": "~2.2",
"doctrine/doctrine-migrations-bundle": "~1.0",
"doctrine/orm": "^2.4.8,<2.5",
"doctrine/phpcr-odm": "^1.3",
"friendsofsymfony/elastica-bundle": "^3.0.2",
"friendsofsymfony/oauth-server-bundle": "~1.4",
"friendsofsymfony/rest-bundle": "~1.5",
"fzaninotto/faker": "~1.2",
"gedmo/doctrine-extensions": "^2.4.12",
"incenteev/composer-parameter-handler": "~2.0",
"jackalope/jackalope": "^1.1.4",
"jackalope/jackalope-doctrine-dbal": "^1.1.2",
"jms/serializer-bundle": "^0.13|^1.0",
"jms/translation-bundle": "^1.1",
"knplabs/knp-gaufrette-bundle": "~0.1",
"knplabs/knp-menu-bundle": "~1.1",
"knplabs/knp-snappy-bundle": "~1.2",
"liip/imagine-bundle": "~1.0",
"ocramius/proxy-manager": "^1.0",
"omnipay/omnipay": "~2.3",
"payum/omnipay-bridge": "~1.0",
"payum/payum": "~1.3",
"payum/payum-bundle": "~2.1",
"php-http/guzzle6-adapter": "~1.1",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sensio/distribution-bundle": "~3.0",
"stof/doctrine-extensions-bundle": "~1.1",
"swiftmailer/swiftmailer": "~5.0",
"symfony-cmf/block-bundle": "~1.2",
"symfony-cmf/content-bundle": "~1.2",
"symfony-cmf/create-bundle": "~1.2",
"symfony-cmf/media-bundle": "~1.2",
"symfony-cmf/menu-bundle": "~1.2",
"symfony-cmf/routing-bundle": "^1.4",
"symfony/assetic-bundle": "^2.8",
"symfony/monolog-bundle": "^2.8",
"symfony/polyfill-iconv": "~1.0",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/symfony": "^2.8",
"twig/extensions": "~1.0",
"twig/twig": "~1.11",
"webmozart/assert": "^1.0",
"white-october/pagerfanta-bundle": "~1.0",
"willdurand/hateoas-bundle": "^0.4|^1.0",
"winzou/state-machine-bundle": "~0.2",
"zendframework/zend-hydrator": "^1.0|^2.0",
"zendframework/zend-stdlib": "^2.0|^3.0",
"sonata-project/intl-bundle": "^2.2",
"payum/stripe": "^1.3"

ArgumentOutOfRangeException when doing dnu restore with Kestrel using dnxcore50

I hit an issue trying to build a web application for Asp.NET Core 1.0 using dnx core and Visual Studio Code on Windows 7. I used Yeoman to generate an empty application and then ran dnu restore. This gives the following output:
Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16609
CACHE https://api.nuget.org/v3/index.json
Restoring packages for d:\development\asp.net core\yeoman_test\EmptyApplication\
project.json
Writing lock file d:\development\asp.net core\yeoman_test\EmptyApplication\proje
ct.lock.json
----------
System.ArgumentOutOfRangeException: Specified argument was out of the range of v
alid values.
Parameter name: supportedFrameworks
at NuGet.NetPortableProfile..ctor(String frameworkDirectory, String name, IEn
umerable`1 supportedFrameworks)
at NuGet.NetPortableProfileTable.LoadPortableProfile(String versionDirectory,
String profileDirectory)
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at NuGet.NetPortableProfileTable.BuildPortableProfileCollection()
at NuGet.NetPortableProfileTable.GetProfileData()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at NuGet.NetPortableProfileTable.GetProfile(String profileName)
at NuGet.NetPortableProfile.Parse(String profileValue)
at NuGet.VersionUtility.IsPortableLibraryCompatible(FrameworkName frameworkNa
me, FrameworkName targetFrameworkName)
at NuGet.VersionUtility.IsCompatible(FrameworkName frameworkName, FrameworkNa
me targetFrameworkName)
at NuGet.ContentModel.ContentItemCollection.FindBestItemGroup(SelectionCriter
ia criteria, ContentPatternDefinition[] definitions)
at Microsoft.Dnx.Tooling.Utils.LockFileUtils.CreateLockFileTargetLibrary(Lock
FilePackageLibrary library, IPackage package, RestoreContext context, String cor
rectedPackageName)
at Microsoft.Dnx.Tooling.RestoreCommand.WriteLockFile(LockFile previousLockFi
le, String projectLockFilePath, Project project, List`1 graphItems, PackageRepos
itory repository, IProjectResolver projectResolver, IEnumerable`1 contexts)
at Microsoft.Dnx.Tooling.RestoreCommand.<RestoreForProject>d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<<Execute>b__2>
d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<Execute>d__68.MoveNext()
----------
Restore failed
Specified argument was out of the range of valid values.
Parameter name: supportedFrameworks
NuGet Config files used:
C:\Users\<user>\AppData\Roaming\NuGet\nuget.config
Feeds used:
https://api.nuget.org/v3-flatcontainer/
My dnvm output for the current runtime:
* 1.0.0-rc1-update2 coreclr x64 win default
And the project.json:
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"tooling": {
"defaultNamespace": "EmptyApplication"
},
"dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
]
}
I can replicate the issue in a minimal form using just the following project.json (and no other files in the directory):
{
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final"
},
"frameworks": {
"dnxcore50": {}
}
}
I've dug into Kestrel's nuget package and its dependencies (for DNXCore5.0) are:
<group targetFramework="DNXCore5.0">
<dependency id="Microsoft.AspNet.Hosting" version="1.0.0-rc1-final" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="1.0.0-rc1-final" />
<dependency id="System.Numerics.Vectors" version="4.1.1-beta-23516" />
<dependency id="System.Collections" version="4.0.11-beta-23516" />
<dependency id="System.Diagnostics.Debug" version="4.0.11-beta-23516" />
<dependency id="System.Diagnostics.TraceSource" version="4.0.0-beta-23516" />
<dependency id="System.Diagnostics.Tracing" version="4.0.21-beta-23516" />
<dependency id="System.Globalization" version="4.0.11-beta-23516" />
<dependency id="System.IO" version="4.0.11-beta-23516" />
<dependency id="System.Linq" version="4.0.1-beta-23516" />
<dependency id="System.Net.Primitives" version="4.0.11-beta-23516" />
<dependency id="System.Runtime.Extensions" version="4.0.11-beta-23516" />
<dependency id="System.Runtime.InteropServices" version="4.0.21-beta-23516" />
<dependency id="System.Text.Encoding" version="4.0.11-beta-23516" />
<dependency id="System.Threading" version="4.0.11-beta-23516" />
<dependency id="System.Threading.Tasks" version="4.0.11-beta-23516" />
<dependency id="System.Threading.Thread" version="4.0.0-beta-23516" />
<dependency id="System.Threading.ThreadPool" version="4.0.10-beta-23516" />
<dependency id="System.Threading.Timer" version="4.0.1-beta-23516" />
</group>
I worked through these and found that changing my project.json dependencies to just contain either Microsoft.AspNet.Hosting or System.Numerics.Vectors caused the same error with supportedFrameworks. There may be others, but after Microsoft.Extensions.Logging.Abstractions, System.Collections, and System.Diagnostics.Debug worked I decided to ask here before continuing.
I assume I'm doing something silly, of course, but can't seem to work out exactly what.
Delete (or rename) the Reference Assemblies\Microsoft\Framework\.NETPortable folder.
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable
See also: NuGet Fails to Install FluentValidation.

.NET vNext, EF7 beta6 - Missing Method exception when calling UserMananger.FindByEmailAsync

I'm getting this when calling UserMananger.FindByEmailAsync
Exception thrown: 'System.MissingMethodException' in EntityFramework.Core.dll
Additional information: Method not found: 'Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.PartialEvaluationInfo Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.EvaluatableTreeFindingExpressionVisitor.Analyze(System.Linq.Expressions.Expression)'.
Here is my project.json dependencies:
"EntityFramework": "7.0.0-beta6-*",
"EntityFramework.Commands": "7.0.0-beta6-*",
"EntityFramework.Core": "7.0.0-beta6-*",
"EntityFramework.SqlServer": "7.0.0-beta6-*",
"Microsoft.AspNet.DataProtection": "1.0.0-beta6-*",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta6-*",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta6-*",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta6-*",
"Microsoft.AspNet.Mvc": "6.0.0-beta6-*",
"Microsoft.AspNet.Owin": "1.0.0-beta6-*",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6-*",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6-*",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6-*",
"Microsoft.AspNet.WebApi.Core": "5.2.3",
"Microsoft.Framework.Configuration": "1.0.0-beta6-*",
"Microsoft.Framework.Configuration.EnvironmentVariables": "1.0.0-beta6-*",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta6-*",
"Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta6-*",
"Microsoft.Framework.DependencyInjection": "1.0.0-beta6-*",
"Microsoft.Framework.DependencyInjection.Ninject": "1.0.0-beta6-*",
"Microsoft.Framework.Logging": "1.0.0-beta6-*",
"Microsoft.Framework.Logging.Console": "1.0.0-beta6-*",
"Microsoft.Owin": "3.0.1",
What am I missing?
It appears you are missing re-linq. But this should be installed as it is a depencency of "EntityFramework.Core".
Try removing "EntityFramework": "7.0.0-beta6-*", as this package does not and will not exist. It could be the source of conflicts? Just a guess.
Update:
You can verify which version relinq is installed with dnu list and look under "Package References". You should have "Remotion.Linq 2.0.0-alpha-004"
listed