Open livarcocc opened 7 years ago
From @atifaziz on March 23, 2017 16:40
(bump)
From @joelharkes on April 14, 2017 8:32
Got same issue here running dotnet build -f net35
C:\Program Files\dotnet\sdk\1.0.3\Microsoft.Common.CurrentVersion.targets(1111,5): 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. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
dotnet info
.NET Command Line Tools (1.0.3)
Product Information:
Version: 1.0.3
Commit SHA-1 hash: 37224c9917
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.3
running msbuild /p:TargetFramework=net35
works though, is this fixed in a newer sdk version?
See:
This might fix simple solutions
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<!-- Fix dotnet build for net35 -->
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
</PropertyGroup>
</Project>
Otherwise the only solution you can use is: msbuild /p:TargetFramework=net35
This issue may be closed again. (this message is just for reference)
@joelharkes I believe that helps on Windows but not on other platforms.
@atifaziz am i missing something or are you not going to build dotnet 35 Full framework on any other OS than windows? (excluding non advised mono maybe).
Then check where you can find the Dotnet 3.5 framework in mono possibly make a variable for it and use: $(Dotnet35Dir)/Profile/Client
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<FrameworkLocation>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5</FrameworkLocation>
<!-- Fix dotnet build for net35 -->
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(FrameworkLocation)\Profile\Client</FrameworkPathOverride>
</PropertyGroup>
</Project>
From @atifaziz on March 9, 2017 9:16
Setup
I started by cloning the MoreLINQ repo:
The default branch,
master
, was at morelinq/MoreLINQ@dbad4803bedfef69f6a27cd897d0a4b2a66ce491 at time of reporting this issue. Next I randotnet --info
:I updated
global.json
and changed the SDK version from1.0.0-preview2-003131
to1.0.0
:I ran
dotnet --info
again to check thatdotnet
was indeed reflecting the new SDK version fromglobal.json
and it was:Migration
I ran the migration:
All seemed to have gone well:
Expected Behavior
I expected the migration to succeed with the process touching the solution,
*.xproj
&project.json
files.Actual behavior
The migration deleted
global.json
:Is that normal? How does one pin the SDK version to guard against future incompatible versions?
Restoring
I ran a restore:
Expected behavior
I expected packages for all projects to be restored.
Actual behavior
It failed:
However
MoreLinq.sln
was there in the same directory so the error was a surprise.Restoring Take 2
I ran a restore specifying the solution file explicitly:
Expected behavior
I expected packages for all projects to be restored.
Actual behavior
While restoring succeeded, it did so with many warnings about packages being downgraded:
Building
I ran a build as follows (I specified the solution file explicitly because like with
dotnet restore
,dotnet build
alone failed with the error MSB1003):Expected behavior
I expected the build to succeed with errors or warnings.
Actual behavior
The build failed with 1 warning, and more importantly, 19 errors:
Environment
dotnet --info
output supplied earlier.I also have Visual Studio 2017 Enterprise installed (output below from
Get-VSSetupInstance
):/cc @blackdwarf @livarcocc
Copied from original issue: dotnet/cli#5973