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

Debugging NetStandard 2 assembly fails with "Unable to break execution 0x80004005" #1901

Open
itadapter opened this issue Jan 25, 2018 · 9 comments
Milestone

Comments

@itadapter
Copy link

.Net Standard Assembly. Using .NET 4.7.1 launch project - a console app linking DYNAMICALY (via Assembly.load()) to the target DLL. The breakpoints are not hit. The PAUSE does not work. VS 2017 15.5.5; tried running as admin; does not help.

An attempt to Pause the process:

image

Anyone can shed some light?

@itadapter itadapter changed the title Debugging NetStandard 2 asembly fails with "Unable to break execution 0x80004005" Debugging NetStandard 2 assembly fails with "Unable to break execution 0x80004005" Jan 25, 2018
@nguerrera
Copy link
Contributor

@gregg-miskelly Do you know what might cause the debugger to error out with that message?

@itadapter Is this happening on multiple machines? Can you share a minimal repro project that causes this?

@gregg-miskelly
Copy link

If you go to the processes window (Debug->Windows->Processes) what does the 'Debugging' column say?
If you go to the modules window (Debug->Windows->Modules) is the modules window empty?

@itadapter
Copy link
Author

itadapter commented Jan 25, 2018

Debugging processes: (trun.exe as expected)
image

Debugging modules: EMPTY

Keep in mind, the target assembly(to be debugged) is loaded dynamically via Assembly.Load(....)
I tried running VS as Admin, updated to 15.5.5 - all to no avail
also, I just figured that this shows up IF I use launch settings, that is: I set assembly as a stratup target with EXE as a debug launch command. IF I use the hand -written EXE in the same solution that calls the same code (including dynamic assembly load), it works as expected.

@livarcocc livarcocc added this to the Discussion milestone Jan 25, 2018
@gregg-miskelly
Copy link

I believe the problem is that your debugger is configured to debug with .NET Core, but you actually want to debug .NET Full-framework.

What kind of project is your startup project? (Classic .NET Project or .NET Core), (Web/Console/WinForms)

@itadapter
Copy link
Author

itadapter commented Jan 25, 2018

.NET 4.7.1 The assembly is .NET Standard 2.0
And debugging works if you swithch roles - set the EXE as a startup target vs .DLL with EXE launcher

At any rate, it should be then giving some error but not run and fail to pause the process. It does run/terminate as expected, the breakpoints are all "RED"/active but they dont stop

@nguerrera No it is on a single machine dont have "simple project", have full thing here:
https://github.com/agnicore/nfx

@nguerrera
Copy link
Contributor

nguerrera commented Jan 25, 2018

I see the repro now:

  • File -> New Project -> Class Library (.NET Standard)
  • Project properties -> Debug:
    • Launch -> Executable
    • Executable -> Path to .NET Framework application

Something is deciding to use the CoreCLR debug engine here and I'm not sure how to override it. cc @BillHiebert

@itadapter
Copy link
Author

itadapter commented Jan 25, 2018

@nguerrera yes it looks like it. Like I said, if you happen to have a LAUNCH EXE in the same assembly then set it as a startup (dynamically linking to .NET Std 2) then all works OK.

This is what I am doing now - creating a fake test container in the target solution to get around this problem

@alelom
Copy link

alelom commented Oct 15, 2021

@itadapter I'm facing the same issue, could you elaborate more on your workaround?
How do you make this fake test container?

@itadapter
Copy link
Author

@alelom that was 3 years ago, just moving to the next version of VS/fx fixed it, not sure what else changed

GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jun 7, 2022
* Join macro

* Make default format for the GUID macro overridable

Fixes dotnet#1737

* Add links to the different template content repos in the readme

* Convert repo list to bullets

* Adding netstandard2.1 to the list of TFMs for 3.0

* Releases the original source location mount point

