Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Cannot Build tye after updating VS2019 16.8 preview3.0 / sdk 5.0.0-rc1 / VsCode (Lots of PackageReference are not loaded anymore) #660

Closed
tebeco opened this issue Sep 15, 2020 · 18 comments
Labels
bug Something isn't working

Comments

@tebeco
Copy link
Contributor

tebeco commented Sep 15, 2020

Describe the bug

As I was rebasing a PR and trying to fix a review comment on it, it seems that I can't use either VS2019 16.8 Preview 3.0 or VsCode (Insider) anymore
Lots of PackageReference are not visible in the dependency tree
Most of the errors are "Unknown class / namespace"
This picture is only a small part of all the errors
image

To Reproduce

same on master/main branch

git clone https://github.com/dotnet/tye
checkout 
dotnet tool restore
./restore.cmd
./build.cmd
./startvs.cmd

Note that all of this works:

  • build.cmd
  • ./eng/common/build.ps1 -build
  • ./eng/common/build.ps1 -test

Further technical details

  • The platform : Windows
  • dotnet --info:
C:\dev\github\tebeco\tye   multiple-target-frameworks ≣ 
[00:43]❯ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.100-rc.1.20452.10
 Commit:    473d1b592e

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.20211
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.100-rc.1.20452.10\

Host (useful for support):
  Version: 5.0.0-rc.1.20451.14
  Commit:  38017c3935

.NET SDKs installed:
  2.1.809 [C:\Program Files\dotnet\sdk]
  3.1.402 [C:\Program Files\dotnet\sdk]
  5.0.100-preview.8.20417.9 [C:\Program Files\dotnet\sdk]
  5.0.100-rc.1.20452.10 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0-preview.8.20414.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0-rc.1.20451.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0-preview.8.20407.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0-rc.1.20451.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0-preview.8.20411.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0-rc.1.20452.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
 C:\dev\github\tebeco\tye   multiple-target-frameworks ≣ 
@tebeco tebeco added the bug Something isn't working label Sep 15, 2020
@tebeco
Copy link
Contributor Author

tebeco commented Sep 15, 2020

VsCode :
image

@jkotalik
Copy link
Contributor

@JunTaoLuo any idea what could be going on here?

@tebeco tebeco changed the title Cannot Build tye in VS2019 16.8 preview3.0 / VsCode (Lots of PackageReference are not loaded anymore) Cannot Build tye after updating VS2019 16.8 preview3.0 / sdk 5.0.0-rc1 / VsCode (Lots of PackageReference are not loaded anymore) Sep 15, 2020
@tebeco
Copy link
Contributor Author

tebeco commented Sep 15, 2020

MOAR info:

"in case of doubt, try to build Signalr"
I almost managed to get (on release/v5.0-rc1 > restore.cmd; build.cmd; cd src/signalr > startvs.cmd build
image
probably unrelated

my point on that is, that it does not seems to affect dotnet/aspnetcore which also use dotnet/arcade

@tebeco
Copy link
Contributor Author

tebeco commented Sep 15, 2020

I manually edited some csproj in dotnet/tye with ... space to force "re-interpret" and SOME part of the tree now appear, but that's all, still IDE glitch / can't build

image

these files are supposed to be generated in .\artifacts\obj\FOO\project.assets.json I guess
and they probably look ok is there a missing props or something to tell IDE to use that ?
image

@JunTaoLuo
Copy link

Odd, I just upgraded to Preview 3.0 and I'm able to work in VS. I also tried a fresh clone and it seems to work. Everything seems to work on my machine so I'm not sure what's going on.

From what you described I wonder if there's an issue with packages that were restored. Maybe try clearing your obj/bin folders and see if that makes a difference?

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

Attempted multiple git clean -fdx + git reset --hard and changed to master
that's weird

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

I think something is broken in my box but I can't understand why it would affect only tye yet
I can't even repair RC1 ... error is very very weird
VS repair could not repair 3.1.7.1..... <== guess that's part of this issue here

It seems that the VS Update went bad

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

Changing TargetFramework from net5.0 to netcoreapp3.1 seems to have fixed Microsoft.Tye.Core but break again when I change it back to net5.0
I really think VS2019 is just completly broken sicne RC1 update

I have no idea who should I contact ...
Vs Feedback is generally not interactive enought to help on such scenario

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

uninstalled all SDK / VS / InstallCleanup / reinstall VS2019 from scratch
same issue

... found a weird folder "permissions" ... checking ...

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

maybe @terrajobst has some info on that

ok so ...
here is what happen when I run from the CLI :
restore.cmd and build.cmd are using DOTNET_ROOT that is supposed to point to ./.dotnet which is driven by dotnet/arcade which for this repo is supposed to be `preview6

image
image

Now let's open Visual Studio
image

What is going on here ???

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

@JunTaoLuo can you confirm me that this was already disabled for you ?

I had to disable this :
image

and then VS is not mutating these files anymore
I think there's possibly a bug in VS is it can't find it own generated targets

@JunTaoLuo
Copy link

Ah yes, I have disabled that option. FYI, I found some issues in the SDK that mentions some of the symptoms here: dotnet/sdk#13179 and dotnet/sdk#13614. However, those are specific to WPF apps which this is not so I'm not sure if they are relevant. @dsplaisted would you be able to help here?

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

I wonder if updating the SDK used by the current repo to at least RC1 would help

but i'm not sure how to do so with arcade

bonus:
Rx has issue since preview6 and i think i saw a reference to Rx in a project
see dotnet/reactive#1237

@JunTaoLuo
Copy link

I was just about to reply, but yea I tried rc1 SDK which we use in other repos and it fixed the problem it seems.

@JunTaoLuo JunTaoLuo mentioned this issue Sep 16, 2020
@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

this would confirm the "non retro compatible behavior" regression from Preview3

preview3 installer "rc1 sdk by vs"
I believe VS uses that RC1 to generate project.assets.json

and it uses the one from global.json to "read" it

I also suppose that there was some sort of breaking change in that targets json output

the result is the impossibility for vs to process the file

@JunTaoLuo
Copy link

Makes sense, I didn't know we were behind on the SDK version in this repo.

@tebeco
Copy link
Contributor Author

tebeco commented Sep 16, 2020

will add that comment to the PR:

beware about that RX issue with WinRT changes

You might want to recheck that the code of this repo using Rx still runs

@tebeco
Copy link
Contributor Author

tebeco commented Sep 23, 2020

closing I suppose since not linked to tye and the ongoing PR to update to RC1 will help ?
Or should I re-open it nutil it works in VS with "magic restore" enabled ?

@tebeco tebeco closed this as completed Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants