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 Project dependency "Microsoft.Windows.SDK.NET.dll" ist not handled correctly #36465

Open
JHJonasHuber opened this issue Oct 25, 2023 · 0 comments
Assignees
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@JHJonasHuber
Copy link

JHJonasHuber commented Oct 25, 2023

You can receive the error An assembly specified in the application dependencies manifest (ConsoleApp2.deps.json) was not found: package: 'runtimepack.Microsoft.Windows.SDK.NET.Ref', version: '10.0.22000.29' path: 'Microsoft.Windows.SDK.NET.dll' if you use the options GenerateRuntimeConfigDevFile, UseCommonOutputDirectory and specific Windows version (<TargetFramework>net7.0-windows10.0.22000.0)</TargetFramework> together, build the application and run it.

Steps to Reproduce:
Create a Project with following settings (in csproj file):

<OutputType>Exe</OutputType>
<TargetFramework>net7.0-windows10.0.22000.0</TargetFramework>"
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
<OutputPath>$(SolutionDir)Build\$(Configuration)\</OutputPath>
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
  • Build and run the application

Problem:
It seems like the nuget dependency of microsoft.windows.sdk.net.ref cannot find the correct version on runtime. (The correct nuget package path is in the generated .runtimeconfig.dev.json). If you copy the needed dlls from [NuGet Package directory]\microsoft.windows.sdk.net.ref\10.0.22000.29\lib\net6.0 to the application output directory manually you can start the application.

Seems to happen for every windows target OS Version 10.*

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants