visual studio - MSB3644 The reference assemblies for framework were not found -
i getting following msb3644 complication error:
the reference assemblies framework ".netframework,version=v4.0" not found. resolve this, install sdk or targeting pack framework version or retarget application version of framework have sdk or targeting pack installed. note assemblies resolved global assembly cache (gac) , used in place of reference assemblies. therefore assembly may not correctly targeted framework intend.
from i've read here, due assemblies on machine stored in "program files" , not in "program files (x86)". frameworkpathoverride
property on msbuild can fix it.
i've tried adding property (frameworkpathoverride
) csproj:
<project sdk="microsoft.net.sdk"> <import project="..\..\tools\common.props" /> <propertygroup> <targetframeworks>net40;net45;netstandard1.2</targetframeworks> <generatepackageonbuild>false</generatepackageonbuild> <frameworkpathoverride>c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0</frameworkpathoverride> </propertygroup> <itemgroup condition=" '$(targetframework)' == 'net40' "> <reference include="system.configuration" /> </itemgroup> <itemgroup condition=" '$(targetframework)' == 'net45' "> <reference include="system.configuration" /> </itemgroup> <propertygroup condition=" '$(targetframework)' == 'netstandard1.2' "> <defineconstants>$(defineconstants);netstandard</defineconstants> </propertygroup> <itemgroup condition=" '$(targetframework)' == 'netstandard1.2' "> </itemgroup> </project>
that error dissapears, types , namespaces cannot resolved, , build warning:
msb3270 there mismatch between processor architecture of project being built "amd64" , processor architecture of reference "c:\windows\microsoft.net\framework\v4.0.30319\mscorlib.dll", "x86". mismatch may cause runtime failures. please consider changing targeted processor architecture of project through configuration manager align processor architectures between project , references, or take dependency on references processor architecture matches targeted processor architecture of project.
after setting project's target framework x86, warning disappears, still no types or namespaces can resolve.
i have necessary frameworks installed:
i using visual studio 2017 on windows 10.
Comments
Post a Comment