Skip to content

Update setup.py - use vswhere for msbuild 15+ #540

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

Closed
wants to merge 7 commits into from

Conversation

den-run-ai
Copy link
Contributor

What does this implement/fix? Explain your changes.

VS 2017 issues with msbuild

Does this close any currently open issues?

#539

Any other comments?

@dmitriyse needs to be added to this commit

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

@den-run-ai den-run-ai changed the title Update setup.py Update setup.py - use vswhere for msbuild 15+ Sep 11, 2017
@den-run-ai
Copy link
Contributor Author

UnmanagedExports complaining about ildasm.exe:

UnmanagedExports.1.2.7\tools\RGiesecke.DllExport.targets(58,3): error : Microsoft.Build.Utilities.ToolLocationHelper could not find ildasm.exe.

[.\pythonnet\src\clrmodule\clrmodule.csproj]

@den-run-ai
Copy link
Contributor Author

den-run-ai commented Sep 11, 2017

although unmanaged exports complains, the build looks fine and the "import clr" works. this issue seems very common:

https://stackoverflow.com/questions/44836800/could-not-find-ildasm-exe
https://stackoverflow.com/questions/39811809/ildasm-for-net-4-5

@dmitriyse
Copy link
Contributor

dmitriyse commented Sep 11, 2017

Build fails due to 12.04 upgraded to Mono 5.2 + travis apt command have a bad thing --no-install-suggest.
To overcome this issue you can try this:

addons:
  apt:
    sources:
      - sourceline: deb http://download.mono-project.com/repo/ubuntu precise main
        key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
    packages:
      - mono-devel
      - ca-certificates-mono

Probably it's time to merge #518 , as it's contain many things like that already debugged.

@codecov
Copy link

codecov bot commented Sep 11, 2017

Codecov Report

Merging #540 into master will decrease coverage by 0.71%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #540      +/-   ##
==========================================
- Coverage   77.12%   76.41%   -0.72%     
==========================================
  Files          65       64       -1     
  Lines        5547     5541       -6     
  Branches      889      889              
==========================================
- Hits         4278     4234      -44     
- Misses        981     1019      +38     
  Partials      288      288
Flag Coverage Δ
#setup_linux ?
#setup_windows 76.41% <16.66%> (-0.07%) ⬇️
Impacted Files Coverage Δ
setup.py 69.6% <16.66%> (-18.78%) ⬇️
src/tests/_compat.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af62a1a...82cd6ed. Read the comment docs.

@den-run-ai
Copy link
Contributor Author

closing this in favor #518 assuming @dmitriyse moves vswhere to tools subdirectory

@den-run-ai den-run-ai closed this Sep 13, 2017
@dmitriyse
Copy link
Contributor

My suggestion #540 (comment) did not helps. Strange.
In the #518 I forced to switch to 14.04 ubuntu image, due to dotnet core does not supported on the 12.04 Ubuntu.
In 14.04 image this tip is 100% works.

@den-run-ai den-run-ai deleted the vswhere-msbuild branch November 18, 2017 22:01
@SlimeQ
Copy link

SlimeQ commented Jun 6, 2018

On Windows 10, the ildasm.exe error does prevent installation from completing. I'm using the master branch on 6/6/18.

I attempted to upgrade DllExport and configure the app using DllExport.bat (which was suggested somewhere). This results in the following error:

Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

delegatemanager.cs(204,13): warning CS0162: Unreachable code detected [C:\Users\quincyc\Documents\Github\pythonnet\src\runtime\Python.Runtime.csproj]
pythonexception.cs(67,13): warning CS0162: Unreachable code detected [C:\Users\quincyc\Documents\Github\pythonnet\src\runtime\Python.Runtime.csproj]
pyobject.cs(50,13): warning CS0162: Unreachable code detected [C:\Users\quincyc\Documents\Github\pythonnet\src\runtime\Python.Runtime.csproj]
pyscope.cs(534,13): warning CS0162: Unreachable code detected [C:\Users\quincyc\Documents\Github\pythonnet\src\runtime\Python.Runtime.csproj]
  Python.Runtime -> C:\Users\quincyc\Documents\Github\pythonnet\src\runtime\bin\Python.Runtime.dll
  Python.Test -> C:\Users\quincyc\Documents\Github\pythonnet\src\testing\bin\Python.Test.dll
dynamic.cs(121,28): warning CS0618: 'PythonEngine.RunString(string, IntPtr?, IntPtr?)' is obsolete: 'RunString is deprecated and will be removed. Use Exec/Eval/RunSimpleString instead.' [C:\Users\quincyc\Documents\Github\pythonnet\src\e
mbed_tests\Python.EmbeddingTest.csproj]
  Python.EmbeddingTest -> C:\Users\quincyc\Documents\Github\pythonnet\src\embed_tests\bin\Python.EmbeddingTest.dll
  Console -> C:\Users\quincyc\Documents\Github\pythonnet\src\console\bin\nPython.exe
  clrmodule -> C:\Users\quincyc\Documents\Github\pythonnet\src\clrmodule\bin\clrmodule.dll
C:\Users\quincyc\Documents\Github\pythonnet\packages\DllExport.1.6.0\tools\net.r_eg.DllExport.targets(68,11): error MSB4064: The "VsDevCmd" parameter is not supported by the "DllExportAppDomainIsolatedTask" task. Verify the parameter ex
ists on the task, and it is a settable public instance property. [C:\Users\quincyc\Documents\Github\pythonnet\src\clrmodule\clrmodule.csproj]
C:\Users\quincyc\Documents\Github\pythonnet\packages\DllExport.1.6.0\tools\net.r_eg.DllExport.targets(56,5): error MSB4063: The "DllExportAppDomainIsolatedTask" task could not be initialized with its input parameters.  [C:\Users\quincyc
\Documents\Github\pythonnet\src\clrmodule\clrmodule.csproj]

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

Successfully merging this pull request may close these issues.

3 participants