Visual Studio 15.3.1 can't find core DLLs after update -


i'm getting runtime error:

invalidoperationexception: can not find assembly file mscorlib.dll @ '...\bin\debug\net462\refs,...\bin\debug\net462\'

this had not been problem until updated version 15.3.1 morning, , installed .net core 2.0 sdk.

the dll's present in ~\.nuget\packages folder. i'd had same issue "microsoft.csharp.dll" assembly until copied , pasted stated folder.


i tried specifying use .net core 1.1.0 via global.json file, build error:

the version of microsoft.net.sdk used project insufficient support references libraries targeting .net standard 1.5 or higher. please install version 2.0 or higher of .net core sdk.

this error goes away if clean solution restore nuget packages via command line- not via gui. comes if change version of nuget package.

ok, seem different issue here: visual studio update 2017 15.3.1 forces asp.net core sdk 2.0, doesn't find "reference assemblies"

if install sdk 2.0 https://www.microsoft.com/net/download/core

you "probably" able build , run project again you'll having missing microsoft.csharp.dll / mscorelib.dll error.

if make sure dependency correct netstandard version:

<dependsonnetstandard>netstandard1.5</dependsonnetstandard> 

see here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard right version you. project using core 1.1 targeting full framework 4.6.1 , targeting netstandard1.6 has worked me.

the final piece of puzzel, found on github issues here: https://github.com/dotnet/sdk/issues/1488

add following references in .csproj file:

<packagereference include="microsoft.extensions.dependencymodel" version="2.0.0" /> 

this build project 1.1 project, using 2.0 sdk (which can tell, it's supposed do!). can run project, update packages , got on work!


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -