Skip to content

Unable to target .NET Framework 3.5 or lower with .csproj #369

@TheRealPiotrP

Description

@TheRealPiotrP

Steps to reproduce

Create a new project with dotnet new
Change the TargetFramework to net35 or lower
Add <RuntimeIdentifier>win10-x64</RuntimeIdentifier> to the .csproj
dotnet restore
dotnet build

I've been seeing this issue since the move to msbuild. Targeting .NET 3.5 and lower works in the Preview 2 release SDK. All the relevant targeting packs are installed.

Expected behavior

A successful build

Actual behavior

Fails with the error:
... error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. ...

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview3-004056)

Product Information:
Version: 1.0.0-preview3-004056
Commit SHA-1 hash: ccc4968

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64

Moved from https://github.com/dotnet/cli/issues/4626 for @Thealexbarney.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions