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
I have also suffered this error in my hobby project. I'm unsure how to install 6.0.100 again. The SDK installer complains I have another version of the project and adding that global.json gives me:
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
* You intended to execute a .NET program:
The application 'build' does not exist.
* You intended to execute a .NET SDK command:
A compatible installed .NET SDK for global.json version [6.0.100] from [C:\Users\<my_user_project_path>\global.json] was not found.
Install the [6.0.100] .NET SDK or update [C:\Users\<my_user_project_path>\global.json] with an installed .NET SDK:
2.1.701 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
2.1.802 [C:\Program Files\dotnet\sdk]
3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk]
5.0.100-rc.2.20479.15 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]
I have also suffered this error in my hobby project. I'm unsure how to install 6.0.100 again. The SDK installer complains I have another version of the project and adding that global.json gives me:
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
* You intended to execute a .NET program:
The application 'build' does not exist.
* You intended to execute a .NET SDK command:
A compatible installed .NET SDK for global.json version [6.0.100] from [C:\Users\<my_user_project_path>\global.json] was not found.
Install the [6.0.100] .NET SDK or update [C:\Users\<my_user_project_path>\global.json] with an installed .NET SDK:
2.1.701 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
2.1.802 [C:\Program Files\dotnet\sdk]
3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk]
5.0.100-rc.2.20479.15 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]
Since we serviced the ref pack we might have broken it because of file versions so with 6.0.1 assembly conflict resolution might prefer the System.Runtime in the ref pack rather than the one in the System.Runtime.Experimental package.
Looking to confirm this theory and see what we can do for next servicing releases.
I was able to confirm that theory with the repository shared on the issue, this is the output from the conflict resolution:
Encountered conflict between 'Reference:C:\Users\safern\.nuget\packages\system.runtime.experimental\6.0.0\ref\net6.0\System.Runtime.dll' and 'Reference:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref/net6.0/System.Runtime.dll'. Choosing 'Reference:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref/net6.0/System.Runtime.dll' because file version '6.0.121.56705' is greater than '6.0.121.52210'.
You can workaround this if you want to use 6.0.101 SDK by adding this target to the projects that want to use System.Runtime.Experimental (in the case of netevolve-guard, your .Experimental and .Experimental.Tests projects) you can add it in a common location like a Directory.Build.targets file:
@ericstj@dsplaisted is there a way to tell package conflict file resolution to always choose the asset from System.Runtime.Experimental via a platform manifest or package override file in the ref pack? Or do we have to service System.Runtime.Experimental every time we service the ref pack?
Activity
danmoseley commentedon Dec 15, 2021
@krwq
Chamberlain91 commentedon Dec 16, 2021
I have also suffered this error in my hobby project. I'm unsure how to install 6.0.100 again. The SDK installer complains I have another version of the project and adding that
global.jsongives me:samtrion commentedon Dec 16, 2021
You can find the download here - https://dotnet.microsoft.com/en-us/download/dotnet/6.0#version_1
martincostello commentedon Dec 16, 2021
I also logged this in the SDK repo: dotnet/sdk#23073
danmoseley commentedon Dec 16, 2021
cc @safern in case he's around tomorrow and has insights. We shouldn't have broken this...
safern commentedon Dec 16, 2021
Since we serviced the ref pack we might have broken it because of file versions so with 6.0.1 assembly conflict resolution might prefer the System.Runtime in the ref pack rather than the one in the System.Runtime.Experimental package.
Looking to confirm this theory and see what we can do for next servicing releases.
safern commentedon Dec 17, 2021
I was able to confirm that theory with the repository shared on the issue, this is the output from the conflict resolution:
You can workaround this if you want to use 6.0.101 SDK by adding this target to the projects that want to use System.Runtime.Experimental (in the case of netevolve-guard, your .Experimental and .Experimental.Tests projects) you can add it in a common location like a Directory.Build.targets file:
@ericstj @dsplaisted is there a way to tell package conflict file resolution to always choose the asset from System.Runtime.Experimental via a platform manifest or package override file in the ref pack? Or do we have to service System.Runtime.Experimental every time we service the ref pack?
ericstj commentedon Dec 17, 2021
We intentionally tried to address this here: https://github.com/dotnet/runtime/pull/55678/files#diff-41acba6267202db943fa29d434bb231021a7b8b47b63c990bd61708111c67515R33
I can't see where we're addressing conflict resolution in the current approach, did that get removed?
ericstj commentedon Dec 17, 2021
Rereading above, it looks like folks didn't understand how ref-pack servicing / file-versions worked when we did it initially.
I think we should just modify how much gap we bump the experimental reference assembly to make sure it will be higher than servicing.
safern commentedon Dec 17, 2021
Should we just set the minor version of the file version for System.Runtime.Experimental so that we guarantee it is always greater?
tannergooding commentedon Jan 3, 2022
I don't think there is a particular preference provided we know we won't need to publish some actual
v6.1version of the things at any point.ericstj commentedon Jan 3, 2022
I think bumping the minor version of only the file version should be fine. Fix should go here:
runtime/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
Line 35 in 45d1f9e
And we should be able to remove the incrementing of
_FileVersionBldsafern commentedon Jan 3, 2022
Let me know if help is needed to drive fixing this and porting it. We have till Monday to make the cut for 6.0.2
tannergooding commentedon Jan 3, 2022
Do I just need to put up a PR against
mainor do I need to also target some existing servicing branch?tannergooding commentedon Jan 3, 2022
Likewise, is the minor version differing going to cause problems with version resolution or if we do end up exposing an actual
v6.1in the future?safern commentedon Jan 3, 2022
We need to put it against main and against release/6.0 and then go over through servicing approval.
It shouldn't be a problem. If needed we can always bump the minor version for the file version attribute on v6.1 to something like 6.200.x