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.

Basic project integration stuck on adding property message

See original GitHub issue

Steps to reproduce:

  • create simple Class library project for .NET Standard 2.0
  • install DllExport via NuGet
  • in GUI, select project, tick x86 and press Apply, the log keeps hanging on
    [Debug] 'Plugin\Plugin.csproj' Schedule an adding property: 'DllExportIdent':'0FAA5C33-ECB9-49BF-AB5B-F3DC54C76B08 . . .
  • DllExport version: v1.7.3.58831+9a4bc51
  • Used Visual Studio 2019 16.8 and also tested on Visual Studio Build Tools 2019

Information from Data tab or log data:

Installed: False; 1.7.3+9a4bc51; invoked: 1.7.3
Project type: CsSdk
Storage: ProjectFiles
Compiler.Platform: Auto
Compiler.ordinalsBase: 1
Compiler.rSysObj: False
Compiler.ourILAsm: False
Compiler.customILAsm: 
Compiler.genExpLib: False
Compiler.peCheck: PeIl
Compiler.patches: None
PreProc.Type: None
PreProc.Cmd: 
PostProc.Type: None
PostProc.ProcEnv: $(SolutionPath);$(MSBuildThisFileFullPath)
PostProc.Cmd: 
SignAssembly: 
Identifier: F4EA5AE5-E3A3-4756-B804-ED16FBD8FC7B
Instance: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\MSBuild.exe
Project path: ~\Plugin\Plugin.csproj
Action: Configure
PlatformTarget: x86
TargetFramework: netstandard2.0
TargetFrameworks: 
TargetFrameworkVersion: 
RootNamespace: MTPro.Plugin
AssemblyName: 
MgrArgs: 
MetaLib: tools\raw\lib\net20\DllExport.dll
MetaCor: tools\raw\lib\netstd\DllExport.dll
Proxy: 
StoragePath: .net.dllexport.targets
ddNS: 
ddNS max buffer: 500
UseCecil: True
intermediateFiles: False
timeout: 30000
RootPath: ~
PkgPath: packages\\DllExport.1.7.3\
SlnFile: 
SlnDir: .\
DxpTarget: tools\net.r_eg.DllExport.targets
MsgGuiLevel: -1
LockIfError: 

Demo Project files / Samples / etc.:

Plugin.csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <RootNamespace>MTPro.Plugin</RootNamespace>
    <Platforms>x86</Platforms>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="DllExport" Version="1.7.3" />
  </ItemGroup>
</Project>

. . . I’m not sure why but it keeps hanging on that Schedule and adding property message even with the simplest example code. Tried on different frameworks (.NET Core 3.1, .NET Standard 2.0, .NET Framework 4.7.1) also on a different machine, the result is the same.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
3Fcommented, Nov 21, 2020

Thanks for the report!

Seems like it was some changes in modern MSBuild instances for ITask processing (distributed together with VS 16.8+ and Build Tools). Because I remember an oriented vector at init properties before 16.8

DllExport -msb "...old-instance...MSBuild.exe"

https://github.com/3F/DllExport/blob/e9b20af53dc84814f1bb94d4ef52c9605b94122e/Wizard/net.r_eg.DllExport.Wizard.targets#L42-L48

💊 Temp solution for DllExport 1.7+ including latest 1.7.3

Please use the following command, or like:

DllExport -packages="%cd%\packages" -sln-dir="%cd%"

Patch

@hsaelens almost correctly noticed the place of the problem!

Since it might be some multithreading optimization in modern instances (not sure, need to check src), now it would be a good thing to separate the initialization logic.

RootPath="$(wRootPath)" must be first in any use of associated DirectoryPathFormat() / FilePathFormat() extensions etc.

I can review PR later. Thanks.

3reactions
hsaelenscommented, Nov 19, 2020

See the patch in attachment. My guess is that the PkgPath is being set before the RootPath. There may very well be a better way to fix this, I just started using dllExport a few weeks ago and know almost nothing about how it does its magic… 0001-Quick-fix-for-issue-175.patch.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot debug net6.0-macos Apps - Developer Community
This is a regression. I can no longer debug net6.0-macos apps. It also fails for net6.0-maccatalyst apps. When I hit debug, the following ......
Read more >
SSIS script component failing after upgrading from 2016 to ...
This seems to be the primary issue and we see that with the failures the Target framework is stuck on .NET Framework 4....
Read more >
Troubleshooting CI/CD
The CI Lint tool is a simple way to ensure the syntax of a CI/CD ... a merge request can be stuck with...
Read more >
Common Issues with GitKraken Client | Integration Error ...
Troubleshoot common errors in GitKraken Client. Learn how to address errors with integrations, Git pushing, Git branches, logging in, and others.
Read more >
My project isn't loading or opening
If you're not able to load or are seeing an error message when opening a project, there are a few things to try...
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