* Change Build pool for internal builds (dotnet#1823)

* Removing the SourceLink packages since it is provided by Arcade

* Lowercase the content include path in the template pack csproj files

* Add gitignore template

* Update azure-pipelines.yml

* Update web.config item template

This updates the web.config item template to align with what `dotnet publish` produces when publishing

* Update template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/web.config

Co-Authored-By: Justin Kotalik <jukotali@microsoft.com>

* Merge master into stabilize (dotnet#1905)

* Update dependencies from https://github.com/dotnet/arcade build 20190418.7 (dotnet#1867)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19218.7

* Update dependencies from https://github.com/dotnet/arcade build 20190422.2 (dotnet#1870)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19222.2

* Update dependencies from https://github.com/dotnet/arcade build 20190423.2 (dotnet#1871)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19223.2

* Update dependencies from https://github.com/dotnet/arcade build 20190424.9 (dotnet#1873)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19224.9

* Update dependencies from https://github.com/dotnet/arcade build 20190425.5 (dotnet#1874)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19225.5

* Update dependencies from https://github.com/dotnet/arcade build 20190426.3 (dotnet#1875)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19226.3

* Update dependencies from https://github.com/dotnet/arcade build 20190429.8 (dotnet#1876)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19229.8

* Update dependencies from https://github.com/dotnet/arcade build 20190430.6 (dotnet#1877)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19230.6

* [master] Update dependencies from dotnet/arcade (dotnet#1879)

* Update dependencies from https://github.com/dotnet/arcade build 20190501.6

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19251.6

* Update dependencies from https://github.com/dotnet/arcade build 20190502.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19252.2

* Update dependencies from https://github.com/dotnet/arcade build 20190503.8 (dotnet#1881)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19253.8

* Update dependencies from https://github.com/dotnet/arcade build 20190504.1 (dotnet#1882)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19254.1

* Update dependencies from https://github.com/dotnet/arcade build 20190505.2 (dotnet#1883)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19255.2

* Update dependencies from https://github.com/dotnet/arcade build 20190506.12 (dotnet#1886)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19256.12

* [master] Update dependencies from dotnet/arcade (dotnet#1888)

* Update dependencies from https://github.com/dotnet/arcade build 20190507.7

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19257.7

* Update dependencies from https://github.com/dotnet/arcade build 20190508.5

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19258.5

* Update dependencies from https://github.com/dotnet/arcade build 20190509.9 (dotnet#1889)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19259.9

* Update dependencies from https://github.com/dotnet/arcade build 20190510.2 (dotnet#1890)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19260.2

* Update dependencies from https://github.com/dotnet/arcade build 20190511.1 (dotnet#1891)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19261.1

* Update dependencies from https://github.com/dotnet/arcade build 20190512.1 (dotnet#1892)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19262.1

* Update dependencies from https://github.com/dotnet/arcade build 20190513.3 (dotnet#1893)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19263.3

* [master] Update dependencies from dotnet/arcade (dotnet#1895)

* Update dependencies from https://github.com/dotnet/arcade build 20190514.13

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19264.13

* Update dependencies from https://github.com/dotnet/arcade build 20190516.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19266.2

* Update dependencies from https://github.com/dotnet/arcade build 20190516.4

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19266.4

* Update dependencies from https://github.com/dotnet/arcade build 20190517.7

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19267.7

* Update dependencies from https://github.com/dotnet/arcade build 20190518.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19268.2

* Update dependencies from https://github.com/dotnet/arcade build 20190520.1

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.1

* Update dependencies from https://github.com/dotnet/arcade build 20190520.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.2

* Updating the glob.json to include the 2.1.x version

* Update dependencies from https://github.com/dotnet/arcade build 20190521.7 (dotnet#1897)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19271.7

* Update dependencies from https://github.com/dotnet/arcade build 20190522.13 (dotnet#1898)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19272.13

* Update dependencies from https://github.com/dotnet/arcade build 20190523.11 (dotnet#1899)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19273.11

* Update dependencies from https://github.com/dotnet/arcade build 20190524.6 (dotnet#1901)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19274.6

* Update dependencies from https://github.com/dotnet/arcade build 20190528.1 (dotnet#1903)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19278.1

* Merging stabilize into master (dotnet#1904)

* Join macro

* Make default format for the GUID macro overridable

Fixes dotnet#1737

* Add links to the different template content repos in the readme

* Convert repo list to bullets

* Adding netstandard2.1 to the list of TFMs for 3.0

* Releases the original source location mount point

* Change Build pool for internal builds (dotnet#1823)

* Removing the SourceLink packages since it is provided by Arcade

* Lowercase the content include path in the template pack csproj files

* Add gitignore template

* Update azure-pipelines.yml

* Update web.config item template

This updates the web.config item template to align with what `dotnet publish` produces when publishing

* Update template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/web.config

Co-Authored-By: Justin Kotalik <jukotali@microsoft.com>

* Update --langVersion option's description

* Removing Microsoft.Extensions.CommandLineUtils references from the repo
GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jul 11, 2022
* Join macro

* Make default format for the GUID macro overridable

Fixes dotnet#1737

* Add links to the different template content repos in the readme

* Convert repo list to bullets

* Adding netstandard2.1 to the list of TFMs for 3.0

* Releases the original source location mount point

* Change Build pool for internal builds (dotnet#1823)

* Removing the SourceLink packages since it is provided by Arcade

* Lowercase the content include path in the template pack csproj files

* Add gitignore template

* Update azure-pipelines.yml

* Update web.config item template

This updates the web.config item template to align with what `dotnet publish` produces when publishing

* Update template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/web.config

Co-Authored-By: Justin Kotalik <jukotali@microsoft.com>

* Merge master into stabilize (dotnet#1905)

* Update dependencies from https://github.com/dotnet/arcade build 20190418.7 (dotnet#1867)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19218.7

* Update dependencies from https://github.com/dotnet/arcade build 20190422.2 (dotnet#1870)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19222.2

* Update dependencies from https://github.com/dotnet/arcade build 20190423.2 (dotnet#1871)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19223.2

* Update dependencies from https://github.com/dotnet/arcade build 20190424.9 (dotnet#1873)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19224.9

* Update dependencies from https://github.com/dotnet/arcade build 20190425.5 (dotnet#1874)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19225.5

* Update dependencies from https://github.com/dotnet/arcade build 20190426.3 (dotnet#1875)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19226.3

* Update dependencies from https://github.com/dotnet/arcade build 20190429.8 (dotnet#1876)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19229.8

* Update dependencies from https://github.com/dotnet/arcade build 20190430.6 (dotnet#1877)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19230.6

* [master] Update dependencies from dotnet/arcade (dotnet#1879)

* Update dependencies from https://github.com/dotnet/arcade build 20190501.6

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19251.6

* Update dependencies from https://github.com/dotnet/arcade build 20190502.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19252.2

* Update dependencies from https://github.com/dotnet/arcade build 20190503.8 (dotnet#1881)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19253.8

* Update dependencies from https://github.com/dotnet/arcade build 20190504.1 (dotnet#1882)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19254.1

* Update dependencies from https://github.com/dotnet/arcade build 20190505.2 (dotnet#1883)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19255.2

* Update dependencies from https://github.com/dotnet/arcade build 20190506.12 (dotnet#1886)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19256.12

* [master] Update dependencies from dotnet/arcade (dotnet#1888)

* Update dependencies from https://github.com/dotnet/arcade build 20190507.7

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19257.7

* Update dependencies from https://github.com/dotnet/arcade build 20190508.5

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19258.5

* Update dependencies from https://github.com/dotnet/arcade build 20190509.9 (dotnet#1889)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19259.9

* Update dependencies from https://github.com/dotnet/arcade build 20190510.2 (dotnet#1890)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19260.2

* Update dependencies from https://github.com/dotnet/arcade build 20190511.1 (dotnet#1891)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19261.1

* Update dependencies from https://github.com/dotnet/arcade build 20190512.1 (dotnet#1892)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19262.1

* Update dependencies from https://github.com/dotnet/arcade build 20190513.3 (dotnet#1893)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19263.3

* [master] Update dependencies from dotnet/arcade (dotnet#1895)

* Update dependencies from https://github.com/dotnet/arcade build 20190514.13

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19264.13

* Update dependencies from https://github.com/dotnet/arcade build 20190516.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19266.2

* Update dependencies from https://github.com/dotnet/arcade build 20190516.4

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19266.4

* Update dependencies from https://github.com/dotnet/arcade build 20190517.7

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19267.7

* Update dependencies from https://github.com/dotnet/arcade build 20190518.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19268.2

* Update dependencies from https://github.com/dotnet/arcade build 20190520.1

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.1

* Update dependencies from https://github.com/dotnet/arcade build 20190520.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.2

* Updating the glob.json to include the 2.1.x version

* Update dependencies from https://github.com/dotnet/arcade build 20190521.7 (dotnet#1897)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19271.7

* Update dependencies from https://github.com/dotnet/arcade build 20190522.13 (dotnet#1898)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19272.13

* Update dependencies from https://github.com/dotnet/arcade build 20190523.11 (dotnet#1899)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19273.11

* Update dependencies from https://github.com/dotnet/arcade build 20190524.6 (dotnet#1901)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19274.6

* Update dependencies from https://github.com/dotnet/arcade build 20190528.1 (dotnet#1903)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19278.1

* Merging stabilize into master (dotnet#1904)

* Join macro

* Make default format for the GUID macro overridable

Fixes dotnet#1737

* Add links to the different template content repos in the readme

* Convert repo list to bullets

* Adding netstandard2.1 to the list of TFMs for 3.0

* Releases the original source location mount point

* Change Build pool for internal builds (dotnet#1823)

* Removing the SourceLink packages since it is provided by Arcade

* Lowercase the content include path in the template pack csproj files

* Add gitignore template

* Update azure-pipelines.yml

* Update web.config item template

This updates the web.config item template to align with what `dotnet publish` produces when publishing

* Update template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/web.config

Co-Authored-By: Justin Kotalik <jukotali@microsoft.com>

* Update --langVersion option's description

* Removing Microsoft.Extensions.CommandLineUtils references from the repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants