Closed Lydia-Shi closed 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
This issue should be moved either to dotnet/winforms
or to the Visual Studio Developer Community.
BTW I have encountered a similar error but when targeting .NET 6.
@Lydia-Shi, can you check event log and see which framework preview version it was expecting here. Did you create this application new on the machine where you are running it?
@Lydia-Shi can you please provide a link to the SDK installer that causes the issue? And VS version too please.
@Lydia-Shi, can you check event log and see which framework preview version it was expecting here. Did you create this application new on the machine where you are running it?
@dreddy-work I just create a simple project, not a running one. Please see below GIF:
Event log:
Description: A .NET Core application failed.
Application: DesignToolsServer.exe
Path: \\?\C:\Users\v-qiashi\AppData\Local\Temp\WinFormsCache\cy2c0v4g.mit\DesignToolsServer.exe
Message: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '7.0.0-preview.3.22158.1' (x64) was not found.
- The following frameworks were found:
2.1.30 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.22 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.23 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.14 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.15 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
6.0.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
6.0.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
7.0.0-preview.3.22151.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0-preview.3.22158.1&arch=x64&rid=win10-x64
@Lydia-Shi can you please provide a link to the SDK installer that causes the issue? And VS version too please.
@RussKie We always download 7.0 from latest main branch(https://github.com/dotnet/installer), like below:
VS Version: 17.2.0 Preview 3.0 [32310.290.main]
@Lydia-Shi , creating .Net 6.0 apps work fine?
@dreddy-work Yes, Form designer works fine when targeting to .NET 6.0.
Runtime config json is missing framework versions in it.
{
"runtimeOptions": {
"tfm": "net7.0",
"additionalProbingPaths": [
"C:\\Users\\dreddy\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\dreddy\\.nuget\\packages"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}
Is this an SDK issue?
Seems so. ProjectName>.designer.runtimeconfig.json is generated without targetframework info in it. @dsplaisted , who would be right person to look into this? @Shyam-Gupta as FYI.
We use
await configuredProject.Services.OutputGroups.GetOutputGroupAsync("DesignerRuntimeImplementationProjectOutputGroup", cancellationToken);
What does the (non-designer) runtimeconfig.json look like?
Can you share a binlog including the _GenerateDesignerRuntimeConfigFile
target?
Copied binlog here: "\clickonceqa\ClickOnce\temp\dreddy\msbuild.binlog"
Content of the runtimeconfig.json are
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0-preview.3.22151.6"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "7.0.0-preview.3.22159.1"
}
]
}
}
and content of deps.json are
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"TestApp/1.0.0": {
"runtime": {
"TestApp.dll": {}
}
}
}
},
"libraries": {
"TestApp/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
Here is the copy from repro machine where build is failing and (non-designer) runtimeconfig.json is not yet generated. need to change extension to zip to upload here. msbuild.zip .
This is currently blocking both WinForms and WPF.
expected runtimeconfig.json should have following content
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0-preview.3.22151.6"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "7.0.0-preview.3.22128.8"
}
],
"additionalProbingPaths": [
"C:\\Users\\dreddy\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\dreddy\\.nuget\\packages",
"C:\\temp\\fallback"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}
The current installer build is incoherent as runtime is blocked: https://github.com/dotnet/installer/pull/13376
/cc: @kirsan31 @Olina-Zhang
Verified this issue in the latest .Net 7.0 SDK build 7.0.100-preview.4.22173.7 from main branch: https://github.com/dotnet/installer, it is fixed: form designer can be loaded successfully, build and run app successfully.
Description
When creating a Winforms .Net core application and targeting to .NET 7.0, Form designer keep loading and an error dialog pops out, WSOD page is shown after few minutes.
Reproduction Steps
Expected behavior
Forms designer can displayed successfully.
Actual behavior
Form designer keeps loading. WSOD page is shown after few minutes.
Regression?
Yes, it's a regression issue and cannot repro in 7.0.100-preview.3.22153.22.
Known Workarounds
No response
Configuration
.Net 7.0.100-preview.3.22159.27
Other information
This issue also occurs in WPF project.