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

[Help] Nsbin.bat and several questions #39

Closed
qadeem-qureshi opened this issue Jun 20, 2017 · 7 comments
Closed

[Help] Nsbin.bat and several questions #39

qadeem-qureshi opened this issue Jun 20, 2017 · 7 comments
Labels
Milestone

Comments

@qadeem-qureshi
Copy link

qadeem-qureshi commented Jun 20, 2017

After adding DllExport from nuget I get this error.

Severity	Code	Description	Project	File	Line	Suppression State
Error		The command "NSBin.bat "C:\Users\Cloud\Documents\Visual Studio 2017\Projects\DllExportTest\packages\DllExport.1.5.2\tools\..\lib\net20\DllExport.dll" "System.Runtime.InteropServices" "true"" exited with code 1.	DllExportTest

Also my other question is why is the namespace so long or have i done something incorrectly? https://gyazo.com/a1650335764e5e4b3f0b447c0bdd2b57

Next, are there any example projects of using DllExport? I attempted to bypass the NSBIN.bat by simply clearing the code in the batch file out. However once compiled i used IDA and DependencyWalker to see if the export was actually exported and did not see anything.

And lastly, i see in some of your screenshots there is a configurator. I, however, do not see this in VS2017 so is there a fix for that?

@3F
Copy link
Owner

3F commented Jun 20, 2017

Please read #33 (that is, NSBin.bat this is something new :) but it should be related)
Currently I'll consider new way of distribution, why is so - #38

I already started this - https://github.com/3F/MvsSln
the new license and common version will be soon, to continue #38 (comment new way there if needed)

temporarily try to configure it manually as it described in #33 (comment)

<DllExportNamespace>System.Runtime.InteropServices</DllExportNamespace>
<DllExportDDNSCecil>true</DllExportDDNSCecil>
...
<Import Project="full_path_to\tools\net.r_eg.DllExport.targets" />

@jpeg729
Copy link

jpeg729 commented Jul 2, 2017

I had the same problem until I upgraded PowerShell.

NSBin.bat was failing to load NSBin.dll because it "was compiled with a newer runtime".

I did also install msbuild tools, so that might have helped too. https://www.microsoft.com/en-us/download/details.aspx?id=48159

With VS2017, the latest PowerShell and ms build tools, I can get it to work on Windows Server 2008 R2.
I just install simply via NuGet and choose the following parameters...

    <DllExportNamespace>System.Runtime.InteropServices</DllExportNamespace>
    <DllExportDDNSCecil>true</DllExportDDNSCecil>
    <DllExportSkipOnAnyCpu>false</DllExportSkipOnAnyCpu>
    <DllExportOrdinalsBase>1</DllExportOrdinalsBase>
    <DllExportGenExpLib>false</DllExportGenExpLib>
    <DllExportOurILAsm>false</DllExportOurILAsm>

@qadeem-qureshi
Copy link
Author

This is correct. Upgrading the PS allowed me to get the gui and everything compiled fine. Thanks!

@3F
Copy link
Owner

3F commented Jul 4, 2017

@Cloudhax23 Did I understand correctly that you had problem ~"a runtime newer than the currently loaded" (#41) for this error ? or this is another problem, but was resolved by the same solution ?

@jpeg729
Copy link

jpeg729 commented Jul 4, 2017

To clarify NSBin.bat tries to load NSBin, but PowerShell complains that NSBin was built by a runtime newer than the currently loaded and that is why NSBin.bat exited with code 1.

The error is the same, but the error messages shown in different places have different levels of detail.

The fix is upgrading PowerShell.

I don't know if it is necessary, but I did also install msbuild tools. https://www.microsoft.com/en-us/download/details.aspx?id=48159

@3F
Copy link
Owner

3F commented Jul 4, 2017

@jpeg729 thanks for the additional information

@3F
Copy link
Owner

3F commented Aug 20, 2017

I closed this issue because of new Wizard for v1.6+ versions. You already can test it via our beta releases:

If you still have a some related problems, please create new issue for new planned Wizard.

@3F 3F closed this as completed Aug 20, 2017
@3F 3F added this to the v1.6 milestone Aug 20, 2017
@3F 3F added the support label Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants