You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Program.cs(1,17): error CS0234: The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\prbhosal\Documents\Visual Studio 2017\Projects\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj]
Workaround
Run dotnet msbuild /t:Restore /p:TargetFramework=net451 and then run dotnet build
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.0-preview4-004117
+1. Command line restore/build is the only way to build. Restore/build within VS2017 breaks. With CLI 1.0.0-preview4-004233, the error is:
'C:\dev\TestProj\obj\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.5.1/win7-x64'. Ensure you have restored this project for TargetFramework='net451' and RuntimeIdentifier='win7-x64'. TestProj C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets 119
Just in case anybody else hits this, there is another simple workaround for this. Just need to flip the condition to exclude the RuntimeIdentifier property from all other TFMs
Steps to reproduce
Run
dotnet restore
anddotnet build
on the below projectExpected behavior
Build succeeds.
Actual behavior
Error
Workaround
Run
dotnet msbuild /t:Restore /p:TargetFramework=net451
and then rundotnet build
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview4-004117)
Product Information:
Version: 1.0.0-preview4-004117
Commit SHA-1 hash: 923320b
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.0-preview4-004117
cc @mlorbetske @pranavkm
The text was updated successfully, but these errors were encountered: