Indirect dependency on the framework assembly on .Net core prerelease version -


i doing experiments prerelase version of .net core.

i using 1.0.0-preview4-004071 version of .net core. installed .net core sdk, created 1.0.3 folder in c:\program files\dotnet\shared\microsoft.netcore.app , added binaries same build version (all downloaded https://github.com/dotnet/cli#installers-and-binaries).

my *.csproj file is:

<project toolsversion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <import project="$(msbuildextensionspath)\$(msbuildtoolsversion)\microsoft.common.props" />  <propertygroup>    <outputtype>exe</outputtype>    <targetframework>netcoreapp1.1</targetframework> </propertygroup> <itemgroup>    <compile include="**\*.cs" />    <embeddedresource include="**\*.resx" /> </itemgroup> <itemgroup>    <packagereference include="microsoft.netcore.app">    <version>1.0.3</version> </packagereference> <packagereference include="microsoft.net.sdk">    <version>1.0.0-alpha-20161104-2</version>    <privateassets>all</privateassets> </packagereference>  </itemgroup>         <reference include="system.collections.specialized"/> <reference include="system.collections.nongeneric">    <specificversion>false</specificversion>    <hintpath>lib\system.collections.nongeneric.dll</hintpath> </reference> <reference include="system.resources.resourcemanager">     <specificversion>false</specificversion>      <hintpath>lib\system.resources.resourcemanager.dll</hintpath> </reference> </itemgroup> <import project="$(msbuildtoolspath)\microsoft.csharp.targets" /> </project> 

under lib folder have copies of dlls same build.

i trying use system.collections.specialized , system.collections.nongeneric dlls (tried default path , lib folder) getting warnings this:

c:\program files\dotnet\sdk\1.0.0-preview4-004071\microsoft.common.currentversion.targets(1909,5): warning msb3268: primary reference "system.collections.nongeneric" not resolved because has indirect dependency on framework assembly "system.runtime, version=4.0.20.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" not resolved in targeted framework. ".netframework,version=v4.0". resolve problem, either remove reference "system.collections.nongeneric" or retarget application framework version contains "system.runtime, version=4.0.20.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a".   c:\program files\dotnet\sdk\1.0.0-preview4-004071\microsoft.common.currentversion.targets(1909,5): warning msb3268: primary reference "system.collections.nongeneric" not resolved because has indirect dependency on framework assembly "system.diagnostics.debug, version=4.0.10.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" not resolved in targeted framework. ".netframework,version=v4.0". resolve problem, either remove reference "system.collections.nongeneric" or retarget application framework version contains "system.diagnostics.debug, version=4.0.10.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a". 

if correct problem msbuild can't find correct assemblies , looking incorrect path.

how can fix assembly path lookup?

rederences .net core must added packages instead of dlls this:

<packagereference include="system.reflection.emit">   <version>4.0.1</version> </packagereference> 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -