Open fubar-coder opened 6 years ago
Try passing the property /p:FrameworkPathOverride=/usr/lib/mono/xbuild-frameworks/.NETFramework/v3.5
(or define in csproj file). See https://github.com/dotnet/sdk/issues/335#issuecomment-371484670.
@kasper3 No, this doesn't work, because now it's unable to find any assembly at all, because the v3.5 assemblies are in the path specified by the TargetFrameworkDirectory
(i.e. /usr/lib/mono/3.5-api
). This target framework directory only contains the difference between v3.5 and v3.0 and the other assemblies are in different framework paths.
@radical Can you take a look at this (or suggest a better place to ask)?
@fubar-coder Try to use /p:TargetFrameworkRootPath=/usr/lib/mono/xbuild-frameworks
Steps to reproduce
dotnet restore
msbuild
Expected behavior
msbuild should be able to find the
Microsoft.Build.Utilities.v3.5
assembly . In/usr/lib/mono/xbuild-frameworks/.NETFramework/v3.5
is a sub-directoryRedistList
which contains aFrameworkList.xml
file. This points to the correct location of theMicrosoft.Build.Utilities.v3.5
assembly with the relative path../../../../3.5-api/
pointing to/usr/lib/mono/3.5-api
.My assumption is, that - when the
IncludeFramework
attribute exists - the assemblies in theTargetFrameworkDirectory
are ignored. The same project file works under Windows.Actual behavior
Environment data
msbuild /version
output:OS info: