question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PresentationFramework not found in SelfContainedDeployments

See original GitHub issue

From @rido-min on November 8, 2018 22:29

PresentationFramework not found in SelfContainedDeployments

1 - Create WPF app dotnet new wpf 2 - Create a Publishing Profile with Self Contained and a RID:

  <PropertyGroup>
    <PublishProtocol>FileSystem</PublishProtocol>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <PublishDir>bin\Release\netcoreapp3.0\publishSCD\</PublishDir>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <SelfContained>true</SelfContained>
    <_IsPortable>false</_IsPortable>
  </PropertyGroup>

After publish, the output exe does nothing, but running dotnet myapp.dll returns

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

I also reviewed the folder, and PresentationFramework.dll is not there.

I’m running:

NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview-009736
 Commit:    d273cdc5af

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview-009736\

Host (useful for support):
  Version: 3.0.0-preview1-27031-02
  Commit:  16fc8e9125

Copied from original issue: dotnet/core#2044

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wli3commented, Nov 13, 2018

ok

0reactions
livarcocccommented, Nov 13, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

PresentationFramework not found in ...
dll is not there. I'm running: NET Core SDK (reflecting any global.json): Version: 3.0.100-preview-009736 Commit: ...
Read more >
Changed framework version results in: Could not load file ...
I am working on WPF application, which was first targeted to 3.0 framework. When I tried to make it work on 4.0, I...
Read more >
NET application publishing overview
When publishing your app and creating an executable, you can publish the app as self-contained or framework-dependent. Publishing an app as self ...
Read more >
Deployment options in .NET Core 3.0 - jenx.si
NET Core 3.0 introduced self-contained executables. ... If runtime is not present on the end user machine, deployment can be tricky task.
Read more >
WPF on .NET Core - Magnus Montin
NET Core and that you will be able to deploy them as self-contained executables (.exes) that have no dependency upon any pre-installed ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found