Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net SDK could not be found #1064

Open
CWolffIF opened this issue Jul 26, 2024 · 17 comments
Open

Net SDK could not be found #1064

CWolffIF opened this issue Jul 26, 2024 · 17 comments
Assignees
Labels

Comments

@CWolffIF
Copy link
Member

Hi,

I get the error with the ModelEditor:
image

eXpressAppFramework.log

In the Project the first lines are
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup>

The Path of the dotnet and the installation seems to be OK.
where.exe and dotnet --info

PS C:\Users\CWolff> where.exe dotnet
C:\Program Files\dotnet\dotnet.exe
PS C:\Users\CWolff> dotnet --info
.NET SDK:
Version: 8.0.303
Commit: 29ab8e3268

Workload version: 8.0.300-manifests.34944930
MSBuild version: 17.10.4+10fbfbf2e

Laufzeitumgebung:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.303\

Installierte .NET-Workloads:
[aspire]
Installationsquelle: VS 17.10.35122.118
Manifestversion: 8.0.0/8.0.100
Manifestpfad: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0\WorkloadManifest.json
Installationstyp: FileBased

[maui-windows]
Installationsquelle: VS 17.10.35122.118
Manifestversion: 8.0.61/8.0.100
Manifestpfad: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.61\WorkloadManifest.json
Installationstyp: FileBased

[maccatalyst]
Installationsquelle: VS 17.10.35122.118
Manifestversion: 17.2.8053/8.0.100
Manifestpfad: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.2.8053\WorkloadManifest.json
Installationstyp: FileBased

[ios]
Installationsquelle: VS 17.10.35122.118
Manifestversion: 17.2.8053/8.0.100
Manifestpfad: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.2.8053\WorkloadManifest.json
Installationstyp: FileBased

[android]
Installationsquelle: VS 17.10.35122.118
Manifestversion: 34.0.95/8.0.100
Manifestpfad: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.95\WorkloadManifest.json
Installationstyp: FileBased

Host:
Version: 8.0.7
Architecture: x64
Commit: 2aade6beb0

.NET SDKs installed:
8.0.303 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

@apobekiaris
Copy link
Member

The ME works only for the debug release so make sure u have build the project first in debug. Additionally try to delete all ME files from the roaming path.

Let me know if my suggestions did not work

@CWolffIF
Copy link
Member Author

Hi,

I deleted everything, but the same error.

@apobekiaris
Copy link
Member

do u recall anything that change in your enviroment since your last successfull run?

@CWolffIF
Copy link
Member Author

Yes,
I deinstalled VS2019. After that I made a repair VS2022.

@CWolffIF
Copy link
Member Author

I try to Deinstal Net.SDK from VS2022 and than reinstall. May it helps......

@apobekiaris
Copy link
Member

have u restarted?

@CWolffIF
Copy link
Member Author

Yes.
I´ve reinstalled everthing and restarted, emptied the ME Pathes and started in Debug.
Same error.

I wonder about MSBuildExtensions.cs:line 25

eXpressAppFramework.log

Type: InvalidProjectFileException
Message: The SDK 'Microsoft.NET.Sdk' specified could not be found. C:\DevProjects\iXISnetJH\iXISXRM.Module\iXISXRM.Module.csproj
Data: 0 entries
Stack trace:

at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)

at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError)
at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult) at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) at Microsoft.Build.Evaluation.Evaluator4.Evaluate()
at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, String toolsVersion)
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName)
at Xpand.XAF.ModelEditor.Module.Win.MSBuildExtensions.<>c__DisplayClass1_0.b__1(ProjectInSolution projectInSolution) in C:\Work\Reactive.XAF\tools\Xpand.XAF.ModelEditor\IDE\ModelEditor.Win\Xpand.XAF.ModelEditor.Module.Win\MSBuildExtensions.cs:line 25

@apobekiaris
Copy link
Member

I cannot follow that is a native call with the Microsoft.Build.Evaluation lib and it worked b4 your sdk reinstallation. In addition also it works on my side and nobody else reported issues. Do you have specific concerns? My impression is that your system config is suffering.

Did you also tried it in a different machine? the msg is clear the SDK is not found meaning paths problem e.g.

https://learn.microsoft.com/en-us/answers/questions/1184941/the-sdk-microsoft-net-sdk-specified-could-not-be-f

@CWolffIF
Copy link
Member Author

I tried everything from that link.
But everything seems to be OK. The SDK is found and the SDK check says

PS C:\devprojects\ixisnetjh> dotnet --list-sdks
8.0.303 [C:\Program Files\dotnet\sdk]

PS C:\devprojects\ixisnetjh> dotnet sdk check
.NET SDKs:
Version Status

8.0.303 Auf dem neuesten Stand.

Testen Sie die neuesten .NET SDK-Features mit .NET 9.0.100-preview.6.24328.19.

.NET-Runtimes:
Name Version Status

Microsoft.NETCore.App 6.0.12 Die Unterstützung von .NET 6.0 läuft in Kürze aus.
Microsoft.AspNetCore.App 6.0.32 Die Unterstützung von .NET 6.0 läuft in Kürze aus.
Microsoft.NETCore.App 6.0.32 Die Unterstützung von .NET 6.0 läuft in Kürze aus.
Microsoft.WindowsDesktop.App 6.0.32 Die Unterstützung von .NET 6.0 läuft in Kürze aus.
Microsoft.AspNetCore.App 7.0.20 .NET 7.0 wird nicht mehr unterstützt.
Microsoft.NETCore.App 7.0.20 .NET 7.0 wird nicht mehr unterstützt.
Microsoft.WindowsDesktop.App 7.0.20 .NET 7.0 wird nicht mehr unterstützt.
Microsoft.AspNetCore.App 8.0.7 Auf dem neuesten Stand.
Microsoft.NETCore.App 8.0.7 Auf dem neuesten Stand.
Microsoft.WindowsDesktop.App 8.0.7 Auf dem neuesten Stand.

@apobekiaris
Copy link
Member

I understand your frustration but really looks enviromental in your side nothing I can do.

Did you also tried it in a different machine

if it works at least will know to blame your enviroment else we discuss it further

@CWolffIF
Copy link
Member Author

Hi,
I´ve got the solution. I had only the SDK for .net 8. The ME needs the SDK for .net 6.
I installed SDK .net 6 and it works.

@apobekiaris
Copy link
Member

great!

note: ME works as well for other sdk, meaning your project apparently target .net6, but when u upgrade .net ME will download different libs in different dirs in your roaming folder. This is info only no action should required from your side

@apobekiaris apobekiaris removed their assignment Jul 27, 2024
@apobekiaris
Copy link
Member

let me clarify this a bit further, so ME does not require .net6 if your project tagrets .net8, a different version will be downloaded transparent to u looking at the targetframework of each project

@CWolffIF
Copy link
Member Author

Mhmm, thats crazy. Cause the whole project is set to .net8

image

@apobekiaris
Copy link
Member

what is the location of the ME process? after u run it. Get it from right click the process Open File Location on the task manager

@CWolffIF
Copy link
Member Author

The Background Process Xpand.XAF.ModelEditor.Win is running in
C:\Users\CWolff\AppData\Roaming\Xpand.XAF.ModelEditor.Win\Xpand.XAF.ModelEditor.Win

If you open the Modeleditor
Xpand.XAF.ModelEditor
C:\Users\CWolff\AppData\Roaming\Xpand.XAF.ModelEditor.Win\WinDesktop\net8.0-windows10.0.22621.0\4.241.1.0

Here is a Screenshot of the System (Roaming):
image

The Xpand\Xpand.XAF.ModelEditor.Win\4.21.1.0: is empty
The Xpand.XAF.ModelEditor.Win\Xpand.XAF.ModelEditor.Win: the Background Task is working
The Xpand.XAF.ModelEditor.Win\WinDesktop: the ME is in foreground working

I think my error was, that the Backgroundtask could not create the Foregroundtask. With .net6 SDK it is possible and it is created as .net8 Version (\net8.0-windows10.0.22621.0\4.241.1.0) like my Project.

@apobekiaris
Copy link
Member

thnks I will research this case when I have time for now everything is functional and this a design time feature so is not urgent. In any case please leave the ticket open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